---
title: "USGS API: recent earthquakes worldwide as JSON"
description: "USGS API for recent earthquakes worldwide by magnitude and distance, and current streamflow and gage height from U.S. river gauges as JSON."
url: https://perceptlayer.com/apis/usgs
---

[APIs](https://perceptlayer.com/apis) / [Search engines](https://perceptlayer.com/verticals/search) / USGS

1 credit per call 2 endpoints 16 datapoints 

# USGS API

USGS API for recent earthquakes worldwide by magnitude and distance, and current streamflow and gage height from U.S. river gauges as JSON.

[Get a free API key](https://perceptlayer.com/signup) Run it below

USGS

GET /v1/usgs/earthquakes?min\_magnitude=4.5&days=7 

```
{
  "success": true,
  "data": {
    "page": 1,
    "has_more": true,
    "count": 50,
    "items": [
      {
        "id": "us6000ug2p",
        "magnitude": 4.5,
        "magnitude_type": "mb",
        "place": "101 km N of Baukau, Timor Leste",
        "time": "2026-12-06T07:15:49.423Z",
        "updated": "2026-12-06T07:38:09.040Z",
        "latitude": -7.5563,
        "longitude": 126.4171,
        "depth_km": 13.904,
        "type": "earthquake",
        "status": "reviewed",
        "tsunami": false,
        "significance": 312,
        "network": "us",
        "title": "M 4.5 - 101 km N of Baukau, Timor Leste",
        "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000ug2p"
      },
      {
        "id": "us6000ug1q",
        "magnitude": 5.6,
        "magnitude_type": "mww",
        "place": "108 km NNE of Bangkalan, Indonesia",
        "time": "2026-12-06T06:03:19.431Z",
        "updated": "2026-12-06T08:11:47.236Z",
        "latitude": -6.1264,
        "longitude": 113.084,
        "depth_km": 588.668,
        "type": "earthquake",
        "status": "reviewed",
        "tsunami": false,
        "alert": "green",
        "significance": 482,
        "mmi": 1.332,
        "network": "us",
        "title": "M 5.6 - 108 km NNE of Bangkalan, Indonesia",
        "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000ug1q"
      },
      {
        "id": "us6000ug08",
        "magnitude": 4.5,
        "magnitude_type": "mb",
        "place": "92 km SW of Modisi, Indonesia",
        "time": "2026-12-05T22:23:46.613Z",
        "updated": "2026-12-06T04:15:18.040Z",
        "latitude": -0.0184,
        "longitude": 123.7545,
        "depth_km": 123.138,
        "type": "earthquake",
        "status": "reviewed",
        "tsunami": false,
        "significance": 312,
        "network": "us",
        "title": "M 4.5 - 92 km SW of Modisi, Indonesia",
        "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000ug08"
      }
    ]
  },
  "meta": {
    "request_id": "req_6059748dc6fd47e19d2189832fa68240",
    "credits_charged": 1,
    "credits_remaining": 483
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

Sample data

## What one call returns

A recorded run of `earthquakes`: the fields and shapes you will get, shortened to 3 items.

| # | id string | magnitude number | magnitude\_type string | place string | time string | updated string | latitude number | longitude number | depth\_km number | type string | status string | tsunami boolean | significance integer | network string | title string | url url |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | us6000ug2p | 4.5 | mb | 101 km N of Baukau, Timor Leste | 2026-12-06T07:15:49.423Z | 2026-12-06T07:38:09.040Z | \-7.5563 | 126.4171 | 13.904 | earthquake | reviewed | false | 312 | us | M 4.5 - 101 km N of Baukau, Timor Leste | https://earthquake.usgs.gov/earthquakes/eventpage/us6000ug2p |
| 2 | us6000ug1q | 5.6 | mww | 108 km NNE of Bangkalan, Indonesia | 2026-12-06T06:03:19.431Z | 2026-12-06T08:11:47.236Z | \-6.1264 | 113.084 | 588.668 | earthquake | reviewed | false | 482 | us | M 5.6 - 108 km NNE of Bangkalan, Indonesia | https://earthquake.usgs.gov/earthquakes/eventpage/us6000ug1q |
| 3 | us6000ug08 | 4.5 | mb | 92 km SW of Modisi, Indonesia | 2026-12-05T22:23:46.613Z | 2026-12-06T04:15:18.040Z | \-0.0184 | 123.7545 | 123.138 | earthquake | reviewed | false | 312 | us | M 4.5 - 92 km SW of Modisi, Indonesia | https://earthquake.usgs.gov/earthquakes/eventpage/us6000ug08 |

Recorded from our API · 3 items shown · 16 datapoints per item GET /v1/usgs/earthquakes?min\_magnitude=4.5&days=7

16 datapoints

### Identity

-   id string
-   magnitude\_type string
-   type string
-   status string
-   title string

### Contact

-   url url

### Location

-   latitude number
-   longitude number

### Other

-   magnitude number
-   place string
-   time string
-   updated string
-   depth\_km number
-   tsunami boolean
-   significance integer
-   network string

Playground

## Run this API

cURL shell 

```
curl "https://api.perceptlayer.com/v1/usgs/earthquakes?min_magnitude=4.5&days=7" \
  -H "X-API-Key: $API_KEY"
```

USGS · 2 endpoints

## Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

| Endpoint | Required parameters | Returns | Cost |
| --- | --- | --- | --- |
| [GET `/v1/usgs/earthquakes`](https://perceptlayer.com/apis/usgs/earthquakes) | none +8 optional | `id` `magnitude` `magnitude_type` `place` `time` `updated` +12 more | 1 credit |
| [GET `/v1/usgs/water-levels`](https://perceptlayer.com/apis/usgs/water-levels) | none +4 optional | `site_number` `site_id` `name` `site_type` `state` `county` +6 more | 1 credit |

Overview

## About the USGS API

## What you can get

The USGS API returns U.S. Geological Survey earthquake and water data as JSON through 2 endpoints.

-   **Earthquakes:** `earthquakes` takes `min_magnitude` (-1 to 10, default 2.5), `days` (1 to 365 days back, default 7), a centre point as `latitude` and `longitude` with `radius_km` (1 to 20,000, default 250), `order` (time or magnitude), `limit` (1 to 500 events a page, default 50) and `page`.
-   **Water levels:** `water-levels` takes a USGS `site` number (8 to 15 digits, such as 01646500) or a two-letter `state` for every site that reported in the last day, with `per_page` (1 to 100, default 25) and `page` for a state.

The recorded `earthquakes` call for magnitude 4.5 and up over 7 days returns `page`, `has_more` and `items`, each with `id`, `magnitude`, `magnitude_type`, `place`, `time`, `updated`, `latitude`, `longitude`, `depth_km`, `type`, `status`, `tsunami`, `significance`, `network`, `title` and a `url` to the USGS event page, plus `alert` (the PAGER level) and `mmi` when USGS has set them. One event in the recording, M 5.6 at 108 km NNE of Bangkalan, Indonesia, had a depth of 588.668 km and a green PAGER alert. The recorded `water-levels` call for site 01646500 returns the gauge's `name` (POTOMAC RIVER NEAR WASH, DC LITTLE FALLS PUMP STA), `site_type`, `state`, `county`, `latitude`, `longitude` and `drainage_area_sq_mi` (11,560), then `streamflow` (6,920 ft^3/s) and `gage_height` (3.62 ft), each with its `value`, `unit`, `time` and `approval_status`.

Recent water readings are provisional ( `approval_status` "Provisional") and can be revised. USGS-authored data is in the U.S. public domain; USGS asks for credit as a courtesy, not as a condition: "U.S. Geological Survey".

## How a call works

Ask for recent events: `GET /v1/usgs/earthquakes?min_magnitude=4.5&days=7&limit=20` with your key in the `X-API-Key` header returns them newest first; add `order=magnitude` for the largest first. For a river gauge, `GET /v1/usgs/water-levels?site=01646500` returns its latest readings. Check `has_more` before asking for the next `page`. Answers come from a cache for up to 10 minutes. Every successful call costs 1 credit; failed calls cost nothing.

Search engines JSON REST MCP

### More search engines APIs

[Apple Maps](https://perceptlayer.com/apis/apple-maps) [Baidu](https://perceptlayer.com/apis/baidu) [Bing](https://perceptlayer.com/apis/bing) [Brave Search](https://perceptlayer.com/apis/brave) [DuckDuckGo](https://perceptlayer.com/apis/duckduckgo) [Google Events](https://perceptlayer.com/apis/google-events) [Google Finance](https://perceptlayer.com/apis/google-finance) [Google Forums](https://perceptlayer.com/apis/google-forums) [Google Images](https://perceptlayer.com/apis/google-images) [Google Lens](https://perceptlayer.com/apis/google-lens) [Google Local](https://perceptlayer.com/apis/google-local) [Google Local Services](https://perceptlayer.com/apis/google-local-services)

Use cases

### Let an agent answer "were there any earthquakes near this city this week" with a radius search

`Use the USGS API to let an agent answer "were there any earthquakes near this city this week" with a radius search` 

### Alert on events above a magnitude, or with the \`tsunami\` flag or a PAGER alert set

`` Use the USGS API to alert on events above a magnitude, or with the `tsunami` flag or a PAGER alert set `` 

### Load a year of earthquakes in a region into a warehouse for analysis

`Use the USGS API to load a year of earthquakes in a region into a warehouse for analysis` 

### Check a river's current streamflow and gage height before a paddling or fishing trip

`Use the USGS API to check a river's current streamflow and gage height before a paddling or fishing trip` 

FAQ

## Questions

**Is this the official USGS API?**

No. Perceptlayer is an independent service and is not affiliated with or endorsed by the U.S. Geological Survey. USGS publishes its earthquake and water data APIs for free; the water API is rate-limited per hour. This API calls those public APIs on your behalf and adds one key for every source on Perceptlayer, one response shape across both, a cache of up to 10 minutes, and no charge for failed calls.

**How many earthquakes can one search return?**

Up to 500 events a page; page through for more. USGS answers at most 20,000 events per query, so narrow a large search with \`min\_magnitude\`, \`days\` or a radius.

**Are water readings final?**

No. Recent readings are provisional and USGS can revise them. Each reading carries its \`approval\_status\`.

**Do I have to credit USGS?**

No. USGS-authored data is in the U.S. public domain. USGS asks for credit as a courtesy ("U.S. Geological Survey"), and we suggest you give it.

**Should I build an USGS scraper instead?**

You can, but an USGS scraper is code you maintain: page changes break it, requests get blocked, and USGS's terms govern how you collect data. The USGS API gives you 2 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

## Try the USGS API with 100 free credits

No credit card. Failed calls are never billed.

[Get a free API key](https://perceptlayer.com/signup) [Read the docs](https://docs.perceptlayer.com)
