# NASA

> Get the Astronomy Picture of the Day, asteroids passing near Earth, space weather alerts and daily photographs of the whole Earth.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/nasa

## Actions

### Browse asteroids

Page through NASA's whole catalog of near-Earth asteroids, about 40,000 of them, with each one's size, whether it is potentially hazardous and its close approaches.

**Inputs**

- Page (`page`, number): Which page to get, counting from 0. Default is the first page. At least 0.
- Size (`size`, number): How many asteroids a page holds, from 1 to 20. Default is 20. From 1 to 20.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "asteroids": [
      {
        "absolute_magnitude_h": 1,
        "close_approach_data": [
          {
            "close_approach_date": "example",
            "close_approach_date_full": "example",
            "epoch_date_close_approach": 1,
            "miss_distance": {
              "astronomical": "example",
              "kilometers": "example",
              "lunar": "example",
              "miles": "example"
            },
            "orbiting_body": "example",
            "relative_velocity": {
              "kilometers_per_hour": "example",
              "kilometers_per_second": "example",
              "miles_per_hour": "example"
            }
          }
        ],
        "designation": "example",
        "estimated_diameter": {
          "feet": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          },
          "kilometers": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          },
          "meters": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          },
          "miles": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          }
        },
        "id": "example",
        "is_potentially_hazardous_asteroid": true,
        "is_sentry_object": true,
        "name": "example",
        "nasa_jpl_url": "example",
        "neo_reference_id": "example"
      }
    ],
    "page": {
      "number": 1,
      "size": 1,
      "total_elements": 1,
      "total_pages": 1
    }
  }
}
```

### Get an asteroid

Get one near-Earth asteroid by its NASA JPL small-body ID: its size, whether it is potentially hazardous, its orbit and every close approach on record.

**Inputs**

- Asteroid ID (`asteroid_id`, text, required): The asteroid's NASA JPL small-body ID, such as 3542519. 'List asteroids passing near Earth' returns it as id.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "absolute_magnitude_h": 1,
    "close_approach_data": [
      {
        "close_approach_date": "example",
        "close_approach_date_full": "example",
        "epoch_date_close_approach": 1,
        "miss_distance": {
          "astronomical": "example",
          "kilometers": "example",
          "lunar": "example",
          "miles": "example"
        },
        "orbiting_body": "example",
        "relative_velocity": {
          "kilometers_per_hour": "example",
          "kilometers_per_second": "example",
          "miles_per_hour": "example"
        }
      }
    ],
    "designation": "example",
    "estimated_diameter": {
      "feet": {
        "estimated_diameter_max": 1,
        "estimated_diameter_min": 1
      },
      "kilometers": {
        "estimated_diameter_max": 1,
        "estimated_diameter_min": 1
      },
      "meters": {
        "estimated_diameter_max": 1,
        "estimated_diameter_min": 1
      },
      "miles": {
        "estimated_diameter_max": 1,
        "estimated_diameter_min": 1
      }
    },
    "id": "example",
    "is_potentially_hazardous_asteroid": true,
    "is_sentry_object": true,
    "name": "example",
    "nasa_jpl_url": "example",
    "neo_reference_id": "example",
    "orbital_data": {}
  }
}
```

### Get random Astronomy Pictures of the Day

Get a number of Astronomy Pictures of the Day picked at random from the whole archive.

**Inputs**

- Count (`count`, number, required): How many pictures to return, from 1 to 100. From 1 to 100.
- Thumbs (`thumbs`, true/false): When a day's entry is a video, also return a still image of it in thumbnail_url. Default is false.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "pictures": [
      {
        "copyright": "example",
        "date": "example",
        "explanation": "example",
        "hdurl": "example",
        "media_type": "example",
        "service_version": "example",
        "thumbnail_url": "example",
        "title": "example",
        "url": "example"
      }
    ]
  }
}
```

### Get the Astronomy Picture of the Day

Get NASA's Astronomy Picture of the Day for one date: its title, explanation and image or video link.

**Inputs**

- Date (`date`, date): The day to get the picture for, from 1995-06-16 to today. Leave blank for today's picture.
- Thumbs (`thumbs`, true/false): When a day's entry is a video, also return a still image of it in thumbnail_url. Default is false.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "copyright": "example",
    "date": "example",
    "explanation": "example",
    "hdurl": "example",
    "media_type": "example",
    "service_version": "example",
    "thumbnail_url": "example",
    "title": "example",
    "url": "example"
  }
}
```

### List asteroids passing near Earth

List the asteroids that make their closest approach to Earth between two dates, at most 7 days apart. Each asteroid carries the date of its approach.

**Inputs**

