NASA API: List near-Earth asteroids
Lists near-Earth asteroids that pass Earth between two UTC dates within a chosen distance, with approach times, size ranges, speed and hazard status.
Unofficial. Not affiliated with or endorsed by NASA.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- End Date optional
end_date Last UTC calendar day to include, as YYYY-MM-DD (for example 2026-10-06). Defaults to seven days after the start date and cannot be later.
2026-10-06
- Start Date optional
start_date First UTC calendar day to include, as YYYY-MM-DD (for example 2026-09-29). Defaults to today (UTC).
2026-09-29
- Max Distance (miles) optional
max_distance_miles Maximum Earth miss distance in miles (for example 5000000). Defaults to 5,000,000 miles.
5000000 (default)
Number 0 or more.
Input as JSON
{ "end_date": "2026-10-06", "start_date": "2026-09-29"}Output
{ "asteroids": [ { "speed_kmh": 27911.05, "speed_mph": 17343.12, "size_basis": "estimated from brightness", "asteroid_name": "2026 TL4", "jpl_page_link": "https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2026%20TL4" , "size_max_feet": 160.04, "size_min_feet": 71.57, "size_max_meters": 48.78, "size_min_meters": 21.81, "miss_distance_km": 6112843.08, "miss_distance_miles": 3798344.59, "potentially_hazardous": "no", "closest_approach_time_utc": "2026-09-29T02:55:18+00:00", "miss_distance_moon_distances": 15.9023 }, { "speed_kmh": 47168.85, "speed_mph": 29309.37, "size_basis": "estimated from brightness", "asteroid_name": "2017 TE2", "jpl_page_link": "https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2017%20TE2" , "size_max_feet": 432.54, "size_min_feet": 193.44, "size_max_meters": 131.84, "size_min_meters": 58.96, "miss_distance_km": 3160723.31, "miss_distance_miles": 1963982.41, "potentially_hazardous": "no", "closest_approach_time_utc": "2026-09-29T08:50:49+00:00", "miss_distance_moon_distances": 8.2225 }, { "speed_kmh": 39636.03, "speed_mph": 24628.69, "size_basis": "estimated from brightness", "asteroid_name": "2026 TG1", "jpl_page_link": "https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/?sstr=2026%20TG1" , "size_max_feet": 145.35, "size_min_feet": 65, "size_max_meters": 44.3, "size_min_meters": 19.81, "miss_distance_km": 2687422.27, "miss_distance_miles": 1669886.78, "potentially_hazardous": "no", "closest_approach_time_utc": "2026-09-29T12:16:32+00:00", "miss_distance_moon_distances": 6.9912 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"nasa.gov/list_near_earth_asteroids","input":{"end_date":"2026-10-06","start_date":"2026-09-29"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "nasa.gov/list_near_earth_asteroids" , "input": { "end_date": "2026-10-06", "start_date": "2026-09-29" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "nasa.gov/list_near_earth_asteroids" , "input": { "end_date": "2026-10-06", "start_date": "2026-09-29" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run nasa.gov/list_near_earth_asteroids# with {"end_date":"2026-10-06","start_date":"2026-09-29"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [], "properties": { "end_date": { "type": "string", "description": "Last UTC calendar day to include, as YYYY-MM-DD (for example 2026-10-06). Defaults to seven days after the start date and cannot be later." }, "start_date": { "type": "string", "description": "First UTC calendar day to include, as YYYY-MM-DD (for example 2026-09-29). Defaults to today (UTC)." }, "max_distance_miles": { "type": "number", "default": 5000000, "minimum": 0, "description": "Maximum Earth miss distance in miles (for example 5000000). Defaults to 5,000,000 miles." } }}Output schema
{ "type": "object", "required": [ "asteroids" ], "properties": { "asteroids": { "type": "array", "items": { "type": "object", "required": [ "asteroid_name", "closest_approach_time_utc", "miss_distance_miles", "miss_distance_km", "miss_distance_moon_distances", "size_min_meters", "size_max_meters", "size_min_feet", "size_max_feet", "size_basis", "speed_mph", "speed_kmh", "potentially_hazardous", "jpl_page_link" ], "properties": { "speed_kmh": { "type": "number" }, "speed_mph": { "type": "number" }, "size_basis": { "type": "string", "description": "Measured diameter or estimated from brightness; unavailable if no size or brightness is known." }, "asteroid_name": { "type": "string", "description": "Asteroid name or designation." }, "jpl_page_link": { "type": "string" }, "size_max_feet": { "type": [ "number", "null" ] }, "size_min_feet": { "type": [ "number", "null" ] }, "size_max_meters": { "type": [ "number", "null" ] }, "size_min_meters": { "type": [ "number", "null" ] }, "miss_distance_km": { "type": "number" }, "miss_distance_miles": { "type": "number" }, "potentially_hazardous": { "enum": [ "yes", "no" ], "type": "string" }, "closest_approach_time_utc": { "type": "string", "description": "Closest approach in UTC (ISO 8601)." }, "miss_distance_moon_distances": { "type": "number" } } }, "description": "Asteroid approaches ordered by closest approach time in UTC. Empty if none match." } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
nasa.gov/list_near_earth_asteroids- Returns
- asteroid name, closest approach time (UTC), miss distance, size range, speed, hazard status, JPL link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method nasa.gov/list_near_earth_asteroids with the inputs above.
Ask your agent
- Which near-Earth asteroids will pass Earth between 2026-09-29 and 2026-10-06 within 5 million miles, and when is each closest approach in UTC?
- Show me potentially hazardous asteroids flying past our planet next week closer than 2 million miles, with their speeds and size estimates.
- I need a list of asteroids approaching Earth from March 3 to March 10 within 1,000,000 miles, including miss distance and JPL links.
- What near-Earth objects are passing by in the coming weeks on NASA's site, and how large and fast are they?
- Give me the close approaches of near-Earth asteroids for 2026-11-01 through 2026-11-15 within 10 million miles, flagging which ones are classed as hazardous.
See more
All NASA methodsList EONET natural events with latest observations in the past number of days, most recent first. A country or region filter matches reported event locations against mapped boundaries; locations and ongoing status are approximate, and not all events have a reported size or strength.
nasa.gov/list_natural_eventsReturns NASA's Astronomy Picture of the Day for a date: title, explanation, featured media link, optional high-resolution link, and credit.
nasa.gov/get_astronomy_picture_of_the_dayFinds upcoming International Space Station sightings for a city in NASA's city list, with local start times, visibility and sky directions. Cities without scheduled passes return an empty list.
nasa.gov/get_iss_sightingsSearches NASA public photos, videos or audio by words and creation year, returning matches in relevance order with thumbnails and full-size file links.
nasa.gov/search_imagesLists NOAA space weather alerts, warnings, watches and summaries issued in the last 1 to 7 days, newest first, with validity times and NOAA scale levels when the message gives them.
swpc.noaa.gov/list_space_weather_alertsCounts weekdays between two dates, excluding nationwide public holidays or, optionally, public holidays in a state or province, from Time and Date's published holiday calendar.
timeanddate.com/count_business_daysGets the latest or a dated public parkrun event result, with finishers in position order. If a name matches several events, the closest directory name match is used.
parkrun.com/get_event_resultsLists significant worldwide earthquakes for the past day, week, or month, newest first, with USGS PAGER alert levels and impact summaries when USGS provides them.
earthquake.usgs.gov/list_significant_earthquakes