# Nasa Exoplanet Archive Scraper (`bigibyte/nasa-exoplanet-archive-scraper`) Actor

Extract exoplanet data from the NASA Exoplanet Archive. Enter an ADQL query and set a row limit to collect planet names, host stars, discovery years, and custom catalog fields. Export clean, deduplicated datasets in JSON, CSV, or Excel.

- **URL**: https://apify.com/bigibyte/nasa-exoplanet-archive-scraper.md
- **Developed by:** [BigiByte](https://apify.com/bigibyte) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## NASA Exoplanet Archive Scraper

![NASA Exoplanet Archive Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/nasa-exoplanet-archive-scraper-cover.png)

The **NASA Exoplanet Archive Scraper** helps you collect exoplanet catalog data from NASA's public Exoplanet Archive. Write an ADQL query to retrieve planet names, host stars, discovery years, and other available scientific fields. Export structured results as JSON, CSV, Excel, or other supported dataset formats.

### What This Actor Does

This actor runs your ADQL query against the NASA Exoplanet Archive and returns matching records in a structured dataset.

You can query tables such as `ps` and `pscomppars`, select the fields you need, and apply conditions to narrow your results. The actor handles result retrieval, duplicate prevention, request pacing, and retry attempts automatically.

### Available Mode

| Mode | Description |
|---|---|
| `tap` | Runs an ADQL query against the NASA Exoplanet Archive and collects matching records. |

### Input Example

```json
{
  "mode": "tap",
  "query": "select top 100 pl_name,hostname,disc_year from ps",
  "maxItems": 50
}
```

#### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `tap` | Collection mode. Currently, only `tap` is supported. |
| `query` | string | `select top 100 pl_name,hostname,disc_year from ps` | ADQL query used to retrieve exoplanet records. |
| `maxItems` | integer | `100` | Maximum number of successful records per run. Hard maximum: 1,000. |
| `userAgent` | string | `BigiByteActorResearch/1.0 (contact: hello@bigibyte.com)` | User-Agent value used for requests. |
| `timeoutSecs` | integer | `300` | Maximum overall run duration in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout for an individual request in seconds. |
| `proxyConfiguration` | object | Disabled | Optional proxy configuration. A proxy is not required for typical runs. |

### What Data Does This Actor Extract?

The actor preserves the columns returned by your ADQL query. For example, a query selecting `pl_name`, `hostname`, and `disc_year` may produce:

```json
{
  "pl_name": "WASP-39 b",
  "hostname": "WASP-39",
  "disc_year": 2011,
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

#### Common Output Fields

| Field | Type | Description |
|---|---|---|
| `pl_name` | string | Planet name. Used as the primary deduplication field when available. |
| `hostname` | string | Name of the host star, when selected in the query. |
| `disc_year` | integer | Planet discovery year, when selected in the query. |
| `scrapedAt` | string | UTC timestamp indicating when the record was collected. |

### Use Cases

- **Exoplanet Catalog Research:** Collect planet names, host stars, discovery years, and other available catalog information.
- **Filtered Data Collection:** Use ADQL conditions to retrieve specific groups of exoplanets, such as planets discovered after a particular year.
- **Astronomy Research:** Prepare structured exoplanet datasets for scientific analysis, notebooks, and research projects.
- **Educational Projects:** Access real exoplanet catalog records for astronomy lessons, demonstrations, and student exercises.
- **Scheduled Data Refresh:** Run recurring queries to maintain an updated local copy of selected archive fields.
- **Data Pipeline Integration:** Export results for spreadsheets, business intelligence tools, databases, and custom analysis workflows.

### Usage and Limits

- The actor supports the `tap` mode for ADQL-based searches.
- Common query tables include `ps` and `pscomppars`.
- You can use standard ADQL query syntax to select columns and filter records.
- Result retrieval uses ADQL `TOP N` and keyset filtering on `pl_name` where needed. This service does not support TAP `OFFSET` pagination.
- Records are deduplicated using `pl_name` when available.
- Requests are paced at approximately one request per second, with concurrency around one to two requests.
- The archive is publicly accessible. Review NASA Exoplanet Archive's acknowledgment and data-use guidance when using its records in research or publications.

### FAQ

**Which tables can I query?**

Common tables include `ps` and `pscomppars`. You can also explore the archive's table metadata through `TAP_SCHEMA.tables`.

**Can I choose which fields to collect?**

Yes. Include the column names you need in your ADQL `SELECT` statement. Additional selected columns are preserved in the output.

**Can I filter exoplanets by discovery year?**

Yes. Use an ADQL `WHERE` condition to filter records.

**Can I schedule recurring queries?**

Yes. Use Apify Schedules to run your saved ADQL queries automatically at your preferred intervals.

### Integrations

Connect the NASA Exoplanet Archive Scraper with other applications through [Apify Integrations](https://apify.com/integrations). Send collected records to tools such as Google Sheets, Make, Zapier, Slack, and other supported services. You can also use [Apify Webhooks](https://docs.apify.com/integrations/webhooks) to trigger workflows when a run finishes.

Looking for a solution tailored to your data collection requirements? **BigiByte** builds custom web scrapers, data extraction tools, and automation solutions to help researchers and businesses collect and organize the information they need.

Visit [BigiByte](https://bigibyte.com) to explore our services.

### Trademark Notice

NASA, NASA Exoplanet Archive, and related names, logos, and trademarks belong to their respective owners. They are referenced here only to identify the source of the information. This actor is not affiliated with, sponsored by, or endorsed by NASA or the NASA Exoplanet Archive.

### Disclaimer

The NASA Exoplanet Archive Scraper is an independent data collection tool. Users are responsible for reviewing applicable data-use, acknowledgment, attribution, and licensing requirements before using or redistributing collected information.

### Is Web Scraping Legal?

This actor extracts publicly accessible information without bypassing login screens, paywalls, or technical security layers. While collecting public web data is widely permitted, compliance depends on how data is gathered and used:

- **Personal Data:** Follow applicable privacy regulations, including GDPR and CCPA, when collecting or processing personal information.
- **Copyrighted Content:** Respect copyright protections and licensing conditions when reusing collected material.
- **Platform Terms and Rate Limits:** Review the source's terms and follow its access rules and reasonable request limits.

NASA Exoplanet Archive data may have specific acknowledgment and reuse requirements. Review the applicable guidance before redistributing or publishing results.

This information is provided for general guidance only and does not constitute legal advice. For more information, read Apify's guide: [Is Web Scraping Legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

What to scrape

## `query` (type: `string`):

ADQL query against NASA Exoplanet Archive TAP tables such as ps or pscomppars.

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

Free cap; hard limit 1000

## `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. Public TAP works without a proxy; enable only if you need it.

## Actor input object example

```json
{
  "mode": "tap",
  "query": "select top 50 pl_name,hostname,disc_year from ps where disc_year > 2015",
  "maxItems": 100,
  "userAgent": "BigiByteActorResearch/1.0 (contact: hello@bigibyte.com)",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Planet 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 = {
    "query": "select top 100 pl_name,hostname,disc_year from ps"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/nasa-exoplanet-archive-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 = { "query": "select top 100 pl_name,hostname,disc_year from ps" }

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/nasa-exoplanet-archive-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 '{
  "query": "select top 100 pl_name,hostname,disc_year from ps"
}' |
apify call bigibyte/nasa-exoplanet-archive-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigibyte/nasa-exoplanet-archive-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/pTKZ0QKuUhz4DL5I7/builds/306EJWQdbo9ejIxQ4/openapi.json
