Launch Library Reading API Overview

Calls

  • All API calls should be made with HTTP GET.
  • Request data is passed in one of two ways:
    1. An ID or name can be passed in via the URL line. For example /launch/5 or launch/Falcon.
    2. Via URL Parameters, as listed below.
  • Many URL Parameters can be repeated to provide a list. For example /launch?id=4&id=9
  • Text searching is case insensitive.
  • Omitting parameters for each type will usually return a list of 10 objects, but not always. Sometimes it will be more (or all in the case of types), sometimes it will error and tell you what is necessary.

Returns


  • All returns are JSON objects with various options. The data on non-failure will be variable depending on your options. Failures will contain a status variable and a msg variable:

Failure

Name Description
status "fail"
msg A probably should be more helpful error message.

Agency

Usage: https://launchlibrary.net/1.1/agency

Examples:

  • To return the agency with an ID of 5:
    https://launchlibrary.net/1.1/agency/5
    OR
    https://launchlibrary.net/1.1/agency?id=5
  • To return the agency with an abbreviation of NASA:
    https://launchlibrary.net/1.1/agency/NASA
    OR
    https://launchlibrary.net/1.1/agency?abbrev=nasa
  • NOTE: Agencies match here against abbreviation, not name.
  • To return the agency with a name matching "National":
    https://launchlibrary.net/1.1/agency?name=National

All Parameters:

NameDescription
modeHow much you want returned. Either list, summary, or verbose.
idThe id of a specific agency you want.
nameThe name of a specific agency you want.
typeThe agency type id for the agency you are looking for.
abbrevThe abbreviaton of the agency you want.

Agency Type

Usage: https://launchlibrary.net/1.1/agencytype

Examples:

  • To return the agency type with an ID of 1:
    https://launchlibrary.net/1.1/agencytype/1
    OR
    https://launchlibrary.net/1.1/agencytype?id=1
  • To return the agency type with a name of government:
    https://launchlibrary.net/1.1/agencytype/Government
    OR
    https://launchlibrary.net/1.1/agencytype?name=Government

All Parameters:

NameDescription
nameName for the agency type.
idID for the agency type.

Event Type

Usage: https://launchlibrary.net/1.1/eventtype

Examples:

  • To return the event type with an ID of 1:
    https://launchlibrary.net/1.1/eventtype/1
    OR
    https://launchlibrary.net/1.1/eventtype?id=1
  • To return the event type with a name of info:
    https://launchlibrary.net/1.1/eventtype/info
    OR
    https://launchlibrary.net/1.1/eventtype?name=info

All Parameters:

NameDescription
nameName for the event type.
idID for the event type.

Launch

Usage: https://launchlibrary.net/1.1/launch

Note: /calendar is an alias for /launch and sets format=ics for you.

Examples:

  • To return the launch with an ID of 1:
    https://launchlibrary.net/1.1/launch/120
    OR
    https://launchlibrary.net/1.1/launch?id=120
  • To return the launch with a name including Falcon:
    https://launchlibrary.net/1.1/launch/Falcon
    OR
    https://launchlibrary.net/1.1/launch?name=falcon
  • To return the next 5 launches:
    https://launchlibrary.net/1.1/launch/next/5
    OR
    https://launchlibrary.net/1.1/launch?next=5
  • To return launches between August 20th, 2015 and September 20th, 2015:
    https://launchlibrary.net/1.1/launch/2015-08-20/2015-09-20
    OR
    https://launchlibrary.net/1.1/launch?startdate=2015-08-20&enddate=2015-09-20
  • To return launches after August 20th, 2015:
    https://launchlibrary.net/1.1/launch/2015-08-20
    OR
    https://launchlibrary.net/1.1/launch?startdate=2015-08-20
  • To return the launch with the id of 20 and the fields name and location id only:
    https://launchlibrary.net/1.1/launch/20?fields=name,locationid
    OR
    https://launchlibrary.net/1.1/launch?id=20&fields=name,locationid
  • To return the launch with the id of 20 in ICS format:
    https://launchlibrary.net/1.1/launch/20?format=ics
    OR
    https://launchlibrary.net/1.1/calendar/20

