免费地震数据API

Access free real-time earthquake data collected from around the world

概述

我们的地震数据API提供全球收集的地震信息的免费实时访问。该API旨在为开发构建地震监测应用程序的开发人员提供简单、快速和可靠的服务。

Real-time Data:Updated every minute with latest earthquake information
Global Coverage:Comprehensive data from worldwide monitoring networks
Free Access:No authentication or payment required
RESTful API:Standard HTTP methods and JSON responses

基础网址

https://earthqua.com/wp-json/earthquakes/v1/

认证

无需身份验证。该API公开可用于只读操作。

端点

获取最新地震

获取/latest

获取最新的地震数据,带有可选的过滤参数。

参数

ParameterTypeDefaultDescription
limitinteger10Number of earthquakes to return (1-100)
min_magnitudefloat0Minimum magnitude filter
max_magnitudefloat10Maximum magnitude filter
country_codestringnullFilter by country code (e.g., "TR", "US")
keywordstringnullSearch in place names

示例请求

获取最近的10次地震
GET https://earthqua.com/wp-json/earthquakes/v1/latest
获取土耳其4.0级以上的地震
GET https://earthqua.com/wp-json/earthquakes/v1/latest?country_code=TR&min_magnitude=4.0
搜索包含“土耳其”的地震
GET https://earthqua.com/wp-json/earthquakes/v1/latest?keyword=Turkey&limit=20

获取统计数据

GET/stats

获取地震统计数据和摘要信息。

示例请求

GET https://earthqua.com/wp-json/earthquakes/v1/stats

响应格式

所有API响应遵循一致的JSON结构:

成功响应

{ "success": true, "data": { "earthquakes": [...], "total": 73, "page": 1, "per_page": 10, "total_pages": 8 }, "meta": { "generated_at": "2025-10-21T00:09:57+01:00", "api_version": "1.0", "source": "earthquakes-plugin" } }

地震对象

每个地震对象包含以下字段:

FieldTypeDescription
idintegerInternal database ID
external_idstringSource-specific identifier
sourcestringData source ("usgs" or "turkey")
magnitudefloatEarthquake magnitude
magnitude_formattedstringFormatted magnitude (e.g., "4.2")
magnitude_classstringMagnitude category ("low", "moderate", "strong", "major", "great")
placestringLocation description
place_shortstringShortened location name
latitudefloatLatitude coordinate
longitudefloatLongitude coordinate
depthfloatDepth in kilometers
depth_formattedstringFormatted depth (e.g., "7.5 km")
timeintegerUnix timestamp in milliseconds
formatted_timestringHuman-readable time
coordinatesstringFormatted coordinates
statusstringReview status
tsunami_warningbooleanTsunami warning issued
citystringCity name (if available)
countrystringCountry name
country_codestringISO country code

速率限制

目前,API上没有施加速率限制。然而,我们建议合理使用模式,以确保所有用户的最佳性能。

错误处理

错误响应与成功响应具有相同的结构,但数据字段中包含success: false和错误信息。

数据质量

权威来源

数据来自全球官方政府机构和科学机构,确保准确性和可靠性。

实时处理

先进的算法在地震发生后的几分钟内处理和验证地震数据,提供最新的信息。

支持

如需API支持、功能请求或错误报告,请通过我们的网站与我们联系或在我们的代码库中创建一个问题。