# NASA Media Scraper — Images, Videos & Metadata (`hipersoft/nasa-media-scraper`) Actor

Search NASA's Image and Video Library in bulk and export clean, structured metadata. Filter by keyword, media type (image, video, audio) and year range. One row per asset: title, description, date, center, keywords, thumbnail and best media link.

- **URL**: https://apify.com/hipersoft/nasa-media-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0005 / item scraped

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## NASA Media Scraper — Images, Videos & Metadata

NASA Media Scraper searches **NASA's Image and Video Library** and returns clean, structured data for every matching asset — **images, videos and audio** with full metadata. Search by keyword, narrow by media type and year range, and export the results to JSON, CSV, Excel or XML. Built for researchers, educators, content teams, media libraries and automation workflows that need NASA imagery and metadata at scale.

### What does this NASA scraper do?

Type a search term, set a couple of optional filters, and it returns one clean row per asset:

- **Search** across titles, descriptions and keywords — e.g. `apollo 11`, `mars rover`, `nebula` or `earth from space`.
- **Filter by media type** — images, videos or audio, or leave it open to get all three.
- **Filter by year range** — restrict results to assets created between two years.
- **Paginate automatically** — the actor walks through result pages until it reaches your item limit.

### What data can you get?

| Field | Description |
| --- | --- |
| `nasaId` | Unique NASA identifier for the asset. |
| `title` | Title of the image, video or audio clip. |
| `description` | Full caption / description text. |
| `mediaType` | `image`, `video` or `audio`. |
| `dateCreated` | When the asset was created. |
| `center` | The NASA center credited (e.g. JSC, KSC, JPL). |
| `keywords` | List of subject keywords. |
| `photographer` | Photographer or creator, when credited. |
| `thumbnailUrl` | Direct link to a preview thumbnail. |
| `assetUrl` | Best available media link (full-resolution image, video or audio file). |
| `url` | Public NASA library page for the asset. |

### What you get

Each asset is one clean dataset record. Export the full table to JSON, CSV, Excel or XML, or pull it programmatically through the Apify API.

```json
{
  "nasaId": "jsc2007e034221",
  "title": "Apollo 11 spacecraft pre-launch",
  "description": "Personnel atop the 402-ft. Mobile Service Structure look back at the Apollo 11 spacecraft as the tower is moved away during a Countdown Demonstration Test.",
  "mediaType": "image",
  "dateCreated": "1969-07-11T00:00:00Z",
  "center": "JSC",
  "keywords": ["Apollo", "Apollo 11", "Launch"],
  "photographer": null,
  "thumbnailUrl": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~medium.jpg",
  "assetUrl": "https://images-assets.nasa.gov/image/jsc2007e034221/jsc2007e034221~orig.jpg",
  "url": "https://images.nasa.gov/details/jsc2007e034221"
}
```

### Use cases

- Build a searchable NASA image or video gallery for a website or app.
- Source high-resolution space imagery for articles, videos and presentations.
- Assemble teaching materials and datasets for classrooms and research.
- Feed NASA thumbnails and metadata into a media or asset dashboard.
- Automate space-content pipelines that pull fresh imagery on a schedule.

### How to use the NASA Media Scraper

1. Add the NASA Media Scraper to your Apify account and open its input.
2. Enter a **search query** (the only required field).
3. Optionally pick a **media type** and a **year range**.
4. Set **Max items** to control how many assets you pull.
5. Click **Run**, then export the results as JSON, CSV, Excel or XML — or fetch them via the Apify API.

### Input

```json
{
  "query": "apollo 11",
  "mediaType": "image",
  "maxItems": 100
}
```

| Field | Description |
| --- | --- |
| `query` | Search term across titles, descriptions and keywords. Required. |
| `mediaType` | `image`, `video`, `audio`, or leave empty for all types. |
| `yearStart` | Only include assets created in or after this year. Optional. |
| `yearEnd` | Only include assets created in or before this year. Optional. |
| `maxItems` | Maximum number of assets to return. |

### FAQ

**What media does the library cover?**
Photos, videos and audio spanning decades of NASA missions, spacecraft, astronauts, planets and deep-space imagery, credited to centers such as JSC, KSC and JPL.

**Can I get full-resolution files?**
Yes. Each row includes a `thumbnailUrl` for previews and an `assetUrl` that points to the best available full-resolution image, video or audio file.

**How do I narrow my results?**
Combine a keyword with a media type and a year range. Lower the **Max items** limit for quick, cheap test runs and raise it to pull a large set.

**What export formats are supported?**
JSON, CSV, Excel and XML, plus programmatic access through the Apify API.

**How does billing work?**
You pay per item you get, so cost scales with the number of assets you actually collect. See the **Pricing** tab for current rates.

**Can I use this with n8n?**
Yes. Run the NASA Media Scraper from [n8n](https://n8n.io) with the Apify node — trigger a run, pass your `query` and filters, and read the dataset items straight into your workflow. It also works with Make, Zapier and the Apify API.

**Can I connect this to other tools?**
The NASA Media Scraper connects with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

### Notes

Original clean-room implementation. Reads only publicly available media and metadata. Not affiliated with, endorsed by or connected to NASA. NASA content is generally free to use; review NASA's media usage guidelines before republishing.

# Actor input Schema

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

Free-text search across NASA's media library — titles, descriptions and keywords. For example "apollo 11", "mars rover", "nebula" or "earth from space". This is the only required field.

## `mediaType` (type: `string`):

Restrict results to a single media type. Leave as "Any" to return images, videos and audio together.

## `yearStart` (type: `string`):

Optional. Only include assets created in or after this year, e.g. "1969". Leave empty for no lower bound.

## `yearEnd` (type: `string`):

Optional. Only include assets created in or before this year, e.g. "1972". Leave empty for no upper bound.

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

Maximum number of media assets to return. Keep it low for fast, cheap test runs; raise it to pull a large result set. Results are paged automatically until this limit is reached.

## Actor input object example

```json
{
  "query": "apollo 11",
  "mediaType": "",
  "yearStart": "1969",
  "yearEnd": "1972",
  "maxItems": 100
}
```

# Actor output Schema

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

The results as dataset items.

# 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": "apollo 11",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/nasa-media-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": "apollo 11",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/nasa-media-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": "apollo 11",
  "maxItems": 100
}' |
apify call hipersoft/nasa-media-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/nasa-media-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/1x9iwYHDCCQ0iPZaV/builds/fNTWCHekd3YFMN7Zh/openapi.json
