Reference · Tools

NASA

Retrieve data from NASA\

Action (binary) Utility v1 Binary data

The NASA node pulls data from NASA's public APIs: astronomy pictures, asteroid feeds, space weather events and satellite imagery, optionally downloading images as binary. A typical build is posting the astronomy picture of the day to a channel each morning with its explanation.

Node type
Action (binary)
Parameters
17
Outputs
Output, Error
Credentials
NASA API

NASA

Retrieve astronomy images, asteroid data, space weather, and satellite imagery from NASA APIs

Overview

The NASA tool provides access to multiple NASA open APIs: Astronomy Picture of the Day (APOD) with optional image download, Near-Earth Object (NEO) asteroid tracking via feed/lookup/browse endpoints, nine DONKI space weather event types (CME, HSS, IPS, MPC, notifications, RBE, SEP, solar flare, WSA+Enlil), Earth Assets metadata, and Earth Imagery satellite image download. Binary data is produced for APOD image downloads and Earth Imagery. All endpoints are read-only GET requests authenticated via api_key query parameter.

Category: Utility
Tool Name: nasa
Version: 1

Appearance: Icon: lucide-Rocket | Color: #0B3D91

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires NASA API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Asteroid Neo-BrowseasteroidNeoBrowse
Asteroid Neo-FeedasteroidNeoFeed
Asteroid Neo-LookupasteroidNeoLookup
Astronomy Picture of the DayastronomyPictureOfTheDay
DONKI Coronal Mass EjectiondonkiCoronalMassEjection
DONKI High Speed StreamdonkiHighSpeedStream
DONKI Interplanetary ShockdonkiInterplanetaryShock
DONKI Magnetopause CrossingdonkiMagnetopauseCrossing
DONKI NotificationdonkiNotifications
DONKI Radiation Belt EnhancementdonkiRadiationBeltEnhancement
DONKI Solar Energetic ParticledonkiSolarEnergeticParticle
DONKI Solar FlaredonkiSolarFlare
DONKI WSA+Enlil SimulationdonkiWsaEnlilSimulation
Earth AssetearthAssets
Earth ImageryearthImagery

Operations

OperationValueDescription
GetgetRetrieve data from the selected resource — offered by every resource except Asteroid Neo-Browse
Get ManygetAllBrowse the overall asteroid dataset — the only operation offered by Asteroid Neo-Browse

Parameters

Astronomy Picture of the Day: Get

ParameterTypeRequiredDefaultDescription
Download ImagebooleanNotrueWhether to download the APOD image as binary data. Only applies when media_type is “image”.
Binary PropertystringYesdataName of the binary property to store the downloaded image in. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. (shown when Download Image is true)
Additional FieldscollectionNo{}Optional query fields for this resource.
— DatestringNoDate of the APOD (defaults to today). Format YYYY-MM-DD. Supports expressions.

Asteroid Neo-Feed: Get

ParameterTypeRequiredDefaultDescription
Additional FieldscollectionNo{}Optional query fields for this resource.
— Start DatestringNoStart of date range. Format YYYY-MM-DD. Defaults to today. Supports expressions.
— End DatestringNoEnd of date range. Format YYYY-MM-DD. Defaults to today. Supports expressions.

Asteroid Neo-Lookup: Get

ParameterTypeRequiredDefaultDescription
Asteroid IDstringYesThe NASA SPK-ID of the asteroid to look up. Supports expressions like {{ $json.spkId }}.
Additional FieldscollectionNo{}Optional query fields for this resource.
— Include Close Approach DatabooleanNofalseWhether to include all close approach data in the asteroid lookup.

Asteroid Neo-Browse: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit. Returning all pages through the whole NASA asteroid dataset and can take a long time.
LimitnumberNo20Max number of results to return. (shown when Return All is false)

DONKI Space Weather Events: Get

Applies to donkiCoronalMassEjection, donkiHighSpeedStream, donkiMagnetopauseCrossing, donkiNotifications, donkiRadiationBeltEnhancement, donkiSolarEnergeticParticle, donkiSolarFlare and donkiWsaEnlilSimulation — they all take the same fields.

