# NASA on Onekey > 10 endpoints for NASA (3 stable, 7 beta), 1 to 5 credits each. Category: Maps, weather & space. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/nasa Reference (Markdown): https://onekey.dev/docs/api/nasa.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 10 mapped NASA endpoints return each: - `entity.url` (URL): 8 - `entity.category` (string): 6 - `content.createdAt` (ISO 8601 date): 5 - `entity.id` (string): 5 - `content.text` (string): 4 - `media.url` (URL): 4 - `author.displayName` (string): 3 - `content.title` (string): 3 - `entity.date` (ISO 8601 date): 3 - `media.thumbnailUrl` (URL): 3 - `content.id` (string): 2 - `entity.name` (string): 2 - `entity.description` (string): 1 - plus 14 platform-specific fields under `ext.` ## Endpoints ### nasa.apod Astronomy Picture of the Day (today). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/nasa/apod` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.title`, `content.text`, `media.url`, `entity.url`, `entity.category`, `content.createdAt`, `author.displayName`, `media.thumbnailUrl` - Reference: https://onekey.dev/docs/api/nasa/apod.md ### nasa.apod_date Astronomy Picture of the Day for a given date (1995-06-16 onward). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/nasa/apod_date?date=2024-01-01` with header `x-api-key: YOUR_API_KEY` - Parameters: - `date` (string, required): Date YYYY-MM-DD - Fields returned: `content.title`, `content.text`, `media.url`, `entity.url`, `entity.category`, `content.createdAt`, `author.displayName`, `media.thumbnailUrl` - Reference: https://onekey.dev/docs/api/nasa/apod_date.md ### nasa.apod_range Astronomy Pictures of the Day for a date range. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nasa/apod_range?start=2024-01-01&end=2024-01-05` with header `x-api-key: YOUR_API_KEY` - Parameters: - `start` (string, required): Date YYYY-MM-DD - `end` (string, required): Date YYYY-MM-DD - Fields returned: `content.title`, `content.text`, `media.url`, `entity.url`, `entity.category`, `content.createdAt`, `author.displayName`, `media.thumbnailUrl` - Reference: https://onekey.dev/docs/api/nasa/apod_range.md ### nasa.donki_cme Coronal mass ejections (DONKI) in a date window (max 30 days). - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nasa/donki_cme?start=2024-01-01&end=2024-01-10` with header `x-api-key: YOUR_API_KEY` - Parameters: - `start` (string, required): Date YYYY-MM-DD - `end` (string, required): Date YYYY-MM-DD - Fields returned: `entity.id`, `entity.date`, `entity.description`, `entity.category`, `entity.url`, `ext.sourceLocation`, `ext.activeRegion` - Reference: https://onekey.dev/docs/api/nasa/donki_cme.md ### nasa.donki_flares Solar flares (DONKI) in a date window (max 30 days). - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nasa/donki_flares?start=2024-01-01&end=2024-01-10` with header `x-api-key: YOUR_API_KEY` - Parameters: - `start` (string, required): Date YYYY-MM-DD - `end` (string, required): Date YYYY-MM-DD - Fields returned: `entity.id`, `entity.date`, `content.createdAt`, `entity.category`, `entity.url`, `ext.sourceLocation`, `ext.activeRegion` - Reference: https://onekey.dev/docs/api/nasa/donki_flares.md ### nasa.donki_storms Geomagnetic storms (DONKI) in a date window (max 30 days). - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nasa/donki_storms?start=2024-03-01&end=2024-03-31` with header `x-api-key: YOUR_API_KEY` - Parameters: - `start` (string, required): Date YYYY-MM-DD - `end` (string, required): Date YYYY-MM-DD - Fields returned: `entity.id`, `entity.date`, `entity.url`, `entity.category`, `ext.kpIndex` - Reference: https://onekey.dev/docs/api/nasa/donki_storms.md ### nasa.epic_natural Latest natural-color EPIC Earth images. - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nasa/epic_natural` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.text`, `content.createdAt`, `ext.imageName` - Reference: https://onekey.dev/docs/api/nasa/epic_natural.md ### nasa.mars_latest_photos Latest photos from a Mars rover (curiosity, perseverance, opportunity, spirit). - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nasa/mars_latest_photos?rover=curiosity` with header `x-api-key: YOUR_API_KEY` - Parameters: - `rover` (string, required): Rover - Fields returned: `content.id`, `media.url`, `ext.date`, `ext.camera`, `ext.rover` - Reference: https://onekey.dev/docs/api/nasa/mars_latest_photos.md ### nasa.neo_browse Browse the near-earth object catalogue (paged). - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/nasa/neo_browse?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 20): Rows (1-20) - `page` (string, optional, default 0): Page (0-based) - Fields returned: `entity.id`, `entity.name`, `entity.url`, `ext.absoluteMagnitude`, `ext.potentiallyHazardous`, `ext.diameterMinKm`, `ext.diameterMaxKm`, `ext.sentryObject` - Reference: https://onekey.dev/docs/api/nasa/neo_browse.md ### nasa.neo_lookup Near-Earth object by NASA SPK id. - Price: 1 credit per fresh call. Status: beta. Returns: one record. - Request: `GET https://api.onekey.dev/v1/nasa/neo_lookup?id=3542519` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): SPK-ID, e.g. 3542519 - Fields returned: `entity.id`, `entity.name`, `entity.url`, `ext.hazardous`, `ext.diameterMaxMeters` - Reference: https://onekey.dev/docs/api/nasa/neo_lookup.md ## Sample request ```bash curl "https://api.onekey.dev/v1/nasa/apod" \ -H "x-api-key: YOUR_API_KEY" ```