DEMO_KEY works without signing up, at 30 requests an hour and 50 a day per IP.
Only two of the five hosts read a key. api.nasa.gov (Near Earth Objects, DONKI, EPIC metadata) needs one for every request. science.nasa.gov (APOD) accepts one and serves the same data without it. EONET, images-api.nasa.gov and epic.gsfc.nasa.gov ignore the parameter entirely, so a key is only spent where it is required.
Things worth knowing before you call:
- APOD takes a six-digit date code, not
YYYY-MM-DD.apod.getwants240115for 2024-01-15.apod.listfilters withdate_from/date_toin the same form, as strings so'050101'keeps its leading zero, and NASA ignores either one on its own: sending onlydate_fromreturns today’s entries rather than failing. This plugin rejects a one-sided range before sending. - APOD caps a page at 25 entries. NASA serves 25 for any larger
per_page, so the plugin accepts 1 to 25 and rejects a larger value rather than return fewer than asked. A page-count based walk needs 25 as its page size. - The NEO feed takes at most seven days per request. A wider window answers 400. Distances and speeds arrive as decimal strings, so
miss_distance.kilometersis a string like"45865643.869616206", not a number. - DONKI dates are inclusive on both ends. Omitted dates default to the last 30 days, except
donki.enlilSimulationanddonki.notification, which default to the last seven.donki.cmeanswers 400 without both dates, so the plugin requires them.donki.notificationsilently shifts a window wider than 30 days to the last 30, so a long range does not fail, it returns less than you asked for. donki.solarFlareis down at NASA’s gateway. On 2026-11-17 every/DONKI/FLRrequest, with or without dates, answered 404 from api.nasa.gov while the other DONKI routes worked. The request matches NASA’s docs; the populated body has not been seen live.- EONET sends JSON labelled
application/rss+xml. The plugin parses it; a caller never sees a string.statusomitted means only open events, and an unknown event ID answers a 500 with an HTML body rather than a 404. - EPIC timestamps are not ISO 8601.
dateis"2019-05-30 01:09:10"with a space. A malformed date answers an HTML 500, and a valid date without imagery answers[]. - Rate limits apply across all api.nasa.gov routes: 1,000 requests an hour per key;
DEMO_KEYgets 30 an hour and 50 a day per IP. Waiting out the hour does not restore an exhausted dailyDEMO_KEYallowance. Corsair’s HTTP layer retries a 429 three times with backoff and then reports it.
- 24 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the NASA API key before the first call: More: API Key
pnpm corsair setup --plugin=nasa --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Read the latest picturesWhat’s next
API reference
Every
nasa.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.