- Start date (`start_date`, date, required): The first day to list approaches for.
- End date (`end_date`, date): The last day to list approaches for, at most 7 days after the start date. Leave blank for 7 days after it.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "asteroids": [
      {
        "absolute_magnitude_h": 1,
        "close_approach_data": [
          {
            "close_approach_date": "example",
            "close_approach_date_full": "example",
            "epoch_date_close_approach": 1,
            "miss_distance": {
              "astronomical": "example",
              "kilometers": "example",
              "lunar": "example",
              "miles": "example"
            },
            "orbiting_body": "example",
            "relative_velocity": {
              "kilometers_per_hour": "example",
              "kilometers_per_second": "example",
              "miles_per_hour": "example"
            }
          }
        ],
        "date": "example",
        "estimated_diameter": {
          "feet": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          },
          "kilometers": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          },
          "meters": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          },
          "miles": {
            "estimated_diameter_max": 1,
            "estimated_diameter_min": 1
          }
        },
        "id": "example",
        "is_potentially_hazardous_asteroid": true,
        "is_sentry_object": true,
        "name": "example",
        "nasa_jpl_url": "example",
        "neo_reference_id": "example"
      }
    ],
    "element_count": 1
  }
}
```

### List Astronomy Pictures of the Day

List the Astronomy Picture of the Day for each date in a range.

**Inputs**

- Start date (`start_date`, date, required): The first day of the range, from 1995-06-16.
- End date (`end_date`, date): The last day of the range. Leave blank to end today.
- Thumbs (`thumbs`, true/false): When a day's entry is a video, also return a still image of it in thumbnail_url. Default is false.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "pictures": [
      {
        "copyright": "example",
        "date": "example",
        "explanation": "example",
        "hdurl": "example",
        "media_type": "example",
        "service_version": "example",
        "thumbnail_url": "example",
        "title": "example",
        "url": "example"
      }
    ]
  }
}
```

### List coronal mass ejections

List the coronal mass ejections (CMEs) observed leaving the Sun between two dates, with NASA's analysis of each one's speed and direction.

**Inputs**

- Start date (`start_date`, date): The first day to list events for. Leave blank for 30 days ago.
- End date (`end_date`, date): The last day to list events for. Leave blank for today.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "activeRegionNum": 1,
        "activityID": "example",
        "catalog": "example",
        "cmeAnalyses": [
          {}
        ],
        "instruments": [
          {
            "displayName": "example"
          }
        ],
        "link": "example",
        "linkedEvents": [
          {}
        ],
        "note": "example",
        "sourceLocation": "example",
        "startTime": "example",
        "submissionTime": "example"
      }
    ]
  }
}
```

### List Earth images from EPIC

List the full-disc photographs of Earth taken on one day by NASA's EPIC camera on the DSCOVR satellite, each with links to the image file.

**Inputs**

- Collection (`collection`, text): Natural color shows Earth as the eye would; enhanced color is processed to bring out land and sea. Default is natural color. One of: `natural` (Natural color), `enhanced` (Enhanced color). Default: `natural`.
- Date (`date`, date): The day to list images for. Leave blank for the most recent day with images, usually a day or two ago.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "images": [
      {
        "attitude_quaternions": {
          "q0": 1,
          "q1": 1,
          "q2": 1,
          "q3": 1
        },
        "caption": "example",
        "centroid_coordinates": {
          "lat": 1,
          "lon": 1
        },
        "date": "example",
        "dscovr_j2000_position": {
          "x": 1,
          "y": 1,
          "z": 1
        },
        "identifier": "example",
        "image": "example",
        "image_url": "example",
        "jpg_url": "example",
        "lunar_j2000_position": {
          "x": 1,
          "y": 1,
          "z": 1
        },
        "sun_j2000_position": {
          "x": 1,
          "y": 1,
          "z": 1
        },
        "thumbnail_url": "example",
        "version": "example"
      }
    ]
  }
}
```

### List geomagnetic storms

List the geomagnetic storms recorded between two dates, with each storm's Kp index readings.

**Inputs**

- Start date (`start_date`, date): The first day to list storms for. Leave blank for 30 days ago.
- End date (`end_date`, date): The last day to list storms for. Leave blank for today.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "allKpIndex": [
          {
            "kpIndex": 1,
            "observedTime": "example",
            "source": "example"
          }
        ],
        "gstID": "example",
        "link": "example",
        "linkedEvents": [
          {}
        ],
        "startTime": "example",
        "submissionTime": "example"
      }
    ]
  }
}
```

### List high speed solar wind streams

List the fast streams of solar wind that reached Earth or a spacecraft between two dates.

**Inputs**

- Start date (`start_date`, date): The first day to list streams for. Leave blank for 30 days ago.
- End date (`end_date`, date): The last day to list streams for. Leave blank for today.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "eventTime": "example",
        "hssID": "example",
        "instruments": [
          {
            "displayName": "example"
          }
        ],
        "link": "example",
        "linkedEvents": [
          {}
        ],
        "submissionTime": "example"
      }
    ]
  }
}
```

