Most of NASA’s data can be imported to Google Sheets using its API. Examples of the data that can be imported include Earth natural event tracker data, Mars’s weather information, images captured by NASA’s rovers, and Earth observation data among others.
We’ll learn how to import NASA data to Google Sheets using API step by step:
- Get the NASA API key
- Select an endpoint of data to import
- Install the Amigo Data add-on in Google Sheets
- Import the data to Google Sheets Amigo Data
How to import NASA data to Google Sheets
Follow the steps given below to learn how to connect NASA website data to Google Sheets.
Step 1: Get the NASA API key
Go to NASA’s API page.
Fill in the details and click Signup

Upon signing up, the API key will be generated

Note the key and copy it somewhere. It will be required to make requests to NASA API.
Step 2: Choose the endpoint of the data
Navigate to Browse APIs

Choose an endpoint category, eg. DONKI

Choose any one of the components. Example, Coronal Mass Ejection (CME)

Modify the example API URL by entering your own query values and the key. The CME endpoint component accepts only two query parameters: startDate and endDate.
For example, to get the CME analysis data for January 2022 to July 2022, the endpoint URL would be
https://api.nasa.gov/DONKI/CME?startDate=2022-01-01&endDate=2022-07-31&api_key=your_api_key
Replace your_api_key in the URL with your API key.
Step 3: Get Amigo Data Google Sheets extension
Now that we’ve got the NASA API key and the desired endpoint, we can begin to import the data to Google Sheets.
But before that, we need to install Amigo Data, a Google Sheets extension, using which we can import NASA data to Google Sheets to our heart’s content.
Install it from the Google Workspace Marketplace. Get the installation link here.

Step 4: Import the data to Google Sheets
Launch Amigo Data

Select Custom API from the list of sources

Paste the endpoint URL in the API URL field

Click PREVIEW

Flatten the data sets, delete the metadata that are not required and click IMPORT

The CME data from NASA will be imported into Google Sheets in a moment.
A snippet of the imported data

There are tens of other data that can be retrieved from NASA. Check the NASA API documentation for more information and how to use them.
If you wish or need to update the data periodically–daily, weekly, or on a certain day–you can do so using Amigo Data. Refer to this tutorial on how to set a refresh schedule.