Find an API

Search public APIs with auth details & Postman guides

← All APIs

Open Notify - People in Space

api.open-notify.org · Science

Science No Auth Free & Open Space ISS Facts

Get the names and spacecraft of all astronauts currently in space. Simple, single-purpose API. Free, no authentication.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET People in space

Returns the number of people in space and their names.

http://api.open-notify.org/astros.json

Hover any highlighted part to learn what it does

curl -X GET "http://api.open-notify.org/astros.json"
import requests
response = requests.get(
    "http://api.open-notify.org/astros.json",
)
print(response.json())
const url = 'http://api.open-notify.org/astros.json';

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "http://api.open-notify.org/astros.json"
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("http://api.open-notify.org/astros.json")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "http://api.open-notify.org/astros.json";
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed
  2. GET http://api.open-notify.org/astros.json
  3. Returns: {"number": N, "people": [{"name":"...", "craft":"..."}, ...]}
  4. ISS location: GET http://api.open-notify.org/iss-now.json

Open documentation ↗