# JPL Small-Body and CNEOS Data · Close approaches

Search public records with JPL Small-Body and CNEOS Data · Close approaches from Alexandria through one Spiral API key. 'Asteroids passing Earth this week', how close a named asteroid comes (Apophis in 2029), or approaches to the Moon or Mars. With a designation and no dates it covers 1900 to 2200. It runs in the background and returns structured JSON. Pay as you go, with no subscription.

- Provider: Alexandria
- Category: Public Records
- Runs: In the background
- Returns: json
- Tool id: `alexandria` / `ssd-api-jpl-nasa-gov/small-bodies/close_approaches`
- Page: https://spiral.ai/tools/alexandria/ssd-api-jpl-nasa-gov/small-bodies/close_approaches

## Pricing

$0.00873 per call.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 5 minutes
- Longest run, end to end: 225 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `body` | one of | earth, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto, all | — | Body approached (default earth). |
| `sort` | one of | date, -date, dist, -dist, v_rel, -v_rel, h, -h | date | Sort key; prefix - for descending. |
| `h_max` | number |  | — | Only objects with H at most this (larger objects; H 22 is roughly 140 m). |
| `h_min` | number |  | — | Only objects with H at least this (smaller objects). |
| `limit` | number | 1 to 200 | 50 | Approaches per page. |
| `date_max` | text |  | — | Latest approach: YYYY-MM-DD, YYYY-MM-DDThh:mm:ss, now, or +D for D days ahead (default +60; 2200-01-01 with a designation). |
| `date_min` | text |  | — | Earliest approach: YYYY-MM-DD, YYYY-MM-DDThh:mm:ss or now (default now; 1900-01-01 with a designation). |
| `pha_only` | true or false |  | — | Only potentially hazardous asteroids. |
| `designation` | text |  | — | One object's designation or number, such as 99942, 2024 YR4 or 141P. |
| `continuation` | text |  | — | Cursor from a previous call's continuation. |
| `max_distance_au` | number |  | — | Maximum nominal distance in au (default 0.05, or 0.2 with a designation). |
| `max_distance_ld` | number |  | — | Maximum nominal distance in lunar distances, instead of max_distance_au. |
| `min_distance_au` | number |  | — | Minimum nominal distance in au. |

## Example

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "ssd-api-jpl-nasa-gov/small-bodies/close_approaches",
    "input": {
      "body": "earth"
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=alexandria&model=ssd-api-jpl-nasa-gov%2Fsmall-bodies%2Fclose_approaches

## Common questions

### JPL Small-Body and CNEOS Data · Close approaches

**How much does JPL Small-Body and CNEOS Data · Close approaches cost?**

$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

**How do I use JPL Small-Body and CNEOS Data · Close approaches through an API?**

Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "ssd-api-jpl-nasa-gov/small-bodies/close_approaches"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

**Do I need an account with Alexandria to use JPL Small-Body and CNEOS Data · Close approaches?**

No. Spiral runs it on its own Alexandria account and charges your Spiral balance.

**Can my AI agent use JPL Small-Body and CNEOS Data · Close approaches?**

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.

