Skip to main content

NASA API

The NASA API is a collection of public, open-data web services published by NASA at api.nasa.gov. It provides programmatic access to imagery and space-science datasets, including the Astronomy Picture of the Day (APOD), Near Earth Object Web Service (NeoWs), Mars rover photos, Earth Polychromatic Imaging Camera (EPIC) imagery, DONKI space-weather events, and the NASA Image and Video Library. All requests are authenticated with a free API key passed as the api_key query parameter.

NASA API icon

Power end-to-end data operations for your NASA API API with Nexla. Our bi-directional NASA API connector is purpose-built for NASA API, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to NASA API or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your NASA API workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a NASA API credential, you need a NASA API key. NASA authenticates every request with an API key that is passed as the api_key query parameter in the request URL. The key is free, and no billing or account approval is required.

To obtain a NASA API key, follow these steps:

  1. Navigate to the NASA Open APIs portal at https://api.nasa.gov/.

  2. Locate the Generate API Key form on the page and enter the required details: your First Name, Last Name, and Email. The optional How will you use the APIs? field can be used to briefly describe your intended application.

  3. Click Signup to submit the form. NASA generates a unique API key and displays it on the confirmation page, and also emails a copy to the address you provided.

  4. Copy your API key and store it securely, as you will enter it when creating your Nexla credential.

NASA also provides a shared DEMO_KEY for quick exploration without signing up, but it is rate-limited to 30 requests per IP address per hour (and 50 per day). A registered API key raises the limit to 1,000 requests per hour. Current usage is reported in the X-RateLimit-Limit and X-RateLimit-Remaining response headers. For production use, always use your own registered key.

For complete information about authentication, rate limits, and the available APIs, see the NASA Open APIs documentation.

Authenticate

Credentials required

FieldRequiredSecretDescription
API Key ValueYesYesAn encoded string value used as a secret token to authenticate API requests
Base URLYesNoThe base URL for the NASA API.
Images Base URLYesNoThe base URL for the NASA Image and Video Library API.

Create a credential in Nexla

  1. After selecting the data source type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Enter your NASA API key in the API Key Value field. This key authenticates Nexla with the NASA API and is sent as the api_key query parameter on every request. It is treated as a secret and should be kept confidential.

  4. Enter the base URL for the NASA API in the Base URL field. In most cases this is https://api.nasa.gov, which is the default value.

  5. Enter the base URL for the NASA Image and Video Library API in the Images Base URL field. In most cases this is https://images-api.nasa.gov, which is the default value. This host serves the NASA Image and Video Library endpoints.

  6. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the NASA API connector tile, then select the credential that will be used to connect to the NASA API, and click Next; or, create a new NASA API credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common NASA API endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

[Rest API] Astronomy Picture of the Day (APOD)

Retrieve NASA Astronomy Picture of the Day with optional date and HD parameters.

  • Optionally set the Date parameter (YYYY-MM-DD) to fetch the APOD entry for a specific day, and the Hd parameter to request the high-resolution image URL. If no date is supplied, the current day's entry is returned.

[Rest API] APOD Date Range

Retrieve a date-range or count of APOD entries in a single call (using start_date/end_date or count params), rather than one date at a time.

  • Optionally set the Date, Start Date, and End Date parameters (YYYY-MM-DD) to select a range of days, or the Count parameter to retrieve that many random APOD entries. Set the Hd parameter to include high-resolution image URLs.

[Rest API] Near Earth Object Feed

Near Earth Object Web Service (NeoWs) — retrieve a list of asteroids based on their closest approach date to Earth within a date range.

  • Set the required Start Date parameter (YYYY-MM-DD) for the closest-approach window. Optionally set the End Date parameter (YYYY-MM-DD) to bound the range.

[Rest API] Browse Near Earth Objects

Browse the full NeoWs asteroid dataset with pagination.

  • This endpoint pages through the complete Near Earth Object dataset. Nexla automatically increments through the pages to retrieve subsequent records.

