NASA EPIC API
Free NASA EPIC API: full-disc Earth photographs taken daily from the DSCOVR satellite a million miles away, with coordinates and metadata. Tested example.
Endpoint tested and returned HTTP 200 on 2026-08-20
What is the NASA EPIC API?
NASA's EPIC (Earth Polychromatic Imaging Camera) API provides daily full-disc photographs of Earth taken from the DSCOVR satellite at the L1 Lagrange point, roughly one million miles away, with capture time and positional metadata.
EPIC produces the images that show the entire sunlit face of Earth in a single frame — something only possible from L1, where the satellite sits between Earth and the Sun. Several images are captured each day as the planet rotates.
Constructing the image URL is the fiddly part: the API returns an image identifier and date, and you assemble the archive path from them. The date has to be split into its components and inserted into the URL, which the docs describe but which trips most people up first time.
Quick facts
- Base URL
https://api.nasa.gov/EPIC/api- Authentication
- DEMO_KEY works for testing. Register a free key at api.nasa.gov for higher limits.
- Rate limit
- DEMO_KEY: about 30 requests/hour per IP. Personal key: 1,000/hour.
- Pricing
- Free. NASA imagery is public domain.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the NASA EPIC API
Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.
1. List the most recent Earth images
GET https://api.nasa.gov/EPIC/api/natural?api_key=DEMO_KEY
curl 'https://api.nasa.gov/EPIC/api/natural?api_key=DEMO_KEY'const res = await fetch("https://api.nasa.gov/EPIC/api/natural?api_key=DEMO_KEY");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.nasa.gov/EPIC/api/natural?api_key=DEMO_KEY", timeout=20)
res.raise_for_status()
print(res.json())[
{
"identifier": "20260817005516",
"caption": "This image was taken by NASA's EPIC camera onboard the NOAA DSCOVR spacecraft",
"image": "epic_1b_20260817005516",
"version": "04",
"centroid_coordinates": {
"lat": 8.796387,
"lon": 175.92041
},
"dscovr_j2000_position": {
"x": -1400325.30469,
"y": 661372.640626,
"z": 243865.345507
},
"lunar_j2000_position": {
"x": -367220.444428,
"y": -102351.396149,
"z": -73872.811571
},
"sun_j2000_position": {
"x": -122225253.342301,
"y": 82084485.55325,
"z": 35582582.600045
},
"attitude_quaternions": {
"q0": 0.84925,
"q1": -0.150186,
"q2": -0.175562,
"q3": 0.474756
},
"date": "2026-08-17 00:50:27",
"coords": {
"centroid_coordinates": {
"lat": 8.796387,
"lon": 175.92041
},
"dscovr_j2000_position": {
"x": -1400325.30469,
"y": 661372.640626,
"z": 243865.345507
},
"lunar_j2000_position": {
"x": -367220.444428,
"y": -102351.396149,
"z": -73872.811571
},
"sun_j2000_position": {
"x": -122225253.342301,
"y": 82084485.55325,
"z": 35582582.600045
},
"attitude_quaternions": {
"q0": 0.84925,
"q1": -0.150186,
"q2": -0.175562,
"q3": 0.474756
}
}
},
{
"identifier": "20260817020043",
"caption": "This image was taken by NASA's EPIC camera onboard the NOAA DSCOVR spacecraft",
"image": "epic_1b_20260817020043"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | Required | Your NASA key, or DEMO_KEY. DEMO_KEY |
natural | path | Optional | Natural colour imagery. natural |
enhanced | path | Optional | Enhanced colour imagery. enhanced |
date/<YYYY-MM-DD> | path | Optional | Images from a specific date. natural/date/2026-08-01 |
all | path | Optional | Every date with available imagery. natural/all |
Response fields
identifierstring- Capture identifier.
imagestring- Image filename — combine with the date to build the archive URL.
captionstring- Standard NASA caption.
datestring- Capture timestamp, used to construct the image path.
centroid_coordinatesobject- Latitude and longitude at the centre of the visible disc.
dscovr_j2000_positionobject- Satellite position in J2000 coordinates.
sun_j2000_positionobject- Sun position, for illumination geometry.
What you can build with the NASA EPIC API
- Display a daily full-Earth photograph on a site or wallpaper app
- Build a time-lapse of Earth rotating
- Create climate and geography teaching resources
- Visualise which face of Earth is sunlit at a given time
Common errors and how to fix them
Image URL 404s
The archive path must be constructed from the date and image name.
Fix: Split the date into YYYY/MM/DD and insert it into the archive URL exactly as the docs specify.
Empty array for a date
EPIC does not capture every day.
Fix: Use the /all endpoint to find dates with available imagery before requesting one.
429
DEMO_KEY limit exhausted.
Fix: Register a free NASA key.
NASA EPIC API — frequently asked questions
What is EPIC?
The Earth Polychromatic Imaging Camera aboard NOAA's DSCOVR satellite, positioned a million miles from Earth at the L1 Lagrange point. It photographs the entire sunlit face of the planet in one frame.
Is the NASA EPIC API free?
Yes, with DEMO_KEY for testing or a free registered key for higher limits. The imagery is public domain.
Why does my image URL return 404?
The API gives you an image name and date, and you must assemble the archive path from them — splitting the date into year, month and day segments. This is the most common integration problem.
How often are images captured?
Several per day when the instrument is operating, but not every day. Check the /all endpoint for dates with available imagery.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Image Cropper
Crop images online to an exact rectangle with pixel-precise x, y, width and height inputs or aspect-ratio presets. Free, private and browser-based.
NASA EPIC is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.