# NASA APIs

Category: [Science and space](https://free-web-services.com/web-services/science/)  
Page: https://free-web-services.com/web-services/science/nasa-apis.html  
Documentation: https://api.nasa.gov/

api.nasa.gov is the portal to a collection of NASA APIs: the Astronomy Picture of the Day, photos from the Mars rovers, near-Earth asteroids, space weather events, Earth imagery from the EPIC camera, and more. Responses are JSON. Free; the shared DEMO_KEY works for trying things out, and a free personal key gives much higher limits.

- API key: Needed, free
- Pricing: Free; the shared DEMO_KEY works for trying things out, and a free personal key gives much higher limits.
- From the browser: Yes (CORS)
- Formats: JSON
- Interface: REST, HTTP-GET
- Provider: api.nasa.gov
- Last checked: Working on November 1st, 2026

Example request:

```sh
curl 'https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY'
```

Replace YOUR_API_KEY with your own key. The JavaScript works in a web page as well as in Node.js 18 or newer.

