{
  "openapi": "3.0.1",
  "info": {
    "title": "NASA Asteroid Close Approaches, NEO Lookup & Impact Risk",
    "description": "Asteroid and comet close approaches to Earth or another planet as rows: date in UTC, distance in lunar distances and km, speed, magnitude and estimated size. Plus object lookup by designation with orbit and physical data, the Sentry impact-risk table and recorded fireballs. Keyless NASA JPL data.",
    "version": "0.1",
    "x-build-id": "7WRmhbfArJV3ZDs3f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~nasa-asteroid-approaches/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-nasa-asteroid-approaches",
        "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/yadroo~nasa-asteroid-approaches/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-nasa-asteroid-approaches",
        "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/yadroo~nasa-asteroid-approaches/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-nasa-asteroid-approaches",
        "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": {
          "mode": {
            "title": "What to fetch",
            "enum": [
              "approaches",
              "object",
              "riskList",
              "fireballs"
            ],
            "type": "string",
            "description": "Four different questions, four different row shapes, one per run. `approaches` answers \"what passes close and when\". `object` answers \"what is known about this asteroid or comet\" for the designations you list. `riskList` is the Sentry table of objects with a non-zero computed chance of hitting Earth in the next century or later. `fireballs` is the record of bright meteors that entered the atmosphere, with location and energy. Read the dataset view that matches the mode: Close approaches, Object details, Impact risk, Fireballs.",
            "default": "approaches"
          },
          "designations": {
            "title": "Object designations",
            "type": "array",
            "description": "Objects to look up, written the way the source names them: a number (`99942`, `433`), a name (`Apophis`, `Bennu`), a provisional designation (`2024 YR4`), a comet designation (`1P`, `141P`) or an SPK-id (`20099942`). Required in `object` mode. In `approaches` mode it narrows the run to the approach record of these objects instead of a whole time window, which is how you follow one asteroid across a century. A designation the source does not know yields one row with `found: false` and the reason in `notFoundReason`; a designation that matches several objects yields one row per candidate in `matchedObjects` with `found: false`, so an ambiguous comet id never turns into a silently wrong row. Ignored in `riskList` and `fireballs` mode.",
            "items": {
              "type": "string"
            }
          },
          "includePhysicalParams": {
            "title": "Include physical parameters (object mode)",
            "type": "boolean",
            "description": "Add what is measured about the body itself: diameter, rotation period, geometric albedo, spectral type, bulk density and the absolute magnitude with its published reference. These come from the literature and are filled for well-studied objects only - a newly discovered object usually carries an absolute magnitude and nothing else, in which case the estimated-diameter range computed from that magnitude is all there is.",
            "default": true
          },
          "includeDiscovery": {
            "title": "Include discovery circumstances (object mode)",
            "type": "boolean",
            "description": "Add the discovery date, the observing site, the credited discoverers and, for named objects, the citation text that explains the name. Useful for catalogue and education work; switch it off to keep rows narrow.",
            "default": true
          },
          "body": {
            "title": "Approaches to which body",
            "enum": [
              "Earth",
              "Moon",
              "Merc",
              "Venus",
              "Mars",
              "Juptr",
              "Satrn",
              "Urnus",
              "Neptn",
              "Pluto",
              "ALL"
            ],
            "type": "string",
            "description": "Which body the object passes. Earth is what news and monitoring want; Mars matters for mission planning and Jupiter for orbital dynamics. `Every body` adds the `body` column to the result and mixes planets in one run, which is the honest way to see that a single asteroid passes Venus, Earth and Mars in the same decade. Distances to the outer planets are large numbers of lunar distances, so raise the distance limit for them.",
            "default": "Earth"
          },
          "maxDistanceLd": {
            "title": "Closer than N lunar distances",
            "minimum": 0.001,
            "maximum": 2000,
            "type": "number",
            "description": "Upper bound on the approach distance in lunar distances (1 LD = 384 400 km, the average Earth-Moon distance). 1 keeps only the rare passages inside the Moon's orbit, 10 is a normal monitoring window, 20 is roughly the source's own default of 0.05 astronomical units. Every row carries the same distance in kilometres, astronomical units and lunar distances, so you never convert by hand.",
            "default": 10
          },
          "minDistanceLd": {
            "title": "Farther than N lunar distances",
            "minimum": 0,
            "maximum": 2000,
            "type": "number",
            "description": "Lower bound on the approach distance, for cutting one band out of the table - for example between 1 and 5 lunar distances. Empty = no lower bound."
          },
          "objectKind": {
            "title": "Kind of object",
            "enum": [
              "neo",
              "nea",
              "comet",
              "neaAndComet"
            ],
            "type": "string",
            "description": "Near-Earth objects are the ones whose orbit comes within 1.3 astronomical units of the Sun, which is the population that produces close approaches; that is the source's own default. Choose comets to watch the few that come near a planet, or the mixed option to see near-Earth asteroids together with comets from farther out.",
            "default": "neo"
          },
          "orbitClass": {
            "title": "Orbit class",
            "enum": [
              "IEO",
              "ATE",
              "APO",
              "AMO",
              "MCA",
              "IMB",
              "MBA",
              "OMB",
              "TJN",
              "CEN",
              "TNO",
              "HTC",
              "JFC",
              "PAR",
              "HYP"
            ],
            "type": "string",
            "description": "Keep only objects the source files under this dynamical class. Aten and Apollo are the Earth-crossing families that most impact-risk objects belong to; Amor objects come close without crossing; the comet classes separate returning comets from the ones passing through once. Empty = every class. The full code list is printed in README > Reference dictionaries."
          },
          "onlyPotentiallyHazardous": {
            "title": "Only potentially hazardous objects",
            "type": "boolean",
            "description": "Keep only objects the source flags as potentially hazardous: an orbit that comes within 0.05 astronomical units of Earth's and an absolute magnitude of 22 or brighter, which is roughly 140 metres across. It is a standing property of the orbit, not a statement about a particular passage, and it is what public hazard lists are built from. Applies to `approaches` mode; in `object` mode the flag is reported in `isPotentiallyHazardous` instead of filtering.",
            "default": false
          },
          "minRelativeVelocityKms": {
            "title": "Faster than N km/s",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Lower bound on the speed of the object relative to the body at the moment of closest approach. Typical Earth encounters run between 3 and 30 km/s; the fast end is what makes a small object energetic."
          },
          "maxRelativeVelocityKms": {
            "title": "Slower than N km/s",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound on the same speed. Slow encounters are the ones a spacecraft could reach, which is why mission planners filter on them."
          },
          "maxAbsoluteMagnitude": {
            "title": "Brighter than absolute magnitude H (bigger objects)",
            "minimum": -10,
            "maximum": 40,
            "type": "number",
            "description": "Absolute magnitude H is the brightness an object would have at a standard distance; smaller H means a bigger body, so this is an upper bound on H and a lower bound on size. 22 is about 140 metres and the threshold used for hazard lists, 24 is about 60 metres, 28 is a few metres. Applies to `approaches` and `riskList`. Because size follows from brightness only when the reflectivity is known, every row carries `estimatedDiameterMinM` and `estimatedDiameterMaxM` computed from H for the usual reflectivity range, next to the measured `diameterKm` where one exists."
          },
          "minAbsoluteMagnitude": {
            "title": "Fainter than absolute magnitude H (smaller objects)",
            "minimum": -10,
            "maximum": 40,
            "type": "number",
            "description": "Lower bound on H, which keeps the smaller objects. Use it with the bound above to isolate one size band, for example H between 22 and 25 for objects of roughly 40 to 140 metres."
          },
          "dateFrom": {
            "title": "From (UTC)",
            "type": "string",
            "description": "Window start, written as a date (`2026-01-01`), a date and time (`2026-01-01T12:00:00`), the word `now`, or an offset in days from today (`+30`, `-365`). Offsets and `now` are resolved against the UTC date of the run before the request is sent, so a scheduled task keeps moving with time: `now` to `+30` is \"the next month\", `-365` to `now` is \"the past year\". Empty in `approaches` mode = now; empty in `fireballs` mode = one year back, because the fireball record only holds past events."
          },
          "dateTo": {
            "title": "To (UTC)",
            "type": "string",
            "description": "Window end in the same notation. Empty in `approaches` mode = 60 days after the start; empty in `fireballs` mode = now. When you list designations in `approaches` mode and leave both ends empty, the whole recorded span of those objects is used (1900 to 2100), because the point of naming an object is its full approach history rather than the next two months."
          },
          "onlyNew": {
            "title": "Only rows not seen in earlier runs",
            "type": "boolean",
            "description": "Remember the identity of every written row in this actor's key-value store - approach = object plus date, object = designation, risk = designation plus computation date, fireball = event time - and write only what is not there yet. Built for schedules: a daily run with `onlyNew` reports the approaches, Sentry entries and fireballs that appeared since the previous run, which is the shape an alert needs. The first run writes everything it matches, so start it once by hand before you schedule it.",
            "default": false
          },
          "minImpactProbability": {
            "title": "Impact probability at least",
            "minimum": 1e-10,
            "maximum": 1,
            "type": "number",
            "description": "Lower bound on the cumulative computed chance that the object hits Earth at some point in the monitored span, as a fraction: 0.0001 is one in ten thousand and keeps a couple of hundred objects, 0.01 is one in a hundred and keeps very few. Every row also carries `impactProbabilityOneIn`, the same number as \"one in N\", which is the form people actually read. The source is explicit that these probabilities rest on assumptions that are hard to verify and can be off by a factor of several."
          },
          "minPalermoScale": {
            "title": "Palermo scale at least",
            "minimum": -20,
            "maximum": 20,
            "type": "integer",
            "description": "Lower bound on the Palermo technical scale, which compares the hazard of one object with the ordinary background risk from objects of the same size: -2 means one hundred times less worrying than the background and already restricts the table to a handful of entries, 0 would mean comparable to it. The source accepts whole numbers here. Rows carry both the cumulative and the maximum value."
          },
          "observedWithinDays": {
            "title": "Observed in the last N days",
            "minimum": 7,
            "maximum": 36500,
            "type": "integer",
            "description": "Keep only Sentry objects whose newest observation is younger than this. Many entries rest on a handful of measurements from years ago and are on the table precisely because nobody has looked since; a window of 365 days gives you the objects under current observation."
          },
          "minImpactEnergyKt": {
            "title": "Impact energy at least (kilotons)",
            "minimum": 0,
            "maximum": 1000,
            "type": "number",
            "description": "Lower bound on the estimated total impact energy of a fireball, in kilotons of TNT equivalent. Most recorded events sit below 1 kt; a handful of the last twenty years reach tens of kilotons. Empty = every recorded event in the window."
          },
          "onlyWithLocation": {
            "title": "Only fireballs with a known location",
            "type": "boolean",
            "description": "Drop events whose latitude and longitude were not published, which is what you want when the rows go on a map. We convert the source's degrees-plus-hemisphere pair into signed decimal `latitude` and `longitude`, so a southern or western event does not silently become a northern or eastern one.",
            "default": false
          },
          "sortBy": {
            "title": "Sort rows by",
            "enum": [
              "date",
              "distance",
              "velocity",
              "size",
              "impactProbability",
              "palermoScale",
              "energy",
              "designation"
            ],
            "type": "string",
            "description": "The order applied before the row limit, so it decides which rows you keep when the filters match more than you asked for. Not every key fits every mode: impact probability and Palermo scale belong to `riskList`, energy to `fireballs`, distance and velocity to `approaches`. A key that does not apply falls back to date and says so in the run's status message rather than failing.",
            "default": "date"
          },
          "sortDescending": {
            "title": "Largest or newest first",
            "type": "boolean",
            "description": "Reverse the order above. Date ascending is the monitoring order (what comes next); descending gives the most recent past events, which is what you want for fireballs.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many rows. The source returns a whole filtered table in one response, so the limit is applied after sorting: a small number keeps the run short and cheap without changing which rows are the interesting ones. A century of approaches for one object or the full Sentry table can run into the hundreds.",
            "default": 50
          },
          "fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Keep only these fields, in this order, e.g. [\"designation\", \"approachTime\", \"distanceLd\", \"relativeVelocityKms\"]. Empty = every field of the mode.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}