全球地震速报
earthquakePOST汇聚全球地震监测数据,按时间范围与震级档位查询近期地震事件,返回震级、震源深度、经纬度、发生时间、烈度、海啸提示与警报级别等结构化信息。 支持按 hour/day/week/month 时间范围与 all/significant/4.5/2.5/1.0 震级档位组合查询,可再按最小震级过滤、按时间或震级排序并限制返回条数。数据每分钟更新(网关缓存 60 秒),适合地震速报播报、防灾监控大屏、科研数据采集等场景。地名为国际标准英文描述,覆盖全球(含中国境内较大地震)。
https://v1.apizero.cn/api/earthquake平台约定
- 网关 ·
https://v1.apizero.cn - 鉴权 ·
Authorization: Bearer <API Key> - 回包 · JSON {code, msg, data}。成功看 code === 0,不要只看 HTTP 200。
/aidocs/earthquake/raw.md鉴权
需要 API Key(请求头 Authorization: Bearer <你的 API Key>)。完全免费:登录用户每日 1000 次、匿名每日 500 次。
获取 API Key:/account/keys
请求头
| Header | 类型 | 必填 | 说明 |
|---|---|---|---|
| Authorization | string | 否 | 推荐:Bearer <API Key>。兼容请求头 X-API-Key,以及 Query api_key / apikey / key(key 仅当值为 sk_live_/sk_test_/sk_stag_ 形态时生效)。匿名可不传,受每日免费额度限制。 |
| Content-Type | string | 否 | 请求体格式(POST JSON 时) |
近 1 天(默认)
默认时间窗 day。兼容旧别名 t=d。文档示例为真实 USGS 抓取(已截断)。
https://v1.apizero.cn/api/earthquake?period=day&level=all&order=time&min_magnitude=0&limit=2
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| period | string | 否 | 时间范围 hour/day/week/month;兼容 t=h/d/w/m | day |
| level | string | 否 | 震级档位 all/significant/4.5/2.5/1.0 | all |
| min_magnitude | number | 否 | 最小震级过滤;兼容别名 m | 0 |
| order | string | 否 | 排序 time / magnitude | time |
| limit | integer | 否 | 返回上限 1–500 | 2 |
{
"period": "day",
"level": "all",
"order": "time",
"min_magnitude": "0",
"limit": "2"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| summary | object | 汇总:count/total/max_magnitude/period/level/generated_at |
| earthquakes | array | 地震事件列表 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "cached",
"data": {
"summary": {
"count": 2,
"total": 235,
"max_magnitude": 5.9,
"period": "day",
"level": "all",
"generated_at": "2026-07-31 04:50:19"
},
"earthquakes": [
{
"id": "tx2026oxblrr",
"magnitude": 1.9,
"magnitude_type": "ml",
"place": "30 km S of Malaga, New Mexico",
"time": "2026-07-31 04:36:10",
"timestamp": 1785443770962,
"updated": "2026-07-31 04:42:13",
"longitude": -104.069,
"latitude": 31.947,
"depth_km": 4.3882,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 56,
"status": "自动测定",
"event_type": "地震"
},
{
"id": "aka2026ozlsmh",
"magnitude": 2.2,
"magnitude_type": "ml",
"place": "22 km W of Ivanof Bay, Alaska",
"time": "2026-07-31 04:32:59",
"timestamp": 1785443579569,
"updated": "2026-07-31 04:34:00",
"longitude": -159.842,
"latitude": 55.923,
"depth_km": 11.6,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 74,
"status": "自动测定",
"event_type": "地震"
}
]
},
"tips": "极数本源 · https://apizero.cn"
}近 1 小时
period=hour(兼容 t=h)。文档示例为真实抓取。
https://v1.apizero.cn/api/earthquake?period=hour&level=all&order=time&limit=2
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| period | string | 否 | 固定 hour | hour |
| level | string | 否 | 震级档位 | all |
| limit | integer | 否 | 返回上限 | 2 |
{
"period": "hour",
"level": "all",
"order": "time",
"limit": "2"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| summary | object | 汇总 |
| earthquakes | array | 地震事件列表 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"summary": {
"count": 2,
"total": 8,
"max_magnitude": 5,
"period": "hour",
"level": "all",
"generated_at": "2026-07-31 04:50:50"
},
"earthquakes": [
{
"id": "aka2026ozmgin",
"magnitude": 2,
"magnitude_type": "ml",
"place": "18 km S of Susitna North, Alaska",
"time": "2026-07-31 04:49:02",
"timestamp": 1785444542199,
"updated": "2026-07-31 04:50:38",
"longitude": -149.84,
"latitude": 61.999,
"depth_km": 26.4,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 62,
"status": "自动测定",
"event_type": "地震"
},
{
"id": "tx2026oxblrr",
"magnitude": 1.9,
"magnitude_type": "ml",
"place": "30 km S of Malaga, New Mexico",
"time": "2026-07-31 04:36:10",
"timestamp": 1785443770962,
"updated": "2026-07-31 04:42:13",
"longitude": -104.069,
"latitude": 31.947,
"depth_km": 4.3882,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 56,
"status": "自动测定",
"event_type": "地震"
}
]
},
"tips": "极数本源 · https://apizero.cn"
}近 7 天
period=week(兼容 t=w)。
https://v1.apizero.cn/api/earthquake?period=week&level=all&order=time&limit=2
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| period | string | 否 | 固定 week | week |
| limit | integer | 否 | 返回上限 | 2 |
{
"period": "week",
"level": "all",
"order": "time",
"limit": "2"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| summary | object | 汇总 |
| earthquakes | array | 地震事件列表 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"summary": {
"count": 2,
"total": 2340,
"max_magnitude": 6.8,
"period": "week",
"level": "all",
"generated_at": "2026-07-31 04:50:57"
},
"earthquakes": [
{
"id": "aka2026ozmgin",
"magnitude": 2,
"magnitude_type": "ml",
"place": "18 km S of Susitna North, Alaska",
"time": "2026-07-31 04:49:02",
"timestamp": 1785444542199,
"updated": "2026-07-31 04:50:38",
"longitude": -149.84,
"latitude": 61.999,
"depth_km": 26.4,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 62,
"status": "自动测定",
"event_type": "地震"
},
{
"id": "tx2026oxblrr",
"magnitude": 1.9,
"magnitude_type": "ml",
"place": "30 km S of Malaga, New Mexico",
"time": "2026-07-31 04:36:10",
"timestamp": 1785443770962,
"updated": "2026-07-31 04:42:13",
"longitude": -104.069,
"latitude": 31.947,
"depth_km": 4.3882,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 56,
"status": "自动测定",
"event_type": "地震"
}
]
},
"tips": "极数本源 · https://apizero.cn"
}近 30 天
period=month(兼容 t=m)。
https://v1.apizero.cn/api/earthquake?period=month&level=all&order=time&limit=2
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| period | string | 否 | 固定 month | month |
| limit | integer | 否 | 返回上限 | 2 |
{
"period": "month",
"level": "all",
"order": "time",
"limit": "2"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| summary | object | 汇总 |
| earthquakes | array | 地震事件列表 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"summary": {
"count": 2,
"total": 10928,
"max_magnitude": 7.3,
"period": "month",
"level": "all",
"generated_at": "2026-07-31 04:50:03"
},
"earthquakes": [
{
"id": "tx2026oxblrr",
"magnitude": 1.9,
"magnitude_type": "ml",
"place": "30 km S of Malaga, New Mexico",
"time": "2026-07-31 04:36:10",
"timestamp": 1785443770962,
"updated": "2026-07-31 04:42:13",
"longitude": -104.069,
"latitude": 31.947,
"depth_km": 4.3882,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 56,
"status": "自动测定",
"event_type": "地震"
},
{
"id": "aka2026ozlsmh",
"magnitude": 2.2,
"magnitude_type": "ml",
"place": "22 km W of Ivanof Bay, Alaska",
"time": "2026-07-31 04:32:59",
"timestamp": 1785443579569,
"updated": "2026-07-31 04:34:00",
"longitude": -159.842,
"latitude": 55.923,
"depth_km": 11.6,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 74,
"status": "自动测定",
"event_type": "地震"
}
]
},
"tips": "极数本源 · https://apizero.cn"
}显著地震
level=significant,按震级排序。无显著事件时 earthquakes 可能为空。
https://v1.apizero.cn/api/earthquake?period=day&level=significant&order=magnitude
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| period | string | 否 | 时间范围 | day |
| level | string | 是 | 固定 significant | significant |
| order | string | 否 | 建议 magnitude | magnitude |
{
"period": "day",
"level": "significant",
"order": "magnitude"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| summary | object | 汇总 |
| earthquakes | array | 地震事件列表 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"summary": {
"count": 0,
"total": 0,
"max_magnitude": null,
"period": "day",
"level": "significant",
"generated_at": "2026-07-31 04:50:54"
},
"earthquakes": []
},
"tips": "极数本源 · https://apizero.cn"
}M4.5+
level=4.5 且 min_magnitude=4.5,按震级排序。文档示例为真实抓取。
https://v1.apizero.cn/api/earthquake?period=day&level=4.5&min_magnitude=4.5&order=magnitude
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| period | string | 否 | 时间范围 | day |
| level | string | 是 | 固定 4.5 | 4.5 |
| min_magnitude | number | 否 | 最小震级;兼容 m | 4.5 |
| order | string | 否 | 排序 | magnitude |
{
"period": "day",
"level": "4.5",
"min_magnitude": "4.5",
"order": "magnitude"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| summary | object | 汇总 |
| earthquakes | array | 地震事件列表 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"summary": {
"count": 2,
"total": 23,
"max_magnitude": 5.9,
"period": "day",
"level": "4.5",
"generated_at": "2026-07-31 04:50:33"
},
"earthquakes": [
{
"id": "us6000th1h",
"magnitude": 5.9,
"magnitude_type": "mww",
"place": "247 km NNE of Colonia, Micronesia",
"time": "2026-07-31 01:55:59",
"timestamp": 1785434159690,
"updated": "2026-07-31 04:02:03",
"longitude": 138.9989,
"latitude": 11.5807,
"depth_km": 34.505,
"alert": "green",
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": 0,
"significance": 536,
"status": "人工复核",
"event_type": "地震"
},
{
"id": "us6000tguf",
"magnitude": 5.9,
"magnitude_type": "mww",
"place": "Kermadec Islands region",
"time": "2026-07-30 06:27:57",
"timestamp": 1785364077690,
"updated": "2026-07-30 08:34:06",
"longitude": -176.5171,
"latitude": -28.4982,
"depth_km": 10,
"alert": "green",
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": 3.222,
"significance": 536,
"status": "人工复核",
"event_type": "地震"
}
]
},
"tips": "极数本源 · https://apizero.cn"
}M2.5+
level=2.5。文档示例为真实抓取。
https://v1.apizero.cn/api/earthquake?period=day&level=2.5&order=time
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| period | string | 否 | 时间范围 | day |
| level | string | 是 | 固定 2.5 | 2.5 |
{
"period": "day",
"level": "2.5",
"order": "time"
}响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| summary | object | 汇总 |
| earthquakes | array | 地震事件列表 |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"summary": {
"count": 2,
"total": 40,
"max_magnitude": 5.9,
"period": "day",
"level": "2.5",
"generated_at": "2026-07-31 04:50:24"
},
"earthquakes": [
{
"id": "us6000th30",
"magnitude": 5,
"magnitude_type": "mb",
"place": "Kermadec Islands region",
"time": "2026-07-31 04:26:36",
"timestamp": 1785443196299,
"updated": "2026-07-31 04:48:11",
"longitude": -176.5707,
"latitude": -28.5478,
"depth_km": 35,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 385,
"status": "人工复核",
"event_type": "地震"
},
{
"id": "us6000th1t",
"magnitude": 4.9,
"magnitude_type": "mww",
"place": "54 km SW of Puerto Madero, Mexico",
"time": "2026-07-31 02:20:36",
"timestamp": 1785435636265,
"updated": "2026-07-31 03:00:25",
"longitude": -92.8291,
"latitude": 14.4337,
"depth_km": 31.03,
"alert": null,
"tsunami": false,
"felt": null,
"intensity_cdi": null,
"intensity_mmi": null,
"significance": 369,
"status": "人工复核",
"event_type": "地震"
}
]
},
"tips": "极数本源 · https://apizero.cn"
}请求示例
将 YOUR_API_KEY 替换为真实 Key 后运行。
# 1. 密钥:登录 https://apizero.cn/account/keys 申请,写入环境变量 APIZERO_KEY
# 请求头 Authorization: Bearer <key>
import json
import os
import urllib.request
key = os.environ["APIZERO_KEY"]
# 2. 请求地址
url = "https://v1.apizero.cn/api/earthquake"
# 3. 发请求
payload = {
"period": "day",
"level": "all",
"min_magnitude": "4.5",
"order": "time",
"limit": "100",
}
req = urllib.request.Request(
url,
data=json.dumps(payload, ensure_ascii=False).encode("utf-8"),
headers={
"Authorization": "Bearer " + key,
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req, timeout=15) as resp:
body = json.loads(resp.read().decode("utf-8"))
# 4. 打印整包。
# 第 5 步的字段按本接口 data 里实际键改。
print(json.dumps(body, ensure_ascii=False, indent=2))
# 5. code == 0 后再取字段
if body.get("code") == 0:
data = body.get("data") or {}
print(data)在线调试
填写参数后运行,将真实调用接口;计入免费额度。
认证方式
参数(5)
待运行
填写参数后点击「运行调试」查看响应
错误码
先看业务 code。HTTP 也可能不是 200。
| 业务码 | HTTP | 说明 |
|---|---|---|
| 0 | 200 | 成功 |
| 4000 | 400 | 参数错误 |
| 4011 | 401 | API Key 无效 |
| 4013 | 403 | API Key 已暂停 |
| 4014 | 403 | 当前 IP 不在 Key 白名单 |
| 4015 | 401 | 此接口需要 API Key |
| 4022 | 402 | 余额不足 |
| 4029 | 429 | 调用过快(QPS) |
| 4030 | 429 | 今日免费额度已用完 |
| 4040 | 503 | 接口已下线 |
| 4041 | 404 | 接口不存在 |
| 5000 | 500 | 服务器内部错误 |
| 5020 | 502 | 上游暂时不可用 |
| 5021 | 502 | 上游返回格式异常 |
| 5030 | 502 | 暂无可用节点 |
额度与计费
| 计费模式 | 完全免费 |
|---|---|
| QPS 限制 | 3 req/s |
| 登录免费额度 | 1000 次(已认证) |
| 匿名每日额度 | 500 次(无 API Key) |
| 黄金会员 | 每日 50000 次 · QPS 10 |
| 企业会员 | 每日 1000000 次 · QPS 120 |
购买套餐、看评价请走商城详情。 购买 / 调试
变更日志
- v1.02026-07-01
首次上线:支持时间范围 + 震级档位查询,返回震级/深度/坐标/烈度/海啸/警报等完整字段。
免责声明
本接口地震数据来自全球公开地震监测网络,仅供参考与信息展示,不构成任何防灾避险决策依据;实际请以中国地震台网(CENC)及各国官方地震主管部门发布的正式信息为准。