Modes

Levels of detail in the response - list, normal, detailed

Example - /astronauts/?mode=list

Filters

Parameters - age, age__gt, age__gte, age__lt, age__lte, agency_ids, date_of_birth, date_of_birth__gt, date_of_birth__gte, date_of_birth__lt, date_of_birth__lte, date_of_death, date_of_death__gt, date_of_death__gte, date_of_death__lt, date_of_death__lte, first_flight, first_flight__gt, first_flight__gte, first_flight__lt, first_flight__lte, flights_count, flights_count__gt, flights_count__gte, flights_count__lt, flights_count__lte, has_flown, in_space, is_human, landings_count, landings_count__gt, landings_count__gte, landings_count__lt, landings_count__lte, last_flight, last_flight__gt, last_flight__gte, last_flight__lt, last_flight__lte, nationality, status_ids, type__id

Example - /astronauts/?has_flown=true

Fields searched - agency__abbrev, agency__name, name, nationality__nationality_name

Example - /astronauts/?search=Pesquet

Ordering

Fields - age, date_of_birth, eva_time, flights_count, id, landings_count, last_flight, name, spacewalks_count, status, time_in_space

Example - /astronauts/?ordering=-time_in_space

Number of results

Use limit to control the number of objects in the response (max 100)

Example - /astronauts/?limit=2

Format

Switch to JSON output - /astronauts/?format=json

Help

Find all the FAQs and support links on the documentation homepage - lldev.thespacedevs.com/docs

GET /2.3.0/astronauts/371/?format=api
HTTP 200 OK
Allow: GET
Content-Type: application/json
Vary: Accept

{
    "id": 371,
    "url": "https://lldev.thespacedevs.com/2.3.0/astronauts/371/?format=api",
    "name": "James P. Bagian",
    "status": {
        "id": 2,
        "name": "Retired"
    },
    "agency": {
        "response_mode": "list",
        "id": 44,
        "url": "https://lldev.thespacedevs.com/2.3.0/agencies/44/?format=api",
        "name": "National Aeronautics and Space Administration",
        "abbrev": "NASA",
        "type": {
            "id": 1,
            "name": "Government"
        }
    },
    "image": {
        "id": 638,
        "name": "[AUTO] James P. Bagian - image",
        "image_url": "https://thespacedevs-prod.nyc3.digitaloceanspaces.com/media/images/james2520p.2520bagian_image_20181202120507.jpg",
        "thumbnail_url": "https://thespacedevs-prod.nyc3.digitaloceanspaces.com/media/images/255bauto255d__image_thumbnail_20240305190358.jpeg",
        "credit": null,
        "license": {
            "id": 1,
            "name": "Unknown",
            "priority": 9,
            "link": null
        },
        "single_use": true,
        "variants": []
    },
    "response_mode": "detailed",
    "type": {
        "id": 2,
        "name": "Government"
    },
    "in_space": false,
    "time_in_space": "P14DT1H52M9S",
    "eva_time": "P0D",
    "age": 73,
    "date_of_birth": "1952-02-22",
    "date_of_death": null,
    "nationality": [
        {
            "id": 2,
            "name": "United States of America",
            "alpha_2_code": "US",
            "alpha_3_code": "USA",
            "nationality_name": "American",
            "nationality_name_composed": "Americano"
        }
    ],
    "bio": "James Philip Bagian, MD, PE is an American physician, engineer, and former NASA astronaut of Armenian descent. During his career as an astronaut, he logged 337 hours of space-flight, over two missions, STS-29 (in 1989) and STS-40 (in 1991). After leaving NASA in 1995, Bagian was elected as a member of both the National Academy of Engineering and of the Institute of Medicine. Bagian is currently the Director of the Center for Healthcare Engineering and Patient Safety at the University of Michigan.",
    "wiki": "https://en.wikipedia.org/wiki/James_P._Bagian",
    "last_flight": "1991-06-05T13:24:51Z",
    "first_flight": "1989-03-13T14:57:00Z",
    "social_media_links": [],
    "flights_count": 2,
    "landings_count": 2,
    "spacewalks_count": 0,
    "flights": [],
    "landings": [],
    "spacewalks": []
}