# Jpl Asteroid Close Approach Scraper (`kawsar/jpl-asteroid-close-approach-scraper`) Actor

Pull NEO close approaches from NASA JPL's public data service. Filter by distance and date, set item caps, and export clean JSON, CSV, or Excel datasets for asteroid monitoring and research.

- **URL**: https://apify.com/kawsar/jpl-asteroid-close-approach-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

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

## JPL Asteroid Close Approach Scraper

![JPL Asteroid Close Approach Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/jpl-asteroid-close-approach-scraper-cover.png)

Collect publicly available asteroid and comet close-approach data from NASA's Jet Propulsion Laboratory. Filter approaching objects by distance and date range, then export structured results in JSON, CSV, Excel, and other supported Apify formats.

### What it does

This actor collects Near-Earth Object (NEO) close-approach information and organizes each approach into a structured dataset row. Results include object designations, orbital references, approach dates, distances, relative velocities, and absolute magnitude values.

### Modes

- **Close approaches (`cad`):** Collect asteroid and comet close-approach records using a maximum distance and optional date range.

### Input example

```json
{
  "mode": "cad",
  "distMax": "0.05",
  "dateMin": "now",
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

**Date range example**

```json
{
  "mode": "cad",
  "distMax": "0.05",
  "dateMin": "2026-01-01",
  "dateMax": "2026-12-31",
  "maxItems": 100
}
```

### Output example

```json
{
  "des": "2026 TC6",
  "orbit_id": "4",
  "jd": "2461325.663066623",
  "cd": "2026-Oct-12 03:55",
  "dist": "0.0251354684055236",
  "dist_min": "0.0250366291814423",
  "dist_max": "0.0252343060504593",
  "v_rel": "10.2666469193225",
  "v_inf": "10.2563165631072",
  "t_sigma_f": "< 00:01",
  "h": "26.094",
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

The dataset includes the following key fields:

| Field | Description |
| --- | --- |
| `des` | Object designation. |
| `orbit_id` | Orbit identification reference. |
| `jd` | Julian date of the close approach. |
| `cd` | Close-approach date and time. |
| `dist` | Nominal approach distance. |
| `dist_min` | Minimum estimated approach distance. |
| `dist_max` | Maximum estimated approach distance. |
| `v_rel` | Relative velocity. |
| `v_inf` | Velocity at infinity. |
| `t_sigma_f` | Time uncertainty information. |
| `h` | Absolute magnitude. |
| `scrapedAt` | Collection timestamp in ISO format. |

### Use cases

- **Asteroid monitoring:** Track upcoming close approaches and changes in estimated distances.
- **Astronomical research:** Analyze NEO approach dates, velocities, and orbital information.
- **Scientific datasets:** Export close-approach records for further analysis and visualization.
- **Research dashboards:** Build monitoring tools using asteroid and comet approach information.
- **Historical analysis:** Compare close-approach records across selected date ranges.

### FAQ

**What type of objects does this actor collect?**

It collects close-approach records for Near-Earth Objects, including asteroids and comets.

**Can I filter results by distance?**

Yes. Use `distMax` to specify the maximum approach distance for the records you want to collect.

**Can I select a specific date range?**

Yes. Use `dateMin` and `dateMax` to define the beginning and end of your collection period. You can also use `now` as the starting date.

**What information is included in each result?**

Results include object designations, orbital references, approach dates, distance estimates, relative velocities, uncertainty information, and absolute magnitude.

**Can I schedule recurring collections?**

Yes. Configure Apify schedules to refresh your close-approach dataset automatically.

### Trademark Notice

NASA, JPL, and their associated names, logos, and trademarks belong to their respective owners. This actor is an independent data collection tool and does not imply affiliation, sponsorship, endorsement, or partnership with NASA or the Jet Propulsion Laboratory.

### Disclaimer

This actor is provided for independent research and data collection. Users should verify scientific information against authoritative sources before using it for research or operational decisions. Users are responsible for complying with applicable laws and source policies.

### Is Web Scraping Legal?

This actor collects publicly accessible astronomical close-approach information without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and the source website's policies.

- **Personal Data:** The collected dataset primarily contains astronomical measurements and object information rather than personal information. If additional personal data is included in any subsequent use, handle it responsibly and follow applicable privacy laws, including GDPR and CCPA where relevant.
- **Copyright and Licensing:** Scientific measurements and factual astronomical data may have different reuse conditions from reports, images, and other creative materials. Check NASA/JPL usage and attribution requirements before redistributing associated content.
- **Platform Terms and Rate Limits:** Respect NASA/JPL policies, applicable terms, attribution requirements, and reasonable request limits when collecting or using the data.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified legal professional if you need advice about a specific use case.

[Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

What to scrape.

## `distMax` (type: `string`):

Maximum approach distance in au (e.g. 0.05) or lunar distances (e.g. 10LD).

## `dateMin` (type: `string`):

Exclude approaches earlier than this date (YYYY-MM-DD) or now.

## `dateMax` (type: `string`):

Optional end date (YYYY-MM-DD), now, or +D days (e.g. +60). Leave blank for the API default.

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Polite pacing in milliseconds between API pages.

## `userAgent` (type: `string`):

Identify your scraper.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it. NASA JPL CAD is public and keyless.

## Actor input object example

```json
{
  "mode": "cad",
  "distMax": "0.05",
  "dateMin": "now",
  "dateMax": "+60",
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "kawsarActorResearch/1.0 (contact: hello@kawsar.com)",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Close-approach rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "distMax": "0.05",
    "dateMin": "now"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/jpl-asteroid-close-approach-scraper").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 = {
    "distMax": "0.05",
    "dateMin": "now",
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/jpl-asteroid-close-approach-scraper").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 '{
  "distMax": "0.05",
  "dateMin": "now"
}' |
apify call kawsar/jpl-asteroid-close-approach-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/jpl-asteroid-close-approach-scraper"
        }
    }
}
```

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/YeF9jvgu56Cf3ZH4a/builds/oZ3uqQfyirDZdbii8/openapi.json