### List interplanetary shocks

List the shock waves in the solar wind measured at Earth or a spacecraft between two dates.

**Inputs**

- Start date (`start_date`, date): The first day to list shocks for. Leave blank for 30 days ago.
- End date (`end_date`, date): The last day to list shocks for. Leave blank for today.
- Location (`location`, text): Where the shock was measured: Earth, MESSENGER, STEREO A or STEREO B. Default is everywhere (ALL). One of: `ALL`, `Earth`, `MESSENGER`, `STEREO A`, `STEREO B`. Default: `ALL`.
- Catalog (`catalog`, text): Which catalog to read: NASA's M2M catalog or the Winslow MESSENGER catalog. Default is both (ALL). One of: `ALL`, `M2M_CATALOG` (M2m catalog), `WINSLOW_MESSENGER_ICME_CATALOG` (Winslow messenger icme catalog). Default: `ALL`.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "activityID": "example",
        "catalog": "example",
        "eventTime": "example",
        "instruments": [
          {
            "displayName": "example"
          }
        ],
        "link": "example",
        "linkedEvents": [
          {}
        ],
        "location": "example",
        "submissionTime": "example"
      }
    ]
  }
}
```

### List magnetopause crossings

List the times between two dates when the solar wind pushed Earth's magnetic shield in past the orbit of geostationary satellites.

**Inputs**

- Start date (`start_date`, date): The first day to list events for. Leave blank for 30 days ago.
- End date (`end_date`, date): The last day to list events for. Leave blank for today.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "eventTime": "example",
        "instruments": [
          {
            "displayName": "example"
          }
        ],
        "link": "example",
        "linkedEvents": [
          {}
        ],
        "mpcID": "example",
        "submissionTime": "example"
      }
    ]
  }
}
```

### List radiation belt enhancements

List the rises in Earth's radiation belts recorded between two dates, which raise the risk to satellites.

**Inputs**

- Start date (`start_date`, date): The first day to list events for. Leave blank for 30 days ago.
- End date (`end_date`, date): The last day to list events for. Leave blank for today.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "eventTime": "example",
        "instruments": [
          {
            "displayName": "example"
          }
        ],
        "link": "example",
        "linkedEvents": [
          {}
        ],
        "rbeID": "example",
        "submissionTime": "example"
      }
    ]
  }
}
```

### List solar energetic particle events

List the bursts of high-energy particles from the Sun recorded between two dates, which can disrupt satellites and radio.

**Inputs**

- Start date (`start_date`, date): The first day to list events for. Leave blank for 30 days ago.
- End date (`end_date`, date): The last day to list events for. Leave blank for today.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "eventTime": "example",
        "instruments": [
          {
            "displayName": "example"
          }
        ],
        "link": "example",
        "linkedEvents": [
          {}
        ],
        "sepID": "example",
        "submissionTime": "example"
      }
    ]
  }
}
```

### List solar wind forecasts (WSA-Enlil)

List NASA's WSA-Enlil model runs between two dates: forecasts of when a coronal mass ejection's shock will reach Earth and how strong the geomagnetic storm could be.

**Inputs**

- Start date (`start_date`, date): The first day to list forecasts for. Leave blank for 7 days ago.
- End date (`end_date`, date): The last day to list forecasts for. Leave blank for today.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "au": 1,
        "cmeInputs": [
          {}
        ],
        "estimatedDuration": "example",
        "estimatedShockArrivalTime": "example",
        "impactList": [
          {}
        ],
        "isEarthGB": true,
        "kp_135": "example",
        "kp_18": "example",
        "kp_180": "example",
        "kp_90": "example",
        "link": "example",
        "modelCompletionTime": "example",
        "rmin_re": "example",
        "simulationID": "example"
      }
    ]
  }
}
```

### List space weather notifications

List the space weather alerts, watches and weekly reports NASA's Space Weather Database Of Notifications, Knowledge, Information (DONKI) issued between two dates, at most 30 days apart.

**Inputs**

- Start date (`start_date`, date): The first day to list notifications for. Leave blank for 7 days ago.
- End date (`end_date`, date): The last day to list notifications for, at most 30 days after the start date. Leave blank for today.
- Type (`type`, text): Which kind of notification to list. Default is all types. One of: `all` (All types), `FLR` (Solar flares), `SEP` (Solar energetic particles), `CME` (Coronal mass ejections), `IPS` (Interplanetary shocks), `MPC` (Magnetopause crossings), `GST` (Geomagnetic storms), `RBE` (Radiation belt enhancements), `report` (Space weather reports). Default: `all`.

**Outputs**

- `data` (object): The response from NASA.

**Example output**

```json
{
  "data": {
    "notifications": [
      {
        "messageBody": "example",
        "messageID": "example",
        "messageIssueTime": "example",
        "messageType": "example",
        "messageURL": "example"
      }
    ]
  }
}
```