[Rest API] Look Up Near Earth Object by ID

Look up a specific Near Earth Object by its NASA ID, returning full orbital and close-approach data.

  • Set the required Asteroid Id parameter to the NASA asteroid ID of the object you want to retrieve.

[Rest API] NeoWs Statistics

Retrieve summary statistics for NASA's Near Earth Object dataset including total object count and close approach count.

[Rest API] Latest Mars Rover Photos

Retrieve the most recently captured photos from a Mars rover without needing to know the current sol.

  • Set the required Rover parameter to the rover name (e.g., curiosity, opportunity, spirit). Nexla automatically pages through the results.

[Rest API] Mars Rover Photos

Retrieve photos taken by Mars rovers (Curiosity, Opportunity, Spirit) filtered by sol or Earth date and camera.

  • Set the required Rover parameter to the rover name (e.g., curiosity, opportunity, spirit). Optionally filter with the Sol parameter (Martian day), the Earth Date parameter (YYYY-MM-DD), and the Camera parameter (e.g., FHAZ, RHAZ, MAST).

[Rest API] EPIC Natural Color Imagery by Date

Retrieve Earth Polychromatic Imaging Camera (EPIC) natural-color imagery metadata for a specific date.

  • Set the required Date parameter (YYYY-MM-DD) to the day for which EPIC imagery metadata should be returned.

[Rest API] EPIC Natural Color Latest Images

Retrieve the most recent Earth Polychromatic Imaging Camera (EPIC) natural-color imagery metadata.

[Rest API] EPIC Natural Color Available Dates

Retrieve the list of all dates for which EPIC natural-color imagery is available.

[Rest API] Earth Imagery Assets (Landsat 8)

Retrieve Landsat 8 satellite imagery of Earth for a given longitude/latitude and date.

  • Set the required Lon and Lat parameters to the coordinate of interest. Optionally set the Begin and End parameters (YYYY-MM-DD) to bound the date range and the Dim parameter for the image width and height in degrees.

[Rest API] Earth Satellite Imagery

Retrieve the actual satellite image (PNG/GIF) for Earth at a given coordinate and date.

  • Set the required Lon and Lat parameters to the coordinate of interest. Optionally set the Begin and End parameters (YYYY-MM-DD) to bound the date range and the Dim parameter for the image width and height in degrees.

[Rest API] DONKI Coronal Mass Ejections

Space Weather Database Of Notifications, Knowledge, Information (DONKI) — retrieve Coronal Mass Ejection events within a date range.

  • Set the required Startdate parameter (YYYY-MM-DD) for the start of the event window. Optionally set the Enddate parameter (YYYY-MM-DD) to bound the range.

[Rest API] List Confirmed Exoplanets

Query the NASA Exoplanet Archive for confirmed exoplanets and their properties.

[Rest API] Space Sounds

Retrieve a list of space sounds curated by NASA (audio files with metadata).

[Rest API] EONET Natural Events

Retrieve metadata on natural events (storms, wildfires, floods, etc.) from NASA's Earth Observatory Natural Event Tracker.

[Rest API] List Techport Projects

Retrieve a list of NASA technology transfer projects updated since a given date from the Techport database.

  • Optionally set the Updated Since parameter (YYYY-MM-DD) to return only projects updated on or after that date.

[Rest API] Search NASA Image and Video Library

Search NASA's Image and Video Library for media assets by keyword, media type, and other filters.

  • Set the required Query parameter to the free-text search terms. Optionally set the Media Type parameter (image, audio, or video) and the Page parameter for paginated results. Nexla automatically follows the pagination links to fetch subsequent pages.

[Rest API] Get NASA Image Asset

Retrieve all available renditions (original, large, medium, small, thumb) for a specific NASA media asset by its NASA ID.

  • Set the required NASA ID parameter to the identifier of the media asset (e.g., as11-40-5931).

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

NASA API data sources can also be manually configured to ingest data from any valid NASA API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new NASA API data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.