Use when a task needs live space or geophysical data - "recent earthquakes near X / above magnitude Y", "NASA picture of the day", "near-Earth asteroids this week", or "latest full-disk Earth image". USGS FDSN is the default for quakes (no key, GeoJSON); NASA's APIs cover astronomy (DEMO_KEY works, free key is instant). Do NOT use for weather, storms, or air quality - use weather-climate instead; do NOT use for maps/geocoding - use geo-places instead; if the request is a vague "I need live data", route through public-data-api-picker.
---
name: Space & Earth Science Data
description: Use when a task needs live space or geophysical data - "recent earthquakes near X / above magnitude Y", "NASA picture of the day", "near-Earth asteroids this week", or "latest full-disk Earth image". USGS FDSN is the default for quakes (no key, GeoJSON); NASA's APIs cover astronomy (DEMO_KEY works, free key is instant). Do NOT use for weather, storms, or air quality - use weather-climate instead; do NOT use for maps/geocoding - use geo-places instead; if the request is a vague "I need live data", route through public-data-api-picker.
---
# Space & Earth Science Data
Fetch earthquakes and NASA astronomy data with verified endpoints. The mistakes this prevents: trusting community space APIs from training memory - the SpaceX API (api.spacexdata.com) and the popular ISS-position endpoints fail TLS or time out, verified - and burning NASA's shared `DEMO_KEY` quota mid-task.
## Ranked APIs
1. **USGS Earthquake FDSN** (earthquake.usgs.gov) - DEFAULT for anything seismic. Global catalog, rich filtering, GeoJSON, no key, fast.
2. **NASA APIs** (api.nasa.gov) - APOD (picture of the day), NeoWs (near-Earth objects). `DEMO_KEY` works but is shared per-IP (~10-30 req/hr); a real key is a 30-second instant email signup at api.nasa.gov and lifts it to 1,000 req/hr. Use `DEMO_KEY` for one-off calls only.
3. **NASA EPIC mirror** (epic.gsfc.nasa.gov) - full-disk Earth imagery, **no key at all** on this host. Prefer it over the api.nasa.gov EPIC route, which spends key quota for identical data.
## Procedure
1. **Quakes: filter server-side.** Time, magnitude, radius, and sort all belong in the query string - never fetch the whole feed and filter locally (templates below).
2. **NASA: budget the key.** One-off → `DEMO_KEY`. Anything in a loop, cron, or shipped app → tell the user to grab the instant free key and read the `X-RateLimit-Remaining` header. A 429 here means quota, not outage - the fix is a key, not a retry.
3. **Convert epoch times.** USGS `time` is **milliseconds** since epoch; NASA dates are `YYYY-MM-DD` strings. Report human-readable UTC.
Ask the user only if missing - quakes: region (default: global), min magnitude (default: 4.5), window (default: past 7 days). NASA: date (default: today).
## URL templates + real response shapes
… install to load the full skill