Note: The total in the response is the total number of launches meeting your criteria, to be used with paging. You can get the next page by changing your offset.

All Parameters:

NameDescription
modeModes are overview, summary, verbose.
fieldsAn array of strings for fields returned in summary or verbose. The ID, name, net, inhold, and status fields are returned in summary if this is not present. All fields are returned in verbose if this is not present.
sortSorts by NET. Use asc for ascending, desc for descending. Defaults to ascending.
formatFormat of the response. Possible formats are json and ics, defaults to json.
If there is an error or no launches match your criteria, it will respond with a 404 and a json body.
seqUsed only when format=ics. Pass in a sequence number. If it is greater than 0 and they have the event on their calendar, it should update the existing instead of creating a new.

Search Options


If all of the following are omitted, it will return the next 10 launches by default.

nextReturn the next N launches
startdateDate/Time to start search for. If this an
enddateDate/Time for the next launch attempt.
limitLimit of responses. Defaults to 10.
offsetOffset, for pagination.
idThe ID of the launch you are searching for.
nameThe ID of the launch you are searching for.
locationidThe LocationID for the launch you are searching for.
rocketidThe RocketID for the launch you are searching for.

Launch Event

Usage: https://launchlibrary.net/1.1/launchevent

Examples:

  • To return the launch event with an ID of 7:
    https://launchlibrary.net/1.1/launchevent/7
    OR
    https://launchlibrary.net/1.1/launchevent?id=7
  • To return the launch event with a launch id of 12:
    https://launchlibrary.net/1.1/launchevent?parentid=12

All Parameters:

NameDescription
modeModes are: list, summary, verbose
idID for the launch event.
nameName of launch event
typeEvent type.
parentidID of launch.

Launch Status

Usage: https://launchlibrary.net/1.1/launchstatus

Examples:

  • To return the launc status with an ID of 1:
    https://launchlibrary.net/1.1/launchstatus/1
    OR
    https://launchlibrary.net/1.1/launchstatus?id=1
  • To return the launch status with a name of GREEN:
    https://launchlibrary.net/1.1/launchstatus/green
    OR
    https://launchlibrary.net/1.1/launch?name=green

All Parameters:

NameDescription
nameName for the launch status.
idID for the launch status.

Location

Usage: https://launchlibrary.net/1.1/location

Examples:

  • To return the location with an ID of 1:
    https://launchlibrary.net/1.1/location/1
    OR
    https://launchlibrary.net/1.1/location?id=1
  • To return the location with a name of Woomera:
    https://launchlibrary.net/1.1/location/woomera
    OR
    https://launchlibrary.net/1.1/location?name=woomera
  • To return the location withing the United States:
    https://launchlibrary.net/1.1/location?countryCode=USA

All Parameters:

NameDescription
modeModes are list, summary, verbose
countryCodeISO 3-letter country code for primary country of the location.
idID of the location.
nameName of the location.

Mission

Usage: https://launchlibrary.net/1.1/mission

Examples:

  • To return the mission with an ID of 42:
    https://launchlibrary.net/1.1/mission/42
    OR
    https://launchlibrary.net/1.1/mission?id=42
  • To return the mission with a name of GPS:
    https://launchlibrary.net/1.1/mission/GPS
    OR
    https://launchlibrary.net/1.1/mission?name=GPS
  • To return the mission with a launch ID of 12:
    https://launchlibrary.net/1.1/launch?launchid=12

All Parameters:

NameDescription
modeModes are overview, summary, verbose.
fieldsAn array of strings for fields returned in summary or verbose. The ID, name, net, inhold, and status fields are returned in summary if this is not present. All fields are returned in verbose if this is not present.

Search Options


If all of the following are omitted, it will return the first 10 missions returned by the db by default.

limitLimit of responses. Defaults to 10.
offsetOffset, for pagination.
idThe ID of the mission you are searching for.
nameThe ID of the mission you are searching for.
descriptionThe description of the mission you are searching for.
launchidThe ID of the launch the mission is attached to.
typeThe type of mission.
agencyAn agency involved in the mission.

Mission Event

Usage: https://launchlibrary.net/1.1/missionevent

Examples:

  • To return the mission event with an ID of 3:
    https://launchlibrary.net/1.1/missionevent/3
    OR
    https://launchlibrary.net/1.1/missionevent?id=3
  • To return the mission event with a mission id of 120:
    https://launchlibrary.net/1.1/missionevent?parentid=120

All Parameters:

NameDescription
modeModes are: list, summary, verbose
idID for the mission event.
nameName of mission event
typeEvent type.
parentidID of mission.

Mission Type

Usage: https://launchlibrary.net/1.1/missiontype

Examples:

  • To return the mission type with an ID of 1:
    https://launchlibrary.net/1.1/missiontype/1
    OR
    https://launchlibrary.net/1.1/missiontype?id=1
  • To return the mission type with a name of planetary:
    https://launchlibrary.net/1.1/missiontype/planetary
    OR
    https://launchlibrary.net/1.1/missiontype?name=planetary

All Parameters:

NameDescription
nameName for the mission type.
descriptionA description for the mission type.

Pad

Usage: https://launchlibrary.net/1.1/pad

Examples:

  • To return the pad with an ID of 1:
    https://launchlibrary.net/1.1/pad/1
    OR
    https://launchlibrary.net/1.1/pad?id=1
  • To return pads with a name containing launch complex:
    https://launchlibrary.net/1.1/pad/launch%20complex
    OR
    https://launchlibrary.net/1.1/pad?name=launch%20complex
  • To return pads with a location ID of 5:
    https://launchlibrary.net/1.1/pad?locationid=5

All Parameters:

NameDescription
modeModes are: list, summary, verbose
idThe ID of the pad.
nameName for the pad.
locationidThe ID of the location for the pad.

Rocket

Usage: https://launchlibrary.net/1.1/rocket

Examples:

  • To return the rocket with an ID of 1:
    https://launchlibrary.net/1.1/rocket/1
    OR
    https://launchlibrary.net/1.1/rocket?id=1
  • To return the rocket with a name containing Falcon:
    https://launchlibrary.net/1.1/rocket/falcon
    OR
    https://launchlibrary.net/1.1/rocket?name=falcon
  • To return the rockets with configuration containing v1.1:
    https://launchlibrary.net/1.1/rocket?name=v1.1

All Parameters:

NameDescription
modeModes are list, summary, verbose.
idID for the rocket.
nameName for the rocket.
configurationConfiguration text for the rocket
familyIDThe ID for the rocket family.

Rocket Event

Usage: https://launchlibrary.net/1.1/rocketevent

Examples:

  • To return the rocket event with an ID of 10:
    https://launchlibrary.net/1.1/rocketevent/10
    OR
    https://launchlibrary.net/1.1/rocketevent?id=10
  • To return the launch event with a launch id of 1 :
    https://launchlibrary.net/1.1/rocketevent?parentid=1

Note: Rocket Events are for individual rockets only, and are copied to launch events when a rocket is assigned to a launch.

All Parameters:

NameDescription
modeModes are: list, summary, verbose
idID for the rocket event.
nameName of rocket event
typeEvent type.
parentidID of rocket.

Rocket Family

Usage: https://launchlibrary.net/1.1/rocketfamily

Examples:

  • To return the rocket family with an ID of 1:
    https://launchlibrary.net/1.1/rocketfamily/1
    OR
    https://launchlibrary.net/1.1/rocketfamily?id=1

All Parameters:

NameDescription
nameName for the rocket family.
agenciesAny agencies for the rocket family.