Nasa Images Scraper avatar

Nasa Images Scraper

Pricing

Pay per event

Go to Apify Store
Nasa Images Scraper

Nasa Images Scraper

Search and extract images from NASA's media library — space photos, descriptions, dates, and download links.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Search and extract NASA images, videos, and audio with full metadata from NASA's public media library of 140,000+ assets. Get high-resolution image URLs, descriptions, keywords, dates, and photographer information.

What does NASA Images Scraper do?

NASA Images Scraper uses NASA's official Images API to search and extract media assets with rich metadata. For each result, it returns the title, description, NASA ID, creation date, NASA center, keywords, photographer, and direct URLs to images at multiple resolutions.

The scraper supports images, videos, and audio content, with optional date range filtering.

Who is NASA Images Scraper for?

  • Content creators and bloggers looking for high-quality space imagery for articles and social media
  • Machine learning engineers building labeled image datasets for computer vision models
  • Educators and academics creating astronomy courses and science presentations
  • Journalists and media producers sourcing authentic NASA imagery for documentaries and publications
  • Data analysts studying NASA's visual documentation across decades of space missions
  • App developers integrating space imagery into educational or entertainment platforms

Why scrape NASA images?

NASA's media library is one of the world's most valuable public image collections. Use cases include:

  • Content creation — access high-quality space imagery for articles, presentations, and educational content
  • Dataset construction — build labeled image datasets for machine learning and computer vision
  • Research — gather space mission imagery and documentation for academic work
  • Educational platforms — populate astronomy and science courses with authentic NASA imagery
  • Media projects — find high-resolution photos for documentaries, exhibits, and publications
  • Archive analysis — study NASA's visual documentation across decades of missions

How much does it cost to scrape NASA images?

NASA Images Scraper uses pay-per-event pricing:

EventPrice
Run started$0.001
Media item extracted$0.001 per item

Example costs:

  • 20 Mars rover images: ~$0.021
  • 100 Hubble telescope photos: ~$0.101
  • 500 items across 5 search terms: ~$0.506

Platform costs are minimal — under $0.002 per typical run. NASA's API is free and requires no authentication.

Input parameters

ParameterTypeDescriptionDefault
searchQueriesstring[]Keywords to search in NASA's media libraryRequired
mediaTypestringFilter by type: image, video, audio, or all typesimage
yearStartintegerFilter results from this year onwards-
yearEndintegerFilter results up to this year-
maxResultsintegerMaximum media items per keyword (1–500)50

Input example

{
"searchQueries": ["mars rover", "hubble telescope"],
"mediaType": "image",
"maxResults": 20
}

Output example

Each media item is returned as a JSON object:

{
"nasaId": "PIA07081",
"title": "Mars Rover Studies Soil on Mars",
"description": "This image shows Spirit's first-ever look at the Martian terrain...",
"mediaType": "image",
"dateCreated": "2004-11-30T18:00:00Z",
"center": "JPL",
"keywords": ["Mars", "Mars Exploration Rover", "Spirit"],
"photographer": "",
"location": "Mars",
"thumbnailUrl": "https://images-assets.nasa.gov/image/PIA07081/PIA07081~thumb.jpg",
"imageUrls": [
"https://images-assets.nasa.gov/image/PIA07081/PIA07081~orig.jpg",
"https://images-assets.nasa.gov/image/PIA07081/PIA07081~large.jpg",
"https://images-assets.nasa.gov/image/PIA07081/PIA07081~medium.jpg"
],
"detailUrl": "https://images.nasa.gov/details/PIA07081",
"scrapedAt": "2026-03-03T04:28:00.000Z"
}

What data can you extract from NASA Images?

FieldTypeDescription
nasaIdstringNASA's unique media identifier
titlestringMedia title
descriptionstringFull description text
mediaTypestringType: image, video, or audio
dateCreatedstringOriginal creation/capture date
centerstringNASA center (JPL, GSFC, KSC, etc.)
keywordsstring[]Subject keywords/tags
photographerstringPhotographer or creator name
locationstringLocation where media was captured
thumbnailUrlstringURL to thumbnail image
imageUrlsstring[]URLs to media files at various resolutions
detailUrlstringLink to NASA Images detail page
scrapedAtstringISO timestamp when data was extracted

How to scrape NASA images

  1. Go to NASA Images Scraper on Apify Store.
  2. Enter one or more search keywords (e.g., "mars rover", "hubble telescope").
  3. Select a media type — image, video, audio, or all types.
  4. Optionally set year range filters to focus on specific missions or time periods.
  5. Set the maximum number of results per keyword (up to 500).
  6. Click Start and wait for the run to complete.
  7. Download your NASA images and metadata as JSON, CSV, or Excel.

