{
  "openapi": "3.0.1",
  "info": {
    "title": "Asteroid Close Approaches, Fireballs & Impact Risk (NASA)",
    "description": "Upcoming asteroid close approaches to Earth, fireball events and Sentry impact-risk objects from NASA/JPL, plus an optional NASA NEO feed, as clean rows. Delta mode for new or revised events.",
    "version": "1.0",
    "x-build-id": "NkndwMeUhmyBu4pMI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datacrate~space-close-approach-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datacrate-space-close-approach-feed",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/datacrate~space-close-approach-feed/runs": {
      "post": {
        "operationId": "runs-sync-datacrate-space-close-approach-feed",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/datacrate~space-close-approach-feed/run-sync": {
      "post": {
        "operationId": "run-sync-datacrate-space-close-approach-feed",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "sources": {
            "title": "Data sources",
            "type": "array",
            "description": "Which NASA/JPL datasets to return. closeApproaches = upcoming asteroid and comet passes near Earth, fireballs = bright atmospheric impact events, sentry = objects with a non-zero Earth impact probability, neoFeed = NASA's NeoWs daily feed (optional, uses the API key below).",
            "items": {
              "type": "string",
              "enum": [
                "closeApproaches",
                "fireballs",
                "sentry",
                "neoFeed"
              ],
              "enumTitles": [
                "Close approaches (JPL)",
                "Fireballs (JPL)",
                "Sentry impact-risk list (JPL)",
                "NASA NEO feed (NeoWs, optional)"
              ]
            },
            "default": [
              "closeApproaches",
              "fireballs",
              "sentry"
            ]
          },
          "daysAhead": {
            "title": "Close approaches: days ahead",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Look this many days into the future, starting today (UTC).",
            "default": 30
          },
          "maxDistanceLunar": {
            "title": "Close approaches: max distance (lunar distances)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Only passes closer than this. 1 lunar distance (LD) is about 384,400 km. 20 LD is a good 'close pass' threshold; the Moon is 1 LD.",
            "default": 20
          },
          "onlyPotentiallyHazardous": {
            "title": "Close approaches: only potentially hazardous asteroids",
            "type": "boolean",
            "description": "Restrict to objects NASA classes as potentially hazardous (PHAs).",
            "default": false
          },
          "maxAbsoluteMagnitude": {
            "title": "Close approaches: max absolute magnitude (H)",
            "minimum": 0,
            "maximum": 40,
            "type": "number",
            "description": "Optional size filter. Lower H means a bigger object (H 22 is roughly 140 m or larger). Leave empty for everything."
          },
          "fireballDays": {
            "title": "Fireballs: days of history",
            "minimum": 1,
            "maximum": 36500,
            "type": "integer",
            "description": "Return fireball events detected in the last N days.",
            "default": 365
          },
          "fireballMinImpactKt": {
            "title": "Fireballs: min impact energy (kilotons)",
            "minimum": 0,
            "type": "number",
            "description": "Optional. Skip small events. 0.1 kt is about 100 tons of TNT."
          },
          "sentryMinPalermoScale": {
            "title": "Sentry: min cumulative Palermo scale",
            "minimum": -30,
            "maximum": 10,
            "type": "number",
            "description": "Optional. Keep only objects at or above this cumulative Palermo scale value (for example -4). Rows are sorted from highest risk to lowest. Leave empty for the full list."
          },
          "nasaApiKey": {
            "title": "NASA API key (optional, NEO feed only)",
            "type": "string",
            "description": "Only used for the NASA NEO feed source. Without a key the shared DEMO_KEY is used, which allows only a few calls per hour. Get a free key at api.nasa.gov. Stored as a secret."
          },
          "neoFeedDays": {
            "title": "NEO feed: number of days",
            "minimum": 1,
            "maximum": 7,
            "type": "integer",
            "description": "NASA NEO feed only: how many days from today (1 to 7).",
            "default": 3
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound on rows (and on cost). With several sources the rows are shared out evenly across them.",
            "default": 15
          },
          "onlyNewSinceLastRun": {
            "title": "Delta mode (only new or revised events)",
            "type": "boolean",
            "description": "Skip rows already returned by an earlier run with the same state name and unchanged since. The first run returns everything and sets the baseline. Each row gets changeType new or revised.",
            "default": false
          },
          "stateKey": {
            "title": "State name (delta mode)",
            "type": "string",
            "description": "Use different names to keep separate watchlists.",
            "default": "default"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}