Skill Tracer
Skills › Scientific Agent Skills › database-lookup › nasa.md

nasa.md

86 lines · skills/database-lookup/references/nasa.md at 5f2bc03

Open on GitHub
1# NASA APIs
2
3## Base URL
4
5```
6https://api.nasa.gov
7```
8

Base URL

https://api.nasa.gov
Raw lines 3 to 8
9## Authentication
11NeoWs uses an API key passed as `api_key`; APOD now uses the separate WordPress endpoint below. Check per-service authentication in the NASA catalogue.
12- Get a free key at: https://api.nasa.gov/#signUp
13- Demo key: `DEMO_KEY` (rate-limited: 30 req/hour, 50 req/day per IP)
14- Registered keys: 1,000 req/hour

Authentication

NeoWs uses an API key passed as api_key; APOD now uses the separate WordPress endpoint below. Check per-service authentication in the NASA catalogue.

  • Get a free key at: https://api.nasa.gov/#signUp
  • Demo key: DEMO_KEY (rate-limited: 30 req/hour, 50 req/day per IP)
  • Registered keys: 1,000 req/hour
Raw lines 9 to 15
16## Key Endpoints

Key Endpoints

Raw lines 16 to 17
18### 1. APOD (Astronomy Picture of the Day)
20Use the new WordPress service:
21```text
22GET https://science.nasa.gov/wp-json/wp/v2/apod-basic/260911
23GET https://science.nasa.gov/wp-json/wp/v2/apod-basic?page=1&per_page=5
24GET https://science.nasa.gov/wp-json/wp/v2/apod-basic?date_from=260901&date_to=260930
25```
26A single date is a **YYMMDD path segment**; ranges use `date_from` and `date_to`
27in the same format. List pagination is one-based and `per_page` is capped at 25.
28The old `date=YYYY-MM-DD` parameter can be silently ignored by this service:
29a September 30 probe returned the latest 25 entries instead of the requested date.
31The single-date response is an object; list responses are arrays. Fields include
32`date`, `post_id`, `title`, `permalink`, `media_type`, `explanation`, `credit`,
33`copyright`, `alt`, `url`, `hdurl`, and generated HTML links. `url` can be an
34article page. Preserve attribution and inspect media type before downloading.
36The NASA-linked [new API guide](https://schlotterer.notion.site/APOD-Feed-And-API-User-Guide-39697d8747c38015a53edfdde76d4f5e)
37is authoritative for this syntax; the NASA catalogue still contains some old
38query parameters. Legacy `/planetary/apod` is scheduled to retire December 1, 2026.

1. APOD (Astronomy Picture of the Day)

Use the new WordPress service:

GET https://science.nasa.gov/wp-json/wp/v2/apod-basic/260911
GET https://science.nasa.gov/wp-json/wp/v2/apod-basic?page=1&per_page=5
GET https://science.nasa.gov/wp-json/wp/v2/apod-basic?date_from=260901&date_to=260930

A single date is a YYMMDD path segment; ranges use date_from and date_to in the same format. List pagination is one-based and per_page is capped at 25. The old date=YYYY-MM-DD parameter can be silently ignored by this service: a September 30 probe returned the latest 25 entries instead of the requested date.

The single-date response is an object; list responses are arrays. Fields include date, post_id, title, permalink, media_type, explanation, credit, copyright, alt, url, hdurl, and generated HTML links. url can be an article page. Preserve attribution and inspect media type before downloading.

The NASA-linked new API guide is authoritative for this syntax; the NASA catalogue still contains some old query parameters. Legacy /planetary/apod is scheduled to retire December 1, 2026.

Raw lines 18 to 39
40### 2. NEO — Near Earth Objects (Asteroids NeoWs)
42```
43GET /neo/rest/v1/feed
44```
46**Parameters:**
48| Parameter | Type | Description |
49|--------------|--------|-------------|
50| `api_key` | string | **Required.** |
51| `start_date` | string | YYYY-MM-DD. Default: today. |
52| `end_date` | string | YYYY-MM-DD. Max 7 days from start. |
54**Example:**
55```
56https://api.nasa.gov/neo/rest/v1/feed?start_date=2024-01-01&end_date=2024-01-03&api_key=DEMO_KEY
57```
59**Lookup by asteroid ID:**
60```
61GET /neo/rest/v1/neo/{asteroid_id}?api_key=DEMO_KEY
62```
64**Browse all:**
65```
66GET /neo/rest/v1/neo/browse?api_key=DEMO_KEY
67```
69**Response structure:** `near_earth_objects` keyed by date, each containing array of objects with `name`, `nasa_jpl_url`, `estimated_diameter`, `close_approach_data`, `is_potentially_hazardous_asteroid`.

2. NEO — Near Earth Objects (Asteroids NeoWs)

GET /neo/rest/v1/feed

Parameters:

ParameterTypeDescription
api_keystringRequired.
start_datestringYYYY-MM-DD. Default: today.
end_datestringYYYY-MM-DD. Max 7 days from start.

Example:

https://api.nasa.gov/neo/rest/v1/feed?start_date=2024-01-01&end_date=2024-01-03&api_key=DEMO_KEY

Lookup by asteroid ID:

GET /neo/rest/v1/neo/{asteroid_id}?api_key=DEMO_KEY

Browse all:

GET /neo/rest/v1/neo/browse?api_key=DEMO_KEY

Response structure: near_earth_objects keyed by date, each containing array of objects with name, nasa_jpl_url, estimated_diameter, close_approach_data, is_potentially_hazardous_asteroid.

Raw lines 40 to 70
71### 3. Archived services
73The NASA portal marks the Mars Rover Photos and Earth APIs as archived. Do not
74use the former `/mars-photos/api/v1/...` routes for new retrieval workflows.
75For Earth imagery, follow the portal's Earthdata GIBS replacement link.

3. Archived services

The NASA portal marks the Mars Rover Photos and Earth APIs as archived. Do not use the former /mars-photos/api/v1/... routes for new retrieval workflows. For Earth imagery, follow the portal's Earthdata GIBS replacement link.

Raw lines 71 to 76
77## Rate Limits
79| Key Type | Hourly Limit | Daily Limit |
80|------------|-------------|-------------|
81| `DEMO_KEY` | 30/hour | 50/day |
82| Registered | 1,000/hour | Unlimited |
84Rate limit headers: `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
86Official [migration notice](https://api.nasa.gov/assets/html/header.html) and [API catalogue](https://api.nasa.gov/assets/json/apis.json).

Rate Limits

Key TypeHourly LimitDaily Limit
DEMO_KEY30/hour50/day
Registered1,000/hourUnlimited

Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining.

Official migration notice and API catalogue.

Raw lines 77 to 86