ParameterTypeRequiredDefaultDescription
Additional FieldscollectionNo{}Optional query fields for this resource.
— Start DatestringNoStart of date range. Format YYYY-MM-DD. Defaults to 30 days ago. Supports expressions.
— End DatestringNoEnd of date range. Format YYYY-MM-DD. Defaults to today. Supports expressions.

DONKI Interplanetary Shock: Get

ParameterTypeRequiredDefaultDescription
Additional FieldscollectionNo{}Optional query fields for this resource.
— Start DatestringNoStart of date range. Format YYYY-MM-DD. Defaults to 30 days ago. Supports expressions.
— End DatestringNoEnd of date range. Format YYYY-MM-DD. Defaults to today. Supports expressions.
— LocationoptionsNoALLLocation filter for interplanetary shocks.
Options: ALL, earth, MESSENGER, STEREO A, STEREO B
— CatalogoptionsNoALLCatalog filter for interplanetary shocks.
Options: ALL, SWRC_CATALOG, WINSLOW_MESSENGER_ICME_CATALOG

Earth Asset: Get

ParameterTypeRequiredDefaultDescription
LatitudenumberNoLatitude for the location of the image. Required in practice — the item fails without it. Supports expressions.
LongitudenumberNoLongitude for the location of the image. Required in practice — the item fails without it. Supports expressions.
Additional FieldscollectionNo{}Optional query fields for this resource.
— DatestringNoDate of the image. Format YYYY-MM-DD. Supports expressions.
— DegreesnumberNoWidth and height of the image in degrees. Defaults to 0.025.

Earth Imagery: Get

ParameterTypeRequiredDefaultDescription
LatitudenumberNoLatitude for the location of the image. Required in practice — the item fails without it. Supports expressions.
LongitudenumberNoLongitude for the location of the image. Required in practice — the item fails without it. Supports expressions.
Binary PropertystringYesdataName of the binary property to store the Earth satellite image in. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
Additional FieldscollectionNo{}Optional query fields for this resource.
— DatestringNoDate of the image. Format YYYY-MM-DD. Defaults to today. Supports expressions.
— DegreesnumberNoWidth and height of the image in degrees. Defaults to 0.025.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Every resource merges its result onto the input item JSON — the incoming fields pass through unchanged. One output item per input item: no resource fans out, so lists arrive as arrays on a single item. Binary from the input item is forwarded, and the two image resources add a new binary property alongside it.

ResourceFields merged onto the item
astronomyPictureOfTheDayThe whole APOD response (title, explanation, media_type, url, hdurl, date, and so on). With Download Image on and media_type equal to image, the picture is also written to the named Binary Property, keeping the file name from the source URL.
asteroidNeoFeedasteroids (array of near-Earth objects) and element_count.
asteroidNeoLookupThe whole asteroid record. close_approach_data is stripped out unless Include Close Approach Data is on.
asteroidNeoBrowseasteroids (array) and totalCount.
donki* (all nine)events (array of the event records the API returned) and eventCount.
earthAssetsThe whole Earth Assets response for that coordinate.
earthImagerylat, lon, date, dim and fileSize. The satellite image itself is written to the named Binary Property as earth_imagery_{lat}_{lon}_{date}.png.

Because lists come back as arrays on one item, use a Split Out node on asteroids or events when you want one item per record. Reference the result downstream by expression, e.g. {{ $json.eventCount }} or {{ $json.asteroids }}.

Usage Examples

  • Get today’s Astronomy Picture of the Day with image download
  • Retrieve near-Earth asteroid feed for a date range
  • Look up asteroid details by SPK-ID
  • Get DONKI coronal mass ejection events for the past 30 days
  • Download Earth satellite imagery for given coordinates

Example Configuration

Today’s Astronomy Picture of the Day, image included:

{
  "type": "nasa",
  "parameters": {
    "resource": "astronomyPictureOfTheDay",
    "operation": "get",
    "download": true,
    "binaryPropertyName": "apodImage"
  }
}

