cURL
curl "https://api.ruseo.cn/api/dizhen"
获取中国地震台网官方正式测定的全球地震信息,包含位置、经纬度、深度等。
https://api.ruseo.cn/api/dizhen
接口调用前需要确认的核心配置。
/api/dizhendizhen必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/dizhen
curl "https://api.ruseo.cn/api/dizhen"
$url = 'https://api.ruseo.cn/api/dizhen';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/dizhen')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "dizhen",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
code |
integer | 状态码,200成功,400错误 | 200 |
msg |
string | 信息提示 | success |
data |
array | 地震数据集 | [] |
data.addtime |
string | 地震发生时间 | 2025-08-14 11:57:55 |
data.leve |
string | 地震等级 | 3.2 |
data.weidu |
string | 纬度 | 32.53 |
data.jingdu |
string | 经度 | 93.67 |
data.shendu |
string | 地震深度(千米) | 10 |
data.weizhi |
string | 地震位置 | 西藏那曲市巴青县 |
data.hctime |
string | 缓存时间 | 2025-08-14 12:10:20 |
点击左侧“发送请求”查看结果...