Using the Apify API

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("automation-lab/nasa-images-scraper").call(run_input={
"searchQueries": ["james webb telescope"],
"mediaType": "image",
"maxResults": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"{item['title']}")
print(f" Date: {item['dateCreated'][:10]} | Center: {item['center']}")
print(f" Keywords: {', '.join(item['keywords'][:5])}")
if item['imageUrls']:
print(f" Image: {item['imageUrls'][0]}")

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/nasa-images-scraper').call({
searchQueries: ['james webb telescope'],
mediaType: 'image',
maxResults: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => {
console.log(`${item.title} (${item.dateCreated.slice(0, 10)})`);
console.log(` ${item.imageUrls[0] || item.thumbnailUrl}`);
});

REST API

curl -X POST "https://api.apify.com/v2/acts/automation-lab/nasa-images-scraper/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchQueries": ["mars rover"],
"mediaType": "image",
"maxResults": 20
}'

Integrations

Connect NASA Images Scraper to hundreds of apps:

  • Google Sheets — export image metadata to spreadsheets
  • Slack / Microsoft Teams — notifications when scraping completes
  • Zapier / Make — trigger workflows with NASA image data
  • Amazon S3 / Google Cloud Storage — store datasets and download images
  • Webhook — send results to your own API

Tips and best practices

  1. Use specific keywords — "Perseverance Mars 2021" returns more targeted results than just "Mars".
  2. Date filtering — use yearStart and yearEnd to focus on specific missions or time periods.
  3. Media types — search for video or audio to find NASA press conferences, launch footage, and mission audio.
  4. Multiple resolutions — the imageUrls field includes URLs from thumbnail to original resolution. Use the ~orig suffix URL for highest quality.
  5. NASA centers — filter results by center field: JPL (Jet Propulsion Lab), GSFC (Goddard), KSC (Kennedy), JSC (Johnson), etc.
  6. Keywords field — NASA's own subject tags are in the keywords array — useful for categorization and filtering.
  7. Public domain — most NASA images are in the public domain and free to use.

Use with AI agents via MCP

NASA Images Scraper is available as a tool for AI assistants via the Model Context Protocol (MCP).

Setup for Claude Code

$claude mcp add --transport http apify "https://mcp.apify.com"

Setup for Claude Desktop, Cursor, or VS Code

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com"
}
}
}

Example prompts

  • "Search NASA images for 'Mars rover'"
  • "Find NASA photos of the James Webb Space Telescope"

Learn more in the Apify MCP documentation.

Legality

Scraping publicly available data is generally legal according to the US Court of Appeals ruling (HiQ Labs v. LinkedIn). This actor only accesses publicly available information and does not require authentication. Always review and comply with the target website's Terms of Service before scraping. For personal data, ensure compliance with GDPR, CCPA, and other applicable privacy regulations.

FAQ

Q: Are NASA images free to use? A: Most NASA media is in the public domain and not copyrighted. However, some images (especially those with identifiable people) may have usage restrictions.

Q: How far back does the archive go? A: NASA's archive includes media from the 1920s to present day, covering the entire history of American space exploration.

Q: Can I download the actual images? A: Yes. The imageUrls field contains direct download links at multiple resolutions. The ~orig suffix URL provides the original full-resolution file.

Q: Does it need an API key? A: No. NASA's Images API is completely free and open -- no authentication required.

Q: Some image URLs return 404 errors — what's happening? A: NASA occasionally reorganizes their media assets or removes items. The thumbnailUrl is generally the most stable link. If a full-resolution URL fails, try a different resolution from the imageUrls array.

Q: Can I search for a specific NASA mission? A: Yes. Use mission names as search keywords (e.g., "Apollo 11", "Perseverance", "Artemis"). Combine with year filters for more targeted results.

NASA media is produced by the United States government and is generally in the public domain under NASA's Media Usage Guidelines. The scraper accesses NASA's official public API, which is free, open, and requires no authentication.

A few exceptions apply: images featuring identifiable individuals may be subject to privacy restrictions, and content from third-party partners (such as ESA or contractor imagery) may carry separate licensing. Always check the specific usage terms for each asset if you plan to use it commercially.

This scraper does not bypass any access controls or violate any terms of service. NASA actively encourages public use of its media library.

Other data scrapers on Apify