News & feeds · AI & LLM data
NASA APOD Scraper
Fetch NASA's Astronomy Picture of the Day for any date or date range via the NASA APOD API — title, explanation, image / video URL, HD URL, copyright, media type, date — export to JSON or CSV. A NASA APOD API wrapper; no key needed for small volumes.
Free Apify credit covers a first run. No credit card to try.
What this Actor scrapes
NASA's Astronomy Picture of the Day (apod.nasa.gov) has been publishing one space image or video per day since 1995 — over 10,000 beautifully captioned entries spanning galaxies, nebulae, rocket launches, and solar phenomena. This Actor wraps the official NASA APOD API (api.nasa.gov/planetary/apod), supports single-date, date-range, and random-pick modes, and delivers one clean structured row per entry.
The archive is free to access but bulk historical exports still need throttling, retry logic, and clean schema handling across 30 years of format variation (video days, absent copyright fields, HD URL gaps). We absorb all of that so you get consistent rows every time.
What we handle for you
- 🛡️ Browser fingerprint rotation —
curl-cffiimpersonates real Chrome / Firefox / Safari TLS handshakes so the target sees a browser, not a Python script. - 🌐 Residential proxy rotation via Apify Proxy — fresh session and exit IP whenever the target pushes back.
- 🔁 Retries with exponential backoff on
408 / 429 / 5xx— up to 5 attempts per request,Retry-Afterhonoured. - 🧱 Rate-limit-aware pacing — when the API throttles us, we slow down and keep going rather than crashing out.
- 🧊 Clean, typed dataset rows — Pydantic-validated, ISO-8601 timestamps, stable IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 Pay-Per-Event pricing — you only pay for results that land in your dataset. No data, no charge.
- 🎞️ Video-day handling —
media_typefield distinguishes images from YouTube / Vimeo embeds;thumbnail_urlincluded when NASA provides it. - 📅 Full archive support — date range mode lets you pull the entire astronomy image archive in one run; earliest entry is 1995-06-16.
Use cases
- Multimodal RAG dataset — bulk-export the APOD archive as image-caption pairs to build or evaluate a vision-LLM retrieval pipeline.
- Daily space photo widget — run on a schedule, pull today's entry, push to your iOS / Android / desktop wallpaper service or Telegram bot.
- Astronomy lesson app — backfill 10+ years of entries into a CMS, pair captions with AI-generated quiz questions.
- Generative art seeds — feed APOD images and captions into a multimodal model or Stable Diffusion workflow.
- Print-on-demand posters — harvest HD image URLs from the nasa images dataset and generate high-resolution wall art.
- Newsletter automation — scheduled daily pull delivers title, explanation, and image URL to your email or Slack.
Input
Paste this into the Apify Console, or send it as the run input over the API. Proxy settings are on by default; you rarely need to touch them.
| Field | Type | Required | What it does |
|---|---|---|---|
mode | string | no | How to choose APODs. |
date | string | no | ISO date (YYYY-MM-DD). The earliest APOD is 1995-06-16. |
startDate | string | no | ISO date (YYYY-MM-DD). Range inclusive on both ends. |
endDate | string | no | ISO date (YYYY-MM-DD). |
count | integer | no | How many random APODs. |
apiKey | string | no | Get one at api.nasa.gov. Without one we use DEMO_KEY (30 req/hour, 50 req/day). |
thumbsForVideos | boolean | no | Adds `thumbnail_url` for video APODs (YouTube/Vimeo). |
{
"mode": "range",
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"thumbsForVideos": true,
"proxyConfiguration": {
"useApifyProxy": true
}
} Output
One row per result, schema-validated before it is written. Export JSON, CSV, Excel or XML from the run, or read it over the API.
datetitleexplanationurlhdurlthumbnail_urlmedia_typecopyrightservice_versionapod_urlscraped_at
{
"date": "2026-05-15",
"title": "Spiral Galaxy NGC 1232",
"explanation": "One of the most photogenic galaxies in the southern sky...",
"media_type": "image",
"url": "https://apod.nasa.gov/apod/image/2605/NGC1232.jpg",
"hdurl": "https://apod.nasa.gov/apod/image/2605/NGC1232_full.jpg",
"copyright": "ESO; J. Spyromilio",
"apod_url": "https://apod.nasa.gov/apod/ap260515.html",
"scraped_at": "2026-05-15T09:12:34Z"
} Pricing
| Event | Price | When |
|---|---|---|
| Actor start | $0.20 | Once per run, covers warm-up and proxy session setup. |
| Result emitted | $0.0015 | Per result written to the dataset. |
You pay only for results that land. Cap any run with maxTotalChargeUsd. See pricing & billing for worked examples.
Limitations
- The APOD archive contains one entry per day since 1995-06-16, giving roughly 11,000 total entries. It is not a million-image dataset — pitch it as a curated multimodal-RAG corpus or fine-tuning seed, not as a large-scale training set.
- We surface image and HD URLs as-is from NASA's API. We do not proxy or cache images ourselves — the buyer is responsible for downloading from the target host.
thumbnail_urlis available only for video entries where NASA includes it; not all video APODs carry a thumbnail.- A small share of APOD entries feature imagery by external photographers who retain their own copyright. The
copyrightfield is present on every row — downstream use must respect it.
FAQ
Do I need a NASA API key?
DEMO_KEY lets you fetch a handful of entries to verify the data shape. For bulk astronomy image archive exports or scheduled daily runs, register a free personal key at api.nasa.gov — it raises the per-hour cap significantly and avoids sharing quota with other users of the demo key.What is the astronomy picture of the day API and how does this Actor wrap it?
api.nasa.gov/planetary/apod — the official astronomy picture of the day API. This Actor calls that endpoint, handles pagination for date ranges, manages rate-limit retries, normalises the response schema across 30 years of format variation, and writes Pydantic-validated rows to an Apify dataset. You get a clean, queryable table without touching the raw API.Can I use this as a multimodal RAG dataset?
Why do some rows have `media_type: video`?
url field points to YouTube or Vimeo; thumbnail_url contains the video thumbnail when NASA provides it. Filter media_type == "image" if you need images-only.What is the earliest APOD entry?
Can I bulk-download the actual image files?
Ready to run it?
Open the listing on Apify, paste the input above, and watch rows land. If it ever breaks, it is our problem before it is yours.
Related Actors