USGS Earthquake Hazards Program API

This is a robust, publicly accessible API maintained by the United States Geological Survey (USGS). It provides detailed real-time and historical data on earthquakes occurring worldwide.

Overview

  • Provider: U.S. Geological Survey (USGS)

  • Purpose: To distribute information about seismic activity recorded by the global network of seismographs.

  • Authentication: None required. It is a free and open API.

  • Primary Data Format: GeoJSON (also available in KML, CSV, and XML).

Main Endpoints

The API has several endpoints. The most common is the real-time feed, which can be easily customized.

  • Base URL for Feeds: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/{magnitude}_{timespan}.geojson

    • {magnitude}: The minimum magnitude of earthquakes to display (e.g., all, 1.0, 2.5, 4.5, significant).

    • {timespan}: The time period to query (e.g., hour, day, week, month).

  • Example (Earthquakes in the last 24 hours, all magnitudes):

    https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson

Advanced Search Endpoint

For more specific queries, the query endpoint can be used.

  • Base URL: https://earthquake.usgs.gov/fdsnws/event/1/query

Common Search Parameters

These can be added as parameters to the advanced search URL (e.g., ?format=geojson&starttime=...).

Parameter
Description
Example

format

The format of the response data.

geojson

starttime

Start date and time (ISO 8601 format).

2025-10-01

endtime

End date and time (ISO 8601 format).

2025-10-05T23:00:00

minmagnitude

Minimum magnitude of the earthquake.

5.5

latitude

Latitude for the center of the search.

19.4326

longitude

Longitude for the center of the search.

-99.1332

maxradiuskm

Maximum radius in kilometers from the center point.

500

orderby

Sort the results.

time (most recent first) or magnitude

Last updated