Skip to content
GET/api/hazard/earthquake/1 credit

Earthquake events

A pass-through proxy for the United States Geological Survey FDSN earthquake event service. This is a historical and near-real-time seismology dataset, not an astrological calculation; it is here so that mundane and event-correlation work can pull the events and the chart data through one API. Every query parameter is forwarded to USGS unchanged, so the full FDSN vocabulary applies: `starttime` and `endtime` in ISO 8601 (defaulting to the last thirty days), a bounding box via `minlatitude`/`maxlatitude`/`minlongitude`/`maxlongitude` or a circle via `latitude`/`longitude` with `maxradius` or `maxradiuskm`, `minmagnitude`/`maxmagnitude`, `mindepth`/`maxdepth`, `minsig`/`maxsig`, PAGER `alertlevel`, `eventtype`, `reviewstatus`, `limit` up to 20000, `offset` and `orderby`. The response is the USGS GeoJSON FeatureCollection as returned: a `metadata` object with the result `count`, and a `features` list in which each entry has a `geometry` giving [longitude, latitude, depth in km] and a `properties` object with magnitude, place description, epoch-millisecond `time`, felt reports, Mercalli and Community intensity, significance, a tsunami flag and the USGS event page URL. The `format` parameter is ignored and always forced to geojson. If USGS cannot be reached the endpoint returns 503.

https://api.occultapi.com/api/hazard/earthquake/
Test Request

Authentication

Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.

X-API-Key: yt_live_a1b2c3d4_…

Query parameters (42)

Passed in the URL. All optional unless marked, and they combine — filter, then page, then sort.

ParameterTypeExampleWhat it does
alertlevelstringgreenLimit to events with a specific PAGER alert levelone of: green, orange, red, yellow
catalogstring—Limit to events from a specific catalog
contributorstring—Limit to events contributed by a specific contributor
endtimestring2024-12-31End of time window (ISO8601). Default: present time

ISO date, or a date-time. Inclusive.

eventidstring—Select a specific event by ID (implies includeallorigins and includeallmagnitudes)

