BYTETOOLS

USGS Earthquake API

Free USGS earthquake API with no key: live global seismic events as GeoJSON, filterable by magnitude, time and location. Tested curl example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 19 Aug 2026

What is the USGS Earthquake API?

The USGS Earthquake API provides free real-time and historical earthquake data as GeoJSON. It covers global seismic events with filtering by magnitude, date range, location and depth, and requires no API key.

This is authoritative open government data from the United States Geological Survey, updated within minutes of an event being detected. It is not an aggregator or a scrape — it is the primary source that news organisations use.

The response is standard GeoJSON, which means it drops directly into Leaflet, Mapbox or any mapping library with no transformation. One detail worth noting: GeoJSON coordinates are ordered `[longitude, latitude, depth]`, which is the reverse of the lat/lon order most people expect.

Quick facts

Base URL
https://earthquake.usgs.gov/fdsnws/event/1
Authentication
No key required.
Rate limit
No published hard limit; USGS asks that you avoid excessive polling and use date filters.
Pricing
Free public domain government data.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the USGS Earthquake API

Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. Fetch the most recent earthquake

GET https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time

curl
curl 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time'
JavaScript (fetch)
const res = await fetch("https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "type": "FeatureCollection",
  "metadata": {
    "generated": 1787144815000,
    "url": "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=1&orderby=time",
    "title": "USGS Earthquakes",
    "status": 200,
    "api": "2.7.0",
    "limit": 1,
    "offset": 1
  },
  "features": [
    {
      "type": "Feature",
      "properties": {
        "mag": 1.79,
        "place": "23 km SE of Naalehu, Hawaii",
        "time": 1787143340800,
        "updated": 1787143562450,
        "tz": null,
        "url": "https://earthquake.usgs.gov/earthquakes/eventpage/hv75020732",
        "detail": "https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=hv75020732&format=geojson",
        "felt": null,
        "cdi": null,
        "mmi": null,
        "alert": null,
        "status": "automatic",
        "tsunami": 0,
        "sig": 49,
        "net": "hv",
        "code": "75020732",
        "ids": ",hv75020732,",
        "sources": ",hv,",
        "types": ",origin,phase-data,",
        "nst": 12,
        "dmin": 0.2264,
        "rms": 0.109999999,
        "gap": 259,
        "magType": "md",
        "type": "earthquake",
        "title": "M 1.8 - 23 km SE of Naalehu, Hawaii"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          -155.446166992188,
          18.8939990997314,
          29.6000003814697
        ]
      },
      "id": "hv75020732"
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
formatstringRequiredUse `geojson` for map-ready output. geojson
limitintegerOptionalMaximum number of events. 10
minmagnitudefloatOptionalOnly return events at or above this magnitude. 4.5
starttime / endtimestringOptionalISO dates bounding the query. 2026-01-01
latitude / longitude / maxradiuskmfloatOptionalRestrict to a circular region. 31.5
orderbystringOptionaltime, time-asc, magnitude or magnitude-asc. magnitude

Response fields

featuresarray
GeoJSON features, one per earthquake.
features[].properties.magfloat
Magnitude of the event.
features[].properties.placestring
Human-readable location description.
features[].properties.timeinteger
Event time as Unix milliseconds, not seconds.
features[].geometry.coordinatesarray
[longitude, latitude, depth in km] — note the order.
metadata.countinteger
Number of events returned.

What you can build with the USGS Earthquake API

  • Plot live earthquakes on an interactive map
  • Alert users to significant seismic events near a location
  • Research historical seismic activity over date ranges
  • Build data visualisations and educational science resources

Common errors and how to fix them

400

Invalid parameter combination or malformed date.

Fix: Use ISO 8601 dates and check that minmagnitude is numeric.

Markers plotted in the wrong place

GeoJSON orders coordinates as [longitude, latitude].

Fix: Swap them — most mapping code expects latitude first.

Timestamps far in the future

`time` is Unix milliseconds, not seconds.

Fix: Do not multiply by 1000 again; pass it straight to a Date constructor.

USGS Earthquake API — frequently asked questions

Is the USGS earthquake API free?

Yes, completely free with no API key. It is public domain US government data, updated within minutes of detection.

What format does the USGS API return?

Several, but GeoJSON is the most useful — it drops straight into Leaflet, Mapbox or any standard mapping library without transformation.

Why are my earthquake markers in the wrong location?

GeoJSON stores coordinates as [longitude, latitude, depth], which is the opposite order to what most mapping code expects. Swap the first two values.

How do I get only significant earthquakes?

Use `minmagnitude` — 4.5 and above captures events that are typically newsworthy, while the default returns everything including tiny tremors.

Tools that pair with this API

Alternatives to USGS Earthquake API

If USGS Earthquake does not fit, these science & space apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
NASA APODFree NASA Astronomy Picture of the Day API. Daily space images with expert explanations, HD URLs and archive access back to 1995. Tested curl example.KeyYes19 Aug 2026
Open Notify ISSFree API returning the International Space Station's live latitude and longitude. No key, updates in real time. Tested curl example and live JSON response.No keyYes19 Aug 2026
Launch Library 2Free rocket launch API with no key: upcoming and past launches from every space agency, with rockets, missions, pads and live stream links. Tested example.No keyYes19 Aug 2026
Wikipedia REST APIFree Wikipedia REST API with no key: article summaries, extracts, thumbnails and full content in 300+ languages. CORS enabled. Tested curl example.No keyYes19 Aug 2026
Where the ISS at?Free ISS tracking API with no key: live position, altitude, velocity, footprint and solar position, plus TLE orbital elements and future position prediction. Tested.No keyYes20 Aug 2026
ZenodoFree Zenodo API with no key for reads: search millions of research datasets, papers, software and figures from CERN's open repository with DOIs. Tested.No keyYes20 Aug 2026
All Science & Space APIs

USGS Earthquake is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.