Overview
Earthquake works by analyzing the earthquake data provided and returning the earthquake data for the past hour. It uses various sources to determine the earthquake data and returns the data.
Endpoint
One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.
curl "https://api.apiverve.com/v1/earthquake" \
-H "x-api-key: your_api_key_here"const res = await fetch('https://api.apiverve.com/v1/earthquake', {
headers: { 'x-api-key': 'your_api_key_here' },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
console.log(data);import requests
res = requests.get(
"https://api.apiverve.com/v1/earthquake",
headers={"x-api-key": "your_api_key_here"},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"])package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/earthquake", nil)
req.Header.Set("x-api-key", "your_api_key_here")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.
Authentication
Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Response
Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.
{
"status": "ok",
"error": null,
"data": {
"earthquakes_LastUpdated": "2026-02-18T12:00:00.000Z",
"earthquakes_LastHour": 9,
"count24h": 187,
"largestMagnitude24h": 5.2,
"avgMagnitude24h": 1.84,
"earthquakes": [
{
"mag": 3.4,
"place": "153 km SSW of Channel Islands Beach, California",
"time": 1765921110756,
"felt": 1,
"cdi": 2.2,
"mmi": 2.538,
"status": "reviewed",
"tsunami": 0,
"sig": 178,
"net": "us",
"types": ",dyfi,nearby-cities,origin,phase-data,scitech-link,shakemap,",
"nst": 36,
"dmin": 0.479,
"rms": 0.65,
"gap": 247,
"magType": "ml",
"type": "earthquake",
"title": "M 3.4 - 153 km SSW of Channel Islands Beach, California",
"coordinates": [
-119.931,
32.9103
]
},
{
"mag": 2.25,
"place": "6 km NW of The Geysers, CA",
"time": 1765921522850,
"status": "automatic",
"tsunami": 0,
"sig": 78,
"net": "nc",
"types": ",focal-mechanism,nearby-cities,origin,phase-data,",
"nst": 54,
"dmin": 0.01126,
"rms": 0.05,
"gap": 23,
"magType": "md",
"type": "earthquake",
"title": "M 2.3 - 6 km NW of The Geysers, CA",
"coordinates": [
-122.792831,
38.819332
]
}
]
}
}
Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
earthquakes_LastUpdated | string | "2026-02-18T12:00:00.000Z" | Timestamp of when the underlying earthquake data was last refreshed from USGS |
earthquakes_LastHour | number | 9 | Number of earthquakes recorded in the past hour |
count24h | number | 187 | Total earthquake count in the past 24 hours |
largestMagnitude24h | number | 5.2 | Largest earthquake magnitude recorded in the past 24 hours |
avgMagnitude24hPremium | number | 1.84 | Average earthquake magnitude across the past 24 hours |
earthquakes | array[2] | Earthquakes recorded in the past hour | |
mag | number | 3.4 | Magnitude of the earthquake |
place | string | "153 km SSW of Channel Islands Beach, California" | Human-readable description of the epicenter's location |
time | number | 1765921110756 | Unix timestamp, in milliseconds, of when the earthquake occurred |
felt | number | 1 | Number of 'felt' reports submitted by the public for this event; absent when none were submitted |
cdi | number | 2.2 | Maximum reported intensity of the event from citizen 'Did You Feel It?' reports |
mmi | number | 2.538 | Maximum estimated instrumental intensity of the event |
status | string | "reviewed" | Review status of the event: 'automatic' if produced by an automatic system, 'reviewed' if a human seismologist verified it |
tsunami | number | 0 | Whether a tsunami warning was associated with this event (1) or not (0) |
sig | number | 178 | A number describing how significant the event is, based on magnitude, felt reports, and other factors; larger numbers indicate a more significant event |
net | string | "us" | ID of the seismic network that originally authored the event |
types | string | ",dyfi,nearby-cities,origin,phase-data,scitech-link,shakemap," | Comma-separated list of product types associated with this event |
nst | number | 36 | Number of seismic stations used to determine the earthquake's location |
dmin | number | 0.479 | Horizontal distance, in degrees, from the epicenter to the nearest reporting station |
rms | number | 0.65 | Root-mean-square travel time residual of the seismic stations used to locate the event, in seconds |
gap | number | 247 | Largest azimuthal gap, in degrees, between adjacent reporting stations |
magType | string | "ml" | Method or algorithm used to calculate the reported magnitude |
type | string | "earthquake" | Type of seismic event, e.g. earthquake or quarry blast |
title | string | "M 3.4 - 153 km SSW of Channel Islands Beach, California" | Formatted summary combining the magnitude and place, e.g. 'M 2.5 - 3 km ESE of Camarillo, CA' |
coordinates | array | [-119.931, ...] | Epicenter location as [longitude, latitude] |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted | A key restriction or IP allow-list; see key scoping. |
429 | Rate limited, or out of credits | Read error to tell them apart; see rate limits. |
Other ways to use Worldwide Earthquakes
Set up Worldwide Earthquakes on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.
Related
More in Weather: