Launch Library 2 API
Upcoming and past rocket launches, spacecraft and space agencies.
What it does
Launch Library 2 (by The Space Devs) is a comprehensive database of rocket launches — past, in-progress and upcoming — plus space agencies, launch pads, spacecraft, astronauts, missions, expeditions and space-related events and news.
Base URL
Authentication
None required for public read access. An account/API key raises the rate limit substantially. A separate cached dev host, https://lldev.thespacedevs.com, has a much higher limit and is recommended while you build.
Code examples
curl -s "https://lldev.thespacedevs.com/2.3.0/launches/upcoming/?limit=3&mode=list"
import requests
r = requests.get("https://lldev.thespacedevs.com/2.3.0/launches/upcoming/",
params={"limit": 5}, timeout=15)
for l in r.json()["results"]:
print(l["net"], "-", l["name"])Rate limits & quotas
The production host ll.thespacedevs.com is heavily rate limited for anonymous callers — on the order of 15 requests per hour — returning HTTP 429 with a Retry-After. Use the lldev host (cached, ~much higher limit) for development, add ?mode=list for lighter payloads, and cache results — launch schedules change slowly.
Key response fields
| results[].name | e.g. “Falcon 9 Block 5 | Starlink Group 12-1” |
| results[].net | ‘No Earlier Than’ launch time (ISO 8601, UTC) |
| results[].status.name | Go, TBD, Success, Failure… |
| results[].launch_service_provider.name | Operator (SpaceX, NASA, ULA…) |
| results[].pad.location.name | Launch site |
| count / next / previous | Pagination envelope |
Common errors
| 429 | Anonymous hourly limit exceeded — switch to lldev, cache, or authenticate. |
| 404 | Unknown detail ID, or a trailing slash missing (endpoints require the trailing /). |
| 400 | Invalid filter/ordering parameter. |
When to use it (and alternatives)
The best free source for ‘next launch’ widgets, launch calendars and agency data. For SpaceX-only historical detail the older r/SpaceX API exists but is no longer maintained; LL2 is the actively updated choice.
FAQ
Why am I getting 429 almost immediately?
The main host allows only ~15 requests/hour without an API key. Point your app at lldev.thespacedevs.com during development and cache aggressively in production, or get a key for a higher limit.
What does 'net' mean?
‘No Earlier Than’ — the current best estimate of the launch time. It slips often for upcoming launches; poll periodically rather than trusting a single fetch.
How do I get lighter responses?
Add ?mode=list (or mode=detailed only when you need everything) and use limit/offset for paging.
New to APIs?
Short guides for working with this API — and any other.