How to list near-Earth asteroid close approaches with an API

POST a number of days to /v1/space/asteroids and get the asteroids and comets passing Earth within a distance you choose: approach time, miss distance in km and lunar distances, relative velocity and estimated size.

When to use it

Use it to list the asteroids and comets that pass close to Earth in the next days, for an astronomy feed, a classroom page, a Discord bot or an agent that answers "what is passing Earth this week?". It lists approaches that were already computed; it is not a tool for assessing risk.

Request

POST days (1 to 30, default 7) and optionally dist_max_au (largest nominal miss distance, 0.0001 to 0.2 au, default 0.05, about 19.5 lunar distances) to /v1/space/asteroids.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/space/asteroids \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"days": 7}'

Response

Response (example from the API spec, one approach, trimmed)
{
  "days": 7,
  "dist_max_au": 0.05,
  "dist_max_lunar": 19.5,
  "count": 15,
  "total_matches": 16,
  "truncated": false,
  "approaches": [{
    "designation": "2026 TB3",
    "approach_time_utc": "2026-10-09T04:48:50Z",
    "distance_au": 0.004304,
    "distance_km": 643858,
    "distance_lunar": 1.67,
    "distance_min_au": 0.00422926964256826,
    "distance_max_au": 0.00437858293059308,
    "relative_velocity_km_s": 11.04,
    "abs_magnitude_h": 28.535,
    "estimated_diameter_m": {"min": 5.2, "max": 11.7}
  }]
}

Each approach has a nominal distance and its 3-sigma range. Approach times are published in TDB; approach_time_utc subtracts about 69 seconds. A diameter is the published one when there is one, otherwise a rough range derived from the absolute magnitude. At most 100 approaches come back per answer (then truncated).

Paying: the 402 flow

Leave out the X-Tanod-Free header (or use up the free calls) and the same request gets HTTP 402 with the price (USD 0.001) and how to pay in the accepts list. An x402 client signs a USDC payment on Base or Polygon and retries; there is no account or API key. The full flow is in Pay-per-call APIs for AI agents with x402.

curl, no free header: the 402
curl -s -i -X POST https://tanod.dev/v1/space/asteroids \
  -H 'content-type: application/json' \
  -d '{"days": 7}'

Limits and attribution

This is not an impact-risk assessment. A close approach list says where an object is expected to pass, not whether it can hit. Orbits are refined over time, so distances change between calls. Results are cached for up to an hour; a 503 upstream_unavailable is not charged.

Data: NASA/JPL Solar System Dynamics close-approach API (US Government work). No endorsement by NASA or JPL is implied.

Price and free allowance

USD 0.001 per call, paid in USDC on Base or Polygon with x402. 5 free skypeek calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared by every skypeek route (METAR, TAF, airports, distance, space weather, aurora, asteroids, sun and moon, satellite passes). MCP tool: asteroid_close_approaches at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: Space weather, Kp index and aurora forecast API, ISS pass times API, Sunrise, sunset and moon phase API, Pay-per-call APIs for AI agents with x402. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.