Spiral gives your agent every tool with one account. Browse the tools →

n8n · Public Records

How to Use JPL asteroid close approaches in n8n

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.

Prompts to try with JPL asteroid close approaches in n8n

Copy an example into n8n, or ask in your own words.

Every Monday, use JPL asteroid close approaches to list Earth's predicted encounters over the next seven days and highlight changed distances for previously listed objects.

JPL asteroid close approachesn8n
Try asking
  • Every Monday at 9am: 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 n8n

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

Use the Spiral skill

  1. Send n8n 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 Spiral's MCP server

  1. Create a key

    Create a key under API keys in the console.

  2. Add an MCP Client node

    In a workflow, add an MCP Client node (or, under an AI Agent node, an MCP Client Tool) and set:

    https://api.spiral.ai/mcp
  3. Pick a tool

    The node lists Spiral's tools. In an MCP Client node pick one, such as run, and give it its arguments:

    {
      "provider": "fal",
      "model": "fal-ai/flux/schnell",
      "input": { "prompt": "a lighthouse at dawn" },
      "wait": true
    }
  4. Run JPL asteroid close approaches in a workflow step

    Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds JPL asteroid close approaches, prices it and runs it each time the step fires.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    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.

    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: n8n finds JPL asteroid close approaches on Spiral, shows the price and runs it.

JPL asteroid close approaches providers and prices

Spiral runs JPL asteroid close approaches through Alexandria. Open a card for today's price, with every fee included.

AlexandriaPublic Records
JPL Small-Body and CNEOS Data · Close approaches
ssd-api-jpl-nasa-gov/small-bodies/close_approaches

Settings you can ask for

Ask n8n for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Bodyearth, moon, mercury, venus, mars, jupiter, saturn, uranus and 3 more

Body approached (default earth).

Sortdate, -date, dist, -dist, v_rel, -v_rel, h, or -hdate

Sort key; prefix - for descending.

H maxa number

Only objects with H at most this (larger objects; H 22 is roughly 140 m).

H mina number

Only objects with H at least this (smaller objects).

Limit1 to 20050

Approaches per page.

Pha onlyon or off

Only potentially hazardous asteroids.

Max distance aua number

Maximum nominal distance in au (default 0.05, or 0.2 with a designation).

Max distance lda number

Maximum nominal distance in lunar distances, instead of max_distance_au.

Min distance aua number

Minimum nominal distance in au.

Every API field of JPL Small-Body and CNEOS Data · Close approaches is on its tool page: open its card above.

What can you do with JPL asteroid close approaches in n8n?

Produce recurring JPL briefs that highlight changes in returned astronomy records. Compare successive results for encounter predictions, Sentry assessments, object properties, or reported fireballs.

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.

Questions about JPL asteroid close approaches in n8n

Can n8n use JPL asteroid close approaches?

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

How much does JPL asteroid close approaches cost in n8n?

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

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

You need no Alexandria account. n8n uses one Spiral API key for every tool, and Spiral runs JPL asteroid close approaches on its own Alexandria account.

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

About two minutes: create a key, then add an MCP Client node, then pick a tool.

Does n8n wait while JPL asteroid close approaches runs?

JPL asteroid close approaches runs in the background. n8n 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.

Get started

Start using JPL asteroid close approaches in n8n

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into n8n:

Set up n8n

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options