Developers
API documentation
A JSON REST API over the same USGS-sourced record as this site. Authenticate with a bearer key, pay per request from prepaid credits, and read the remaining balance in every response.
Authentication
Create a key in your dashboard and send it as Authorization: Bearer qw_live_…. A key is shown once, and we store only a hash.
GET /api/v1/near · 1 credit
| Parameter | Default | Notes |
|---|---|---|
| lat, lon | required | Decimal degrees |
| radius_km | 100 | 1 to 500 |
| days | 7 | 0.04 to 30 |
| min_mag | none | Minimum magnitude |
| limit | 100 | 1 to 500, newest first |
curl "https://quakewatch.beer/api/v1/near?lat=34.05&lon=-118.24&radius_km=100&days=7&min_mag=2.5" \ -H "Authorization: Bearer qw_live_YOUR_KEY"
{
"query": { "lat": 34.05, "lon": -118.24, "radius_km": 100, "days": 7, "min_mag": 2.5 },
"count": 1,
"earthquakes": [
{
"id": "ci40000000",
"time": "2026-10-24T08:12:41.000Z",
"magnitude": 3.1,
"magnitude_type": "ml",
"place": "5 km NW of Example, CA",
"latitude": 34.12,
"longitude": -118.31,
"depth_km": 8.4,
"felt_reports": 12,
"tsunami_flag": false,
"distance_km": 9.6,
"usgs_url": "https://earthquake.usgs.gov/earthquakes/eventpage/ci40000000"
}
],
"attribution": "Earthquake data: U.S. Geological Survey (public domain). Places: GeoNames (CC BY 4.0).",
"credits_charged": 1,
"credits_remaining": 499
}GET /api/v1/recent · 1 credit
Parameters: min_mag (default 4.5), hours (1 to 720, default 24), limit (default 100, max 500) and sort (time or magnitude).
GET /api/v1/summary · 2 credits
Parameters: lat, lon and radius_km (1 to 300, default 100). Returns the nearest city, M2.5+ counts for 24 hours, 7 days, 30 days, 1 year and 5 years, the M1+ count for 7 days, the strongest event in 30 days and the largest magnitude in 5 years. Counts describe past activity and are not a hazard assessment.
Errors
| Status | Meaning |
|---|---|
| 400 | invalid_parameters. Not charged. |
| 401 | missing_or_invalid_api_key |
| 402 | insufficient_credits. Top up in the dashboard. |
| 429 | rate_limited, 120 requests per minute per key. See Retry-After. |
| 500 | internal_error. Credits are refunded automatically. |
Responses carry an X-Credits-Remaining header. Keep the attribution field if you display or redistribute the data. This is an informational service, not an early-warning system.