USGS API: Search earthquakes near a place
Finds recent USGS earthquakes near a city, address, or region, with distances and times in the searched place's time zone.
Unofficial. Not affiliated with or endorsed by USGS.
Inputs
Values from the run on Oct 27, 2026, shown under Output.
- Sort optional
sort Order earthquakes by newest or largest.
largest
One of
newest,largest. Defaultnewest.- Place, required
place City, address, or region to search near, for example Los Angeles, CA.
Tokyo, Japan
- Days Back optional
days_back Number of past days to search, for example 7.
30
Whole number from 1 to 365. Default
7.- Max Results optional
max_results Maximum number of earthquakes to return, for example 50.
5
Whole number from 1 to 200. Default
50.- Radius (miles) optional
radius_miles Search radius in miles, for example 100.
300
Number from 0 to 1000. Default
100.- Minimum Magnitude optional
minimum_magnitude Smallest earthquake magnitude to include, for example 2.5.
4
Number. Default
2.5.
Input as JSON
{ "sort": "largest", "place": "Tokyo, Japan", "days_back": 30, "max_results": 5, "radius_miles": 300, "minimum_magnitude": 4}Output
{ "earthquakes": [ { "depth_km": 41.649, "latitude": 35.7025, "location": "0 km NNE of Yōkaichiba, Japan", "time_utc": "2026-10-01T12:27:11.864+00:00", "longitude": 140.5507, "magnitude": 5.3, "alert_level": null, "depth_miles": 25.88, "distance_km": 77.58, "details_link": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000tytg" , "felt_reports": 25, "time_at_place": "0NaN-NaN-NaNTNaN:NaN:NaN.NaN0N:aN", "tsunami_alert": "no", "usgs_event_id": "us6000tytg", "distance_miles": 48.21 }, { "depth_km": 73.037, "latitude": 35.6751, "location": "3 km WSW of Shibayama, Japan", "time_utc": "2026-10-07T19:13:50.830+00:00", "longitude": 140.3957, "magnitude": 4.9, "alert_level": null, "depth_miles": 45.38, "distance_km": 63.6, "details_link": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000u0u7" , "felt_reports": 4, "time_at_place": "0NaN-NaN-NaNTNaN:NaN:NaN.NaN0N:aN", "tsunami_alert": "no", "usgs_event_id": "us6000u0u7", "distance_miles": 39.52 }, { "depth_km": 68.519, "latitude": 36.0471, "location": "5 km S of Sakai, Japan", "time_utc": "2026-09-28T19:45:07.179+00:00", "longitude": 139.7894, "magnitude": 4.9, "alert_level": null, "depth_miles": 42.58, "distance_km": 40.73, "details_link": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000ty7u" , "felt_reports": 69, "time_at_place": "0NaN-NaN-NaNTNaN:NaN:NaN.NaN0N:aN", "tsunami_alert": "no", "usgs_event_id": "us6000ty7u", "distance_miles": 25.31 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"earthquake.usgs.gov/search_earthquakes","input":{"sort":"largest","place":"Tokyo, Japan","days_back":30,"max_results":5,"radius_miles":300,"minimum_magnitude":4}}' # 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": "earthquake.usgs.gov/search_earthquakes" , "input": { "sort": "largest", "place": "Tokyo, Japan", "days_back": 30, "max_results": 5, "radius_miles": 300, "minimum_magnitude": 4 }})# 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": "earthquake.usgs.gov/search_earthquakes" , "input": { "sort": "largest", "place": "Tokyo, Japan", "days_back": 30, "max_results": 5, "radius_miles": 300, "minimum_magnitude": 4 } }), 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 earthquake.usgs.gov/search_earthquakes# with {"sort":"largest","place":"Tokyo, Japan","days_back":30,"max_results":5,"radius_miles":300,"minimum_magnitude":4}"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": [ "place" ], "properties": { "sort": { "enum": [ "newest", "largest" ], "type": "string", "default": "newest", "description": "Order earthquakes by newest or largest." }, "place": { "type": "string", "description": "City, address, or region to search near, for example Los Angeles, CA." }, "days_back": { "type": "integer", "default": 7, "maximum": 365, "minimum": 1, "description": "Number of past days to search, for example 7." }, "max_results": { "type": "integer", "default": 50, "maximum": 200, "minimum": 1, "description": "Maximum number of earthquakes to return, for example 50." }, "radius_miles": { "type": "number", "default": 100, "maximum": 1000, "description": "Search radius in miles, for example 100.", "exclusiveMinimum": 0 }, "minimum_magnitude": { "type": "number", "default": 2.5, "description": "Smallest earthquake magnitude to include, for example 2.5." } }, "additionalProperties": false}Output schema
{ "type": "object", "required": [ "earthquakes" ], "properties": { "earthquakes": { "type": "array", "items": { "type": "object", "required": [ "magnitude", "location", "time_at_place", "time_utc", "depth_km", "depth_miles", "distance_miles", "distance_km", "tsunami_alert", "felt_reports", "alert_level", "details_link", "usgs_event_id", "latitude", "longitude" ], "properties": { "depth_km": { "type": [ "number", "null" ], "description": "Earthquake depth in kilometers." }, "latitude": { "type": "number", "description": "Epicenter latitude.", "x-fous-developer": true }, "location": { "type": [ "string", "null" ], "description": "Earthquake location in words." }, "time_utc": { "type": "string", "description": "Earthquake time in UTC, ISO 8601." }, "longitude": { "type": "number", "description": "Epicenter longitude.", "x-fous-developer": true }, "magnitude": { "type": [ "number", "null" ], "description": "Earthquake magnitude." }, "alert_level": { "type": [ "string", "null" ], "description": "USGS alert level in words, if available." }, "depth_miles": { "type": [ "number", "null" ], "description": "Earthquake depth in miles." }, "distance_km": { "type": "number", "description": "Distance from the searched place in kilometers." }, "details_link": { "type": "string", "description": "USGS earthquake details page." }, "felt_reports": { "type": [ "integer", "null" ], "description": "Number of felt reports, if known." }, "time_at_place": { "type": "string", "description": "Earthquake time in the searched place's time zone, ISO 8601 with offset." }, "tsunami_alert": { "enum": [ "yes", "no" ], "type": "string", "description": "Whether the USGS flags the earthquake as a possible tsunami." }, "usgs_event_id": { "type": "string", "description": "USGS event ID.", "x-fous-developer": true }, "distance_miles": { "type": "number", "description": "Distance from the searched place in miles." } }, "additionalProperties": false }, "description": "Recent earthquakes near the searched place." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
earthquake.usgs.gov/search_earthquakes- Returns
- magnitude, location, times (UTC and local), depth, distance, tsunami flag, felt reports, alert level, USGS details 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 earthquake.usgs.gov/search_earthquakes with the inputs above.
Ask your agent
- Show me earthquakes near Anchorage, Alaska from the past 14 days with magnitude 3 or higher, sorted by largest first.
- Any recent quakes around Tokyo within 200 miles in the last 30 days?
- I'm moving to Reno, NV next week. What seismic activity has there been nearby over the last 3 months, limited to magnitude 2.5 and up?
- List the 20 newest earthquakes within 75 miles of Santiago, Chile in the past week, including depth and whether a tsunami was flagged.
- Did anything shake near Christchurch, New Zealand in the last 60 days? Give me the strongest ones within 150 miles with their local times and felt reports.
See more
All USGS methodsLists 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_earthquakesGets the latest water height, flow, 24-hour trend and flood-stage status at the active USGS river gauge best matching a river or town and state. Flood stage is null when not published; gauges without recent stage, flow or 24-hour history are not returned.
waterdata.usgs.gov/get_river_levelFinds businesses and places near a location on Google Maps, in Google Maps order, with rating, hours, contact details and links when shown.
google.com/search_placesFinds a place on Google Maps by name and location and returns its public reviews in the chosen order.
google.com/get_place_reviewsLooks up a public Google Maps place by name and location and returns its profile: address, rating, hours, phone, website and photos.
google.com/get_placeFinds GreatSchools schools within 5 miles of a US address, city or ZIP code. Results can be filtered by grade and school type and sorted by distance or rating.
greatschools.org/search_schoolsList 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_eventsLists active US weather watches, warnings and advisories for a city, address, ZIP code or state, most severe first, then newest.
weather.gov/list_weather_alerts