/api/hazard/earthquake/1 creditEarthquake 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/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.
| Parameter | Type | Example | What it does | |
|---|---|---|---|---|
| alertlevel | string | green | Limit to events with a specific PAGER alert levelone of: green, orange, red, yellow | |
| catalog | string | — | Limit to events from a specific catalog | |
| contributor | string | — | Limit to events contributed by a specific contributor | |
| endtime | string | 2024-12-31 | End of time window (ISO8601). Default: present time ISO date, or a date-time. Inclusive. | |
| eventid | string | — | 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. | |
| eventtype | string | — | Limit to events of a specific type (e.g. 'earthquake' filters non-earthquake events) | |
| includeallmagnitudes | boolean | — | Include all magnitudes for each event (default: false) | |
| includeallorigins | boolean | — | Include all origins for each event (default: false) | |
| includearrivals | boolean | — | Include phase arrivals (default: false, NOT CURRENTLY IMPLEMENTED) | |
| includedeleted | string | — | 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 | |
| includesuperseded | boolean | — | Include superseded products (default: false). Only works with eventid | |
| latitude | number | 26.9124 | Center latitude for circle search [-90, 90]. Requires longitude and maxradius/maxradiuskm Centre of a circular search, used with longitude and maxradiuskm. | |
| limit | integer | 20 | Max number of events to return [1, 20000] How many records to return per page. | |
| longitude | number | 75.7873 | Center longitude for circle search [-180, 180] | |
| maxalertlevel | string | green | Limit to events with PAGER alert level ≤ this valueone of: green, orange, red, yellow | |
| maxcdi | number | — | Maximum Community Determined Intensity (DYFI) [0, 12] | |
| maxdepth | number | — | Max depth in km [-100, 1000] | |
| maxgap | number | — | Max azimuthal gap in degrees [0, 360] | |
| maxlatitude | number | — | Bounding box northern boundary [-90, 90] | |
| maxlongitude | number | — | Bounding box eastern boundary [-360, 360] | |
| maxmagnitude | number | 9 | Max magnitude | |
| maxmmi | number | — | Maximum Modified Mercalli Intensity (ShakeMap) [0, 12] | |
| maxradius | number | — | Max radius in degrees from center point [0, 180]. Mutually exclusive with maxradiuskm | |
| maxradiuskm | number | 500 | Max radius in km from center point [0, 20001.6]. Mutually exclusive with maxradius Search radius in kilometres around latitude/longitude. | |
| maxsig | integer | — | Max significance | |
| minalertlevel | string | green | Limit to events with PAGER alert level ≥ this valueone of: green, orange, red, yellow | |
| mincdi | number | — | Minimum Community Determined Intensity (DYFI) | |
| mindepth | number | — | Min depth in km [-100, 1000] | |
| minfelt | integer | — | Minimum number of DYFI responses [1, ∞] | |
| mingap | number | — | Min azimuthal gap in degrees [0, 360] | |
| minlatitude | number | — | Bounding box southern boundary [-90, 90] | |
| minlongitude | number | — | Bounding box western boundary [-360, 360]. Rectangles may cross the date line by using minlongitude < -180 or maxlongitude > 180 | |
| minmagnitude | number | 6 | Min magnitude Richter magnitude floor. 6 and above is a major earthquake. | |
| minsig | integer | — | Min significance | |
| nodata | integer | 204 | HTTP status code returned when no data is found (204 or 404)one of: 204, 404 | |
| offset | integer | 0 | Return results starting at this count (1-based) How many records to skip, for paging. | |
| orderby | string | magnitude | Order results by fieldone of: magnitude, magnitude-asc, time, time-asc | |
| productcode | string | — | Return the event associated with this product code FREE-FORM USGS product code. Proxied verbatim. | |
| producttype | string | — | Limit to events with this product type (e.g. moment-tensor, focal-mechanism, shakemap, losspager, dyfi) | |
| reviewstatus | string | automatic | Limit to events with a specific review statusone of: automatic, reviewed | |
| starttime | string | 2024-01-01 | Start 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. | |
| updatedafter | string | — | 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.