[Integrations](https://spiral.ai/integrations) › [Grok](https://spiral.ai/integrations/grok) › [JPL asteroid close approaches](https://spiral.ai/integrations/grok/jpl-asteroid-close-approaches)

# How to Use JPL asteroid close approaches in Grok

Returns predicted encounter dates, distances, relative speeds, and uncertainties from JPL's Small-Body Database. Use it to build an approach calendar or examine Apophis in 2029; impact probabilities come from Sentry.

|  |  |
| --- | --- |
| Model | JPL asteroid close approaches |
| Available through | Alexandria |
| Category | Public Records |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with JPL asteroid close approaches in Grok

- Use JPL asteroid close approaches to show Apophis encounters with Earth during 2029, including predicted distances and uncertainty bounds.
- Use JPL asteroid close approaches to look this up and give me the result as a table.
- Pull the latest numbers from JPL asteroid close approaches and tell me what changed since last week.
- Check JPL asteroid close approaches and summarize what you find in three bullet points.
- Pull the newest data from JPL asteroid close approaches and give me the result as a table.

## How to set up JPL asteroid close approaches in Grok

Pick the way that suits you. Each takes about two minutes.

### Use the Grok connector

1. **Add a custom connector**: In Grok open Settings › Connect Apps, then Add a custom connector. Name it Spiral, paste this URL, leave Headers empty and click Add MCP.

```text
https://api.spiral.ai/mcp
```

2. **Sign in to Spiral and approve**: Grok opens Spiral: sign in, pick the organization and click Authorize. Spiral gives the connection its own API key; Grok never sees it, and you can remove the connection under Settings › Connected apps.

3. **Check that it is connected**: Connect Apps › Custom shows Spiral as Connected. It works in every Grok chat and Grok bot.

### Use the Spiral skill

1. **Send Grok this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run JPL asteroid close approaches**: One request; the result comes back by polling or a webhook.

```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"
    }
  }'
```

Then paste one of the prompts above: Grok finds JPL asteroid close approaches on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/grok

## JPL asteroid close approaches tools and prices

- [JPL Small-Body and CNEOS Data · Close approaches](https://spiral.ai/tools/alexandria/ssd-api-jpl-nasa-gov/small-bodies/close_approaches) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| body | earth, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto, all | — | Body approached (default earth). |
| sort | date, -date, dist, -dist, v_rel, -v_rel, h, -h | date | Sort key; prefix - for descending. |
| h_max |  | — | Only objects with H at most this (larger objects; H 22 is roughly 140 m). |
| h_min |  | — | Only objects with H at least this (smaller objects). |
| limit | 1 to 200 | 50 | Approaches per page. |
| date_max |  | — | 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). |

## What can you do with JPL asteroid close approaches in Grok?

Turn JPL records into an astronomy brief with the numbers readers need to assess a claim. Explain whether the returned evidence describes an orbit, a predicted encounter, a possible impact, or an observed atmospheric event.

### Prepare a planetarium news brief

Combine upcoming encounters, reported fireballs, Sentry summaries, individual risk scenarios, and asteroid or comet background tables into a weekly astronomy briefing.

### Check an astronomy article

Check flyby predictions, atmospheric event records, impact probabilities, and object properties against the corresponding JPL records before publication.

### Build a classroom evidence workbook

Give students separate exercises on predicted encounters, observed atmospheric events, possible impact scenarios, and differences among asteroid or comet populations.

### Create an asteroid encounter calendar

List predicted encounter dates and distances, then add orbital and physical context for selected objects.

### Study orbital uncertainty

Compare orbital records across selected asteroids and inspect the uncertainty information attached to their predicted encounters.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Grok guides](https://spiral.ai/integrations/grok)

## JPL asteroid close approaches in other agents

- [Amp](https://spiral.ai/integrations/amp/jpl-asteroid-close-approaches)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/jpl-asteroid-close-approaches)
- [Claude](https://spiral.ai/integrations/claude-desktop/jpl-asteroid-close-approaches)
- [Claude Code](https://spiral.ai/integrations/claude-code/jpl-asteroid-close-approaches)
- [Cline](https://spiral.ai/integrations/cline/jpl-asteroid-close-approaches)
- [Codex](https://spiral.ai/integrations/codex/jpl-asteroid-close-approaches)
- [Cursor](https://spiral.ai/integrations/cursor/jpl-asteroid-close-approaches)
- [Devin](https://spiral.ai/integrations/devin/jpl-asteroid-close-approaches)
- [dots](https://spiral.ai/integrations/dots/jpl-asteroid-close-approaches)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/jpl-asteroid-close-approaches)
- [Gemini](https://spiral.ai/integrations/gemini/jpl-asteroid-close-approaches)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/jpl-asteroid-close-approaches)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/jpl-asteroid-close-approaches)
- [goose](https://spiral.ai/integrations/goose/jpl-asteroid-close-approaches)
- [Grok Build](https://spiral.ai/integrations/grok-build/jpl-asteroid-close-approaches)
- [Hermes](https://spiral.ai/integrations/hermes/jpl-asteroid-close-approaches)
- [Instinct](https://spiral.ai/integrations/instinct/jpl-asteroid-close-approaches)
- [Manus](https://spiral.ai/integrations/manus/jpl-asteroid-close-approaches)
- [Muse](https://spiral.ai/integrations/muse/jpl-asteroid-close-approaches)
- [Muse Code](https://spiral.ai/integrations/muse-code/jpl-asteroid-close-approaches)
- [n8n](https://spiral.ai/integrations/n8n/jpl-asteroid-close-approaches)
- [Notion](https://spiral.ai/integrations/notion/jpl-asteroid-close-approaches)
- [OpenClaw](https://spiral.ai/integrations/openclaw/jpl-asteroid-close-approaches)
- [opencode](https://spiral.ai/integrations/opencode/jpl-asteroid-close-approaches)
- [Perplexity](https://spiral.ai/integrations/perplexity/jpl-asteroid-close-approaches)
- [Raycast](https://spiral.ai/integrations/raycast/jpl-asteroid-close-approaches)
- [VS Code](https://spiral.ai/integrations/vscode/jpl-asteroid-close-approaches)
- [Windsurf](https://spiral.ai/integrations/windsurf/jpl-asteroid-close-approaches)
- [Zapier](https://spiral.ai/integrations/zapier/jpl-asteroid-close-approaches)

## More Grok guides

- [JPL asteroid and comet search](https://spiral.ai/integrations/grok/jpl-asteroid-and-comet-search)
- [Justice Laws legislation details](https://spiral.ai/integrations/grok/justice-laws-legislation-details)
- [JPL asteroid and comet details](https://spiral.ai/integrations/grok/jpl-asteroid-and-comet-details)
- [Justice Laws legislation directory](https://spiral.ai/integrations/grok/justice-laws-legislation-directory)
- [India eCourts states and union territories](https://spiral.ai/integrations/grok/india-ecourts-states-and-union-territories)
- [Justice Laws legislation page](https://spiral.ai/integrations/grok/justice-laws-legislation-page)

## Questions about JPL asteroid close approaches in Grok

**Can Grok use JPL asteroid close approaches?**

Yes. Add Spiral to Grok as an MCP server, and Grok can find and run JPL asteroid close approaches like any built-in tool.

**How much does JPL asteroid close approaches cost in Grok?**

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

**Do I need an Alexandria account to use JPL asteroid close approaches in Grok?**

No. Spiral runs JPL asteroid close approaches on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up JPL asteroid close approaches in Grok?**

About two minutes: add a custom connector, then sign in to Spiral and approve, then check that it is connected.

**Does Grok wait while JPL asteroid close approaches runs?**

JPL asteroid close approaches runs in the background. Grok starts the run, checks on it and gives you the json when it's ready.

**Which objects does JPL's Small-Body Database cover?**

It covers all known asteroids and comets within the solar system. Identification and orbital data are included, while physical properties are selected data rather than a complete set of measurements for every object.

**How quickly do JPL orbital records change?**

JPL typically computes new small-body orbits within an hour or two after new discoveries or astrometric observations become available. That timing applies to orbital processing, not to publication of fireball detections.

**How far back and forward do the Earth close-approach tables extend?**

The published tables exclude dates before 1900 and after 2200. They also exclude encounters whose uncertainty is too large, so that date range does not guarantee a complete encounter history for every asteroid.

**What does Sentry's cumulative impact probability mean?**

It adds the probabilities of all detected potential impacts for an asteroid. An individual scenario's probability and the object's cumulative probability describe different quantities.

**Can a search change while I retrieve multiple pages?**

Yes. JPL explicitly warns that the SBDB database can change between calls used to page through search results.