APOD for a specific date, taken from the incoming item:

{
  "type": "nasa",
  "parameters": {
    "resource": "astronomyPictureOfTheDay",
    "operation": "get",
    "download": true,
    "binaryPropertyName": "apodImage",
    "additionalFields": {
      "date": "{{ $json.date }}"
    }
  }
}

Look up a single asteroid by SPK-ID, including its close approaches:

{
  "type": "nasa",
  "parameters": {
    "resource": "asteroidNeoLookup",
    "operation": "get",
    "asteroidId": "{{ $json.spkId }}",
    "additionalFields": {
      "includeCloseApproachData": true
    }
  }
}

Browse the asteroid dataset, capped at 50 records:

{
  "type": "nasa",
  "parameters": {
    "resource": "asteroidNeoBrowse",
    "operation": "getAll",
    "returnAll": false,
    "limit": 50
  }
}

Solar flare events for a month:

{
  "type": "nasa",
  "parameters": {
    "resource": "donkiSolarFlare",
    "operation": "get",
    "additionalFields": {
      "startDate": "2024-01-01",
      "endDate": "2024-01-31"
    }
  }
}

Interplanetary shocks near Earth from a single catalog:

{
  "type": "nasa",
  "parameters": {
    "resource": "donkiInterplanetaryShock",
    "operation": "get",
    "additionalFields": {
      "startDate": "2024-01-01",
      "endDate": "2024-01-31",
      "location": "earth",
      "catalog": "SWRC_CATALOG"
    }
  }
}

Download Earth satellite imagery for coordinates carried on the item:

{
  "type": "nasa",
  "parameters": {
    "resource": "earthImagery",
    "operation": "get",
    "lat": "{{ $json.lat }}",
    "lon": "{{ $json.lon }}",
    "binaryPropertyName": "earthImage",
    "additionalFields": {
      "date": "2024-01-15",
      "dim": 0.1
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Retrieve astronomy images, asteroid data, space weather events, and satellite imagery from NASA APIs with optional binary image download.

Behavior notes

  • Dates default sensibly. APOD, Earth Imagery and the asteroid feed default to today; DONKI resources default to the last 30 days. Any date you supply is normalised to YYYY-MM-DD, so an ISO timestamp or a date picked up from an upstream item works too.
  • Asteroid Neo-Feed returns one day’s objects. Even with a multi-day range, asteroids carries the objects for the first date in the response — narrow the range to the day you care about rather than expecting the whole window in one array.
  • Return All really means all. On Asteroid Neo-Browse it pages through the entire dataset 20 records at a time and does not stop until NASA runs out of pages. Leave it off and set a Limit unless you genuinely want everything.
  • APOD is not always a picture. Some days are videos; the download is skipped when media_type is not image, and the item still carries the APOD metadata.
  • Latitude and Longitude are mandatory for the Earth resources even though the editor does not mark them required — an item without both fails.

Common patterns

  • Daily astronomy content — use astronomyPictureOfTheDay with an optional date and the image download for editorial or educational workflows.
  • Space weather monitoring — use the DONKI resources with a date range to track events that could affect satellites or ground systems.
  • Asteroid tracking — combine asteroidNeoFeed for recent activity with asteroidNeoLookup for the detail on a specific object.
  • Earth observation — pair earthAssets (what imagery exists) with earthImagery (fetch the picture) for the same coordinates.

Frequently asked questions

Do I have to supply dates?

No — they default sensibly. APOD, Earth Imagery and the asteroid feed default to today, and DONKI resources default to the last 30 days. Any date you supply is normalised to `YYYY-MM-DD`, so an ISO timestamp from an upstream item works too.

Why does the asteroid feed only cover one day?

Asteroid Neo-Feed returns one day's objects even with a multi-day range specified, so loop over dates if you need a longer window.

Can it download the images themselves?

Yes — optional binary image download brings the picture through as binary data ready to post or store, rather than just a URL.

Which credential does it need?

A NASA API credential. NASA offers a demo key, but a registered key has far higher rate limits.

Build with the NASA node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need NASA API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.