Nasa Images Scraper avatar

Nasa Images Scraper

Pricing

Pay per event

Go to Apify Store
Nasa Images Scraper

Nasa Images Scraper

Search and extract NASA images, videos, and audio with full metadata from NASA's media library of 140,000+ assets.

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

14 hours 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.

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?

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"
}

Output fields

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 use the NASA Images 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.

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.