FREE-FORM USGS event ID (e.g. 'us7000abcd'. Selecting one implies includeallorigins and includeallmagnitudes. Proxied verbatim.

eventtypestring—Limit to events of a specific type (e.g. 'earthquake' filters non-earthquake events)
includeallmagnitudesboolean—Include all magnitudes for each event (default: false)
includealloriginsboolean—Include all origins for each event (default: false)
includearrivalsboolean—Include phase arrivals (default: false, NOT CURRENTLY IMPLEMENTED)
includedeletedstring—Include deleted events (default: false). Use 'only' to return only deleted events

The endpoint's own parameter description documents it as boolean-plus-'only' ("Include deleted events (default: false). Use 'only' to return only deleted events". There is no local check - the value is proxied to USGS, which owns the validation.

one of: true, false, only
includesupersededboolean—Include superseded products (default: false). Only works with eventid
latitudenumber26.9124Center latitude for circle search [-90, 90]. Requires longitude and maxradius/maxradiuskm

Centre of a circular search, used with longitude and maxradiuskm.

limitinteger20Max number of events to return [1, 20000]

How many records to return per page.

longitudenumber75.7873Center longitude for circle search [-180, 180]
maxalertlevelstringgreenLimit to events with PAGER alert level ≤ this valueone of: green, orange, red, yellow
maxcdinumber—Maximum Community Determined Intensity (DYFI) [0, 12]
maxdepthnumber—Max depth in km [-100, 1000]
maxgapnumber—Max azimuthal gap in degrees [0, 360]
maxlatitudenumber—Bounding box northern boundary [-90, 90]
maxlongitudenumber—Bounding box eastern boundary [-360, 360]
maxmagnitudenumber9Max magnitude
maxmminumber—Maximum Modified Mercalli Intensity (ShakeMap) [0, 12]
maxradiusnumber—Max radius in degrees from center point [0, 180]. Mutually exclusive with maxradiuskm
maxradiuskmnumber500Max radius in km from center point [0, 20001.6]. Mutually exclusive with maxradius

Search radius in kilometres around latitude/longitude.

maxsiginteger—Max significance
minalertlevelstringgreenLimit to events with PAGER alert level ≥ this valueone of: green, orange, red, yellow
mincdinumber—Minimum Community Determined Intensity (DYFI)
mindepthnumber—Min depth in km [-100, 1000]
minfeltinteger—Minimum number of DYFI responses [1, ∞]
mingapnumber—Min azimuthal gap in degrees [0, 360]
minlatitudenumber—Bounding box southern boundary [-90, 90]
minlongitudenumber—Bounding box western boundary [-360, 360]. Rectangles may cross the date line by using minlongitude < -180 or maxlongitude > 180
minmagnitudenumber6Min magnitude

Richter magnitude floor. 6 and above is a major earthquake.

minsiginteger—Min significance
nodatainteger204HTTP status code returned when no data is found (204 or 404)one of: 204, 404
offsetinteger0Return results starting at this count (1-based)

How many records to skip, for paging.

orderbystringmagnitudeOrder results by fieldone of: magnitude, magnitude-asc, time, time-asc
productcodestring—Return the event associated with this product code

FREE-FORM USGS product code. Proxied verbatim.

producttypestring—Limit to events with this product type (e.g. moment-tensor, focal-mechanism, shakemap, losspager, dyfi)
reviewstatusstringautomaticLimit to events with a specific review statusone of: automatic, reviewed
starttimestring2024-01-01Start of time window (ISO8601, e.g. 2022-01-01 or 2022-01-01T00:00:00). Default: NOW - 30 days

ISO date, or a date-time. Inclusive.

updatedafterstring—Limit to events updated after this time (ISO8601)

FORMAT constraint. ISO 8601. Forwarded verbatim to USGS.

Example request

curl "https://api.occultapi.com/api/hazard/earthquake/" \
  -H "X-API-Key: $OCCULT_API_KEY"

Response

{
  "_truncated": true,
  "_note": "Response shortened for the catalogue.",
  "preview": "{\"type\": \"FeatureCollection\", \"metadata\": {\"generated\": 1788775941000, \"url\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson\", \"title\": \"USGS Earthquakes\", \"status\": 200, \"api\": \"2.7.0\", \"count\": 10949}, \"features\": [{\"type\": \"Feature\", \"properties\": {\"mag\": 1.3, \"place\": \"78 km WNW of Tyonek, Alaska\", \"time\": 1788775260489, \"updated\": 1788775310002, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/aka2026rsrmqf\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=aka2026rsrmqf&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 26, \"net\": \"ak\", \"code\": \"a2026rsrmqf\", \"ids\": \",aka2026rsrmqf,\", \"sources\": \",ak,\", \"types\": \",origin,phase-data,\", \"nst\": 17, \"dmin\": 0, \"rms\": 0.3, \"gap\": 92, \"magType\": \"ml\", \"type\": \"earthquake\", \"title\": \"M 1.3 - 78 km WNW of Tyonek, Alaska\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-152.516, 61.307, 4.2]}, \"id\": \"aka2026rsrmqf\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 2.2, \"place\": \"36 km W of Happy Valley, Alaska\", \"time\": 1788774950719, \"updated\": 1788775176753, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/aka2026rsridv\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=aka2026rsridv&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 74, \"net\": \"ak\", \"code\": \"a2026rsridv\", \"ids\": \",aka2026rsridv,\", \"sources\": \",ak,\", \"types\": \",origin,phase-data,\", \"nst\": 68, \"dmin\": 0.3, \"rms\": 0.6, \"gap\": 53, \"magType\": \"ml\", \"type\": \"earthquake\", \"title\": \"M 2.2 - 36 km W of Happy Valley, Alaska\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-152.39, 59.98, 79.6]}, \"id\": \"aka2026rsridv\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 1.7, \"place\": \"28 km NNW of Pāhala, Hawaii\", \"time\": 1788774479410, \"updated\": 1788774689400, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/hv75030377\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=hv75030377&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 44, \"net\": \"hv\", \"code\": \"75030377\", \"ids\": \",hv75030377,\", \"sources\": \",hv,\", \"types\": \",origin,phase-data,\", \"nst\": 17, \"dmin\": 0.0364, \"rms\": 0.200000003, \"gap\": 68, \"magType\": \"md\", \"type\": \"earthquake\", \"title\": \"M 1.7 - 28 km NNW of Pāhala, Hawaii\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-155.594665527344, 19.4323329925537, 37.8300018310547]}, \"id\": \"hv75030377\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 0.7, \"place\": \"6 km WNW of Cobb, CA\", \"time\": 1788774330340, \"updated\": 1788775642619, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/nc75431077\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=nc75431077&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 8, \"net\": \"nc\", \"code\": \"75431077\", \"ids\": \",nc75431077,\", \"sources\": \",nc,\", \"types\": \",nearby-cities,origin,phase-data,scitech-link,\", \"nst\": 8, \"dmin\": 0.002696, \"rms\": 0.01, \"gap\": 122, \"magType\": \"md\", \"type\": \"earthquake\", \"title\": \"M 0.7 - 6 km WNW of Cobb, CA\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-122.793663024902, 38.8376655578613, 1.87999999523163]}, \"id\": \"nc75431077\"}, {\"type\": \"Feature\", \"properties\": {\"mag\": 1.5, \"place\": \"29 km W of Toyah, Texas\", \"time\": 1788773169470, \"updated\": 1788773302767, \"tz\": null, \"url\": \"https://earthquake.usgs.gov/earthquakes/eventpage/tx2026rpuovc\", \"detail\": \"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=tx2026rpuovc&format=geojson\", \"felt\": null, \"cdi\": null, \"mmi\": null, \"alert\": null, \"status\": \"automatic\", \"tsunami\": 0, \"sig\": 35, \"net\": \"tx\", \"code\": \"2026rpuovc\", \"ids\": \",tx2026rpuovc,\", \"sources\": \",tx,\", \"types\": \",origin,phase-data,\", \"nst\": 5, \"dmin\": 0.2, \"rms\": 1.2, \"gap\": 215, \"magType\": \"ml\", \"type\": \"earthquake\", \"title\": \"M 1."
}

Captured from a real call using the exact request above. Results sit under data.

Errors

Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.