# Asteroid Close Approaches, Fireballs & Impact Risk (NASA) (`datacrate/space-close-approach-feed`) Actor

Upcoming asteroid close approaches to Earth, fireball events and Sentry impact-risk objects from NASA/JPL, plus an optional NASA NEO feed, as clean rows. Delta mode for new or revised events.

- **URL**: https://apify.com/datacrate/space-close-approach-feed.md
- **Developed by:** [Data Crate](https://apify.com/datacrate) (community)
- **Categories:** News, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 space event returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Asteroid Close Approaches, Fireballs & Impact Risk (NASA)

**Get upcoming asteroid close approaches to Earth, recent fireball events and the NASA Sentry impact-risk list as clean flat rows, from NASA/JPL's free public APIs.** Add the optional NASA NEO feed (NeoWs) with your own free API key. Delta mode returns only new or revised events when you run it on a schedule, so it works as an alert feed for newsletters, dashboards, prediction-market research, education sites and AI agents.

**First run cost:** the default run returns up to 15 rows for about **$0.015** at **$0.001 per result** (the first seconds of compute are covered by Apify). 1,000 rows cost about **$1.00**, less on higher Apify plans.

### Who it is for

- **Space and science writers, newsletters, planetariums and educators** who want "what passes close to Earth this month" without hand-parsing JPL tables.
- **Dashboards, bots and alert tools** that need a daily feed of new close approaches, new fireballs or changed impact-probability entries.
- **Researchers and prediction-market analysts** who track close-approach distance, size and Palermo/Torino risk values over time.
- **Developers and AI agents** that need one reliable call for NASA near-Earth object data.

### What you get

Four row types in one dataset (`recordType`):

| recordType | What it is | Main fields |
|---|---|---|
| `close-approach` | Upcoming (or past, by date window) pass of an asteroid or comet near Earth | `name`, `eventTime`, `distanceAu`, `distanceLunar`, `distanceKm`, `relativeVelocityKmS`, `absoluteMagnitudeH`, `diameterKm` (when known), `estimatedDiameterM` |
| `fireball` | Bright atmospheric impact event detected by US government sensors | `eventTime`, `impactEnergyKt`, `radiatedEnergyJoules`, `latitude`, `longitude`, `altitudeKm`, `relativeVelocityKmS` (location fields can be empty) |
| `sentry-impact-risk` | Object on NASA's Sentry list (non-zero impact probability), sorted highest risk first | `impactProbability`, `palermoScaleCumulative`, `palermoScaleMax`, `torinoScaleMax`, `potentialImpacts`, `impactYearRange`, `diameterKm`, `lastObservation` |
| `neo-feed` (optional) | Entries from NASA's NeoWs daily feed | `neoId`, distances, speed, `diameterMinM`, `diameterMaxM`, `isPotentiallyHazardous`, `isSentryObject` |

Every row also has `id`, `name`, `changeType` (delta mode), `source`, `sourceUrl` (link to the NASA/JPL page for that object or dataset), `attribution` and `checkedAt`. Times are UTC ISO strings. Close-approach times are JPL's minute-resolution values (`timeUncertainty` gives the 3-sigma window). `estimatedDiameterM` is a rough size estimate from absolute magnitude assuming a 0.14 albedo, only a ballpark.

### Input

| Field | Meaning |
|---|---|
| `sources` | `closeApproaches`, `fireballs`, `sentry`, `neoFeed` (default: the first three) |
| `daysAhead` | close approaches: days from today (default 30) |
| `maxDistanceLunar` | close approaches: max distance in lunar distances (default 20; the Moon is 1) |
| `onlyPotentiallyHazardous`, `maxAbsoluteMagnitude` | close-approach filters (potentially hazardous asteroids only; size filter, lower H = bigger) |
| `fireballDays`, `fireballMinImpactKt` | fireballs: history window (default 365 days) and optional minimum impact energy |
| `sentryMinPalermoScale` | Sentry: optional minimum cumulative Palermo scale, for example `-4` |
| `nasaApiKey` | optional, NEO feed only (stored as a secret). Free key at api.nasa.gov. Without it the shared `DEMO_KEY` is used, which allows only a few calls per hour |
| `neoFeedDays` | NEO feed: days from today, 1 to 7 (default 3) |
| `maxItems` | cap on rows and cost (default 15). With several sources the rows are shared evenly across them |
| `onlyNewSinceLastRun`, `stateKey` | delta mode, one watchlist per state name |

Default (prefill) input, also used when you run with empty input:

```json
{ "sources": ["closeApproaches", "fireballs", "sentry"], "daysAhead": 30, "maxDistanceLunar": 20, "fireballDays": 365, "maxItems": 15 }
```

Daily alert feed of new close passes within 10 lunar distances:

```json
{ "sources": ["closeApproaches"], "daysAhead": 14, "maxDistanceLunar": 10, "onlyNewSinceLastRun": true, "stateKey": "daily", "maxItems": 500 }
```

### Sample output (real data, trimmed, 2026-11-23)

Close approach:

```json
{
  "recordType": "close-approach",
  "name": "2026 WD",
  "eventTime": "2026-11-23T18:13:00.000Z",
  "distanceAu": 0.0114084,
  "distanceLunar": 4.4398,
  "distanceKm": 1706668,
  "relativeVelocityKmS": 13.926,
  "absoluteMagnitudeH": 26.896,
  "estimatedDiameterM": 14.8,
  "timeUncertainty": "00:06",
  "source": "NASA/JPL SBDB Close Approach Data API",
  "sourceUrl": "https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2026%20WD"
}
```

Fireball:

```json
{
  "recordType": "fireball",
  "eventTime": "2026-10-04T03:14:45.000Z",
  "impactEnergyKt": 0.18,
  "radiatedEnergyJoules": 54000000000,
  "latitude": -41.8,
  "longitude": -173.1,
  "altitudeKm": 26.9,
  "relativeVelocityKmS": 13.8,
  "sourceUrl": "https://cneos.jpl.nasa.gov/fireballs/"
}
```

Sentry impact-risk:

```json
{
  "recordType": "sentry-impact-risk",
  "name": "29075 (1950 DA)",
  "diameterKm": 1.3,
  "impactProbability": 0.0003401,
  "palermoScaleCumulative": -0.98,
  "potentialImpacts": 1,
  "impactYearRange": "2880-2880",
  "lastObservation": "2026-11-05",
  "sourceUrl": "https://cneos.jpl.nasa.gov/sentry/details.html#?des=29075"
}
```

### FAQ

**Is anything here a real impact warning?** No. This is a data feed of public NASA/JPL data. Close approaches are routine; the Sentry list shows long-term statistical probabilities, mostly tiny, and objects are removed as orbits improve. For official statements follow NASA's Planetary Defense Coordination Office (cneos.jpl.nasa.gov).

**Does it need an API key?** No. The JPL APIs are open. Only the optional NEO feed source uses NASA's api.nasa.gov, where the shared `DEMO_KEY` is heavily rate-limited; add your own free key in `nasaApiKey` for reliable use. If the NEO feed fails, the other sources still return.

**How fresh is the data?** JPL updates close-approach and Sentry data as new observations arrive (often daily). Fireball events are added after detection by US government sensors, with a delay of days to weeks.

**Why do I get rows from all three sources with a small `maxItems`?** Rows are shared out evenly across the chosen sources. Raise `maxItems` or select one source for more of a kind.

**Delta mode?** With `onlyNewSinceLastRun` a row is returned again only if it is new, or if its time, distance, speed or (Sentry) risk values changed. `changeType` says which. Rows that did not fit under `maxItems` stay "new" for the next run.

**What do `diameterKm` and `estimatedDiameterM` mean?** `diameterKm` is the measured or catalogued diameter where JPL has one, otherwise empty. `estimatedDiameterM` is a rough size from absolute magnitude H, only a ballpark.

**Do the rows contain personal data?** No. Everything is astronomical data.

### Data source, license and attribution

- JPL SSD/CNEOS APIs: `ssd-api.jpl.nasa.gov` (Close Approach Data, Fireball Data, Sentry) and, optionally, NASA's NeoWs at `api.nasa.gov`.
- NASA says its content, "generally not subject to copyright in the United States" (NASA media usage guidelines, nasa.gov brand center). Every row carries a source credit. Please keep the attribution when you republish.
- `ssd-api.jpl.nasa.gov/robots.txt` and `api.nasa.gov/robots.txt` return 404, so no crawl rules are published; `www.nasa.gov/robots.txt` allows all. The actor makes only a handful of API calls per run, identifies itself with the User-Agent `DataCrate-Apify/1.0`, and retries with backoff.
- This actor is independent and is not affiliated with, endorsed or sponsored by NASA or JPL. No NASA logos are used.

### Integrations

Schedule it daily, send new close approaches to Slack, email, Telegram, Discord, Google Sheets or Notion through a webhook, or call it from an AI agent through the Apify MCP server. Export JSON, CSV or Excel.

### Pricing

Pay per result: **$0.001 per row** (volume tiers on higher Apify plans), plus Apify's usual start event. Only rows returned are billed; `maxItems` caps the bill. Unchanged rows skipped by delta mode are not billed.

### Changelog

- 1.0: first release (close approaches, fireballs, Sentry, optional NEO feed, delta mode).

# Actor input Schema

## `sources` (type: `array`):

Which NASA/JPL datasets to return. closeApproaches = upcoming asteroid and comet passes near Earth, fireballs = bright atmospheric impact events, sentry = objects with a non-zero Earth impact probability, neoFeed = NASA's NeoWs daily feed (optional, uses the API key below).

## `daysAhead` (type: `integer`):

Look this many days into the future, starting today (UTC).

## `maxDistanceLunar` (type: `number`):

Only passes closer than this. 1 lunar distance (LD) is about 384,400 km. 20 LD is a good 'close pass' threshold; the Moon is 1 LD.

## `onlyPotentiallyHazardous` (type: `boolean`):

Restrict to objects NASA classes as potentially hazardous (PHAs).

## `maxAbsoluteMagnitude` (type: `number`):

Optional size filter. Lower H means a bigger object (H 22 is roughly 140 m or larger). Leave empty for everything.

## `fireballDays` (type: `integer`):

Return fireball events detected in the last N days.

## `fireballMinImpactKt` (type: `number`):

Optional. Skip small events. 0.1 kt is about 100 tons of TNT.

## `sentryMinPalermoScale` (type: `number`):

Optional. Keep only objects at or above this cumulative Palermo scale value (for example -4). Rows are sorted from highest risk to lowest. Leave empty for the full list.

## `nasaApiKey` (type: `string`):

Only used for the NASA NEO feed source. Without a key the shared DEMO_KEY is used, which allows only a few calls per hour. Get a free key at api.nasa.gov. Stored as a secret.

## `neoFeedDays` (type: `integer`):

NASA NEO feed only: how many days from today (1 to 7).

## `maxItems` (type: `integer`):

Upper bound on rows (and on cost). With several sources the rows are shared out evenly across them.

## `onlyNewSinceLastRun` (type: `boolean`):

Skip rows already returned by an earlier run with the same state name and unchanged since. The first run returns everything and sets the baseline. Each row gets changeType new or revised.

## `stateKey` (type: `string`):

Use different names to keep separate watchlists.

## Actor input object example

```json
{
  "sources": [
    "closeApproaches",
    "fireballs",
    "sentry"
  ],
  "daysAhead": 30,
  "maxDistanceLunar": 20,
  "onlyPotentiallyHazardous": false,
  "fireballDays": 365,
  "neoFeedDays": 3,
  "maxItems": 15,
  "onlyNewSinceLastRun": false,
  "stateKey": "default"
}
```

# Actor output Schema

## `results` (type: `string`):

One row per close approach, fireball, Sentry impact-risk object or NEO feed entry, with distance, speed, size, time and source link.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sources": [
        "closeApproaches",
        "fireballs",
        "sentry"
    ],
    "daysAhead": 30,
    "maxDistanceLunar": 20,
    "fireballDays": 365,
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacrate/space-close-approach-feed").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sources": [
        "closeApproaches",
        "fireballs",
        "sentry",
    ],
    "daysAhead": 30,
    "maxDistanceLunar": 20,
    "fireballDays": 365,
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("datacrate/space-close-approach-feed").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sources": [
    "closeApproaches",
    "fireballs",
    "sentry"
  ],
  "daysAhead": 30,
  "maxDistanceLunar": 20,
  "fireballDays": 365,
  "maxItems": 15
}' |
apify call datacrate/space-close-approach-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datacrate/space-close-approach-feed"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GKReIFBKA2iaMk8bt/builds/NkndwMeUhmyBu4pMI/openapi.json
