ByteChef LogoByteChef

NASA

NASA is a United States government agency that provides public APIs offering access to space-related data, including astronomy images, Mars rover photos, and other scientific information for developers and applications.

Categories: Developer Tools

Type: nasa/v1


Connections

Version: 1

API Key

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGtrue
valueAPI KeySTRINGtrue
addToAdd toSTRINGtrue

Connection Setup

Create API Key

  1. Navigate to NASA.
  2. Locate the API key signup form.
  3. Enter your first name, last name and email address.
  4. Click Sign Up.
  5. Check your email inbox.
  6. You will receive an email containing your API key.

Actions

Get Asteroid

Name: getAsteroid

Lookup a specific Asteroid based on its NASA JPL small body (SPK-ID) ID.

Properties

NameLabelTypeDescriptionRequired
asteroidIdAsteroid IdINTEGERAsteroid SPK-ID correlates to the NASA JPL small body.true

Example JSON Structure

{
  "label" : "Get Asteroid",
  "name" : "getAsteroid",
  "parameters" : {
    "asteroidId" : 1
  },
  "type" : "nasa/v1/getAsteroid"
}

Output

Type: OBJECT

Properties

NameTypeDescription
idSTRINGThe unique identifier of the asteroid.
neo_reference_idSTRINGNASA's Near Earth Object reference ID for the asteroid.
nameSTRINGThe official name or designation of the asteroid.
nasa_jpl_urlSTRINGA URL to the NASA JPL page with detailed information about the asteroid.
absolute_magnitude_hNUMBERThe absolute magnitude of the asteroid, representing its intrinsic brightness.
is_potentially_hazardous_asteroidBOOLEAN
Options true, false
Indicates whether the asteroid is considered potentially hazardous to Earth.
estimated_diameterOBJECT
Properties {{NUMBER(estimated_diameter_min), NUMBER(estimated_diameter_max)}(kilometers)}
Estimated diameter measurements of the asteroid in various units.
close_approach_dataARRAY
Items [{STRING(close_approach_date), {STRING(kilometers_per_second), STRING(kilometers_per_hour)}(relative_velocity), {STRING(kilometers), STRING(lunar)}(miss_distance), STRING(orbiting_body)}]
A list of records describing close approaches of the asteroid to celestial bodies.
orbital_dataOBJECT
Properties {STRING(orbit_id), STRING(eccentricity), STRING(semi_major_axis), STRING(inclination), STRING(orbital_period)}
Orbital parameters describing the asteroid's trajectory.

Output Example

{
  "id" : "",
  "neo_reference_id" : "",
  "name" : "",
  "nasa_jpl_url" : "",
  "absolute_magnitude_h" : 0.0,
  "is_potentially_hazardous_asteroid" : false,
  "estimated_diameter" : {
    "kilometers" : {
      "estimated_diameter_min" : 0.0,
      "estimated_diameter_max" : 0.0
    }
  },
  "close_approach_data" : [ {
    "close_approach_date" : "",
    "relative_velocity" : {
      "kilometers_per_second" : "",
      "kilometers_per_hour" : ""
    },
    "miss_distance" : {
      "kilometers" : "",
      "lunar" : ""
    },
    "orbiting_body" : ""
  } ],
  "orbital_data" : {
    "orbit_id" : "",
    "eccentricity" : "",
    "semi_major_axis" : "",
    "inclination" : "",
    "orbital_period" : ""
  }
}

Find Asteroid ID

To find asteroid ID, click here.

Get Astronomy Picture of the Day

Name: getPictureOfTheDay

Returns NASA's Astronomy Picture of the Day.

Properties

NameLabelTypeDescriptionRequired
queryTypeFetch MethodSTRING
Options single, range, random
Select how you want to fetch the picture of the day.true
dateDateDATEThe date of the APOD image to retrieve.false
start_dateStart DateDATEThe start of a date range.false
end_dateEnd DateDATEThe end of the date range.false
countCountINTEGERIf specified, returns a randomly chosen images.false
thumbsThumbsBOOLEAN
Options true, false
Return the URL of video thumbnail.false

Example JSON Structure

{
  "label" : "Get Astronomy Picture of the Day",
  "name" : "getPictureOfTheDay",
  "parameters" : {
    "queryType" : "",
    "date" : "2021-01-01",
    "start_date" : "2021-01-01",
    "end_date" : "2021-01-01",
    "count" : 1,
    "thumbs" : false
  },
  "type" : "nasa/v1/getPictureOfTheDay"
}

Output

Type: OBJECT

Properties

NameTypeDescription
dateDATEThe date of the Astronomy Picture of the Day.
explanationSTRINGA detailed explanation of the image or video provided by NASA.
media_typeSTRINGThe type of media returned (e.g., 'image' or 'video').
service_versionSTRINGThe version of the NASA API service used to generate this response.
titleSTRINGThe title of the Astronomy Picture of the Day.
urlSTRINGThe URL where the standard resolution image or video can be accessed.
hdurlSTRINGThe URL for the high-definition version of the image, if available.

Output Example

{
  "date" : "2021-01-01",
  "explanation" : "",
  "media_type" : "",
  "service_version" : "",
  "title" : "",
  "url" : "",
  "hdurl" : ""
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find Asteroid ID

  1. Go to the NASA Small-Body Database Browser.
  2. Search for the asteroid by name (e.g., Apophis) or designation (e.g., 99942).
  3. Open the asteroid’s detail page.
  4. Look for SPK-ID or Object ID e.g., 2000433. This number is the asteroid’s NASA ID used in many systems.

How is this guide?

Last updated on

On this page