我们的地震数据API提供全球收集的地震信息的免费实时访问。该API旨在为开发构建地震监测应用程序的开发人员提供简单、快速和可靠的服务。
https://earthqua.com/wp-json/earthquakes/v1/无需身份验证。该API公开可用于只读操作。
/latest获取最新的地震数据,带有可选的过滤参数。
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 10 | Number of earthquakes to return (1-100) |
min_magnitude | float | 0 | Minimum magnitude filter |
max_magnitude | float | 10 | Maximum magnitude filter |
country_code | string | null | Filter by country code (e.g., "TR", "US") |
keyword | string | null | Search in place names |
GET https://earthqua.com/wp-json/earthquakes/v1/latestGET https://earthqua.com/wp-json/earthquakes/v1/latest?country_code=TR&min_magnitude=4.0GET https://earthqua.com/wp-json/earthquakes/v1/latest?keyword=Turkey&limit=20/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" } }每个地震对象包含以下字段:
| Field | Type | Description |
|---|---|---|
id | integer | Internal database ID |
external_id | string | Source-specific identifier |
source | string | Data source ("usgs" or "turkey") |
magnitude | float | Earthquake magnitude |
magnitude_formatted | string | Formatted magnitude (e.g., "4.2") |
magnitude_class | string | Magnitude category ("low", "moderate", "strong", "major", "great") |
place | string | Location description |
place_short | string | Shortened location name |
latitude | float | Latitude coordinate |
longitude | float | Longitude coordinate |
depth | float | Depth in kilometers |
depth_formatted | string | Formatted depth (e.g., "7.5 km") |
time | integer | Unix timestamp in milliseconds |
formatted_time | string | Human-readable time |
coordinates | string | Formatted coordinates |
status | string | Review status |
tsunami_warning | boolean | Tsunami warning issued |
city | string | City name (if available) |
country | string | Country name |
country_code | string | ISO country code |
目前,API上没有施加速率限制。然而,我们建议合理使用模式,以确保所有用户的最佳性能。
错误响应与成功响应具有相同的结构,但数据字段中包含success: false和错误信息。
数据来自全球官方政府机构和科学机构,确保准确性和可靠性。
先进的算法在地震发生后的几分钟内处理和验证地震数据,提供最新的信息。
如需API支持、功能请求或错误报告,请通过我们的网站与我们联系或在我们的代码库中创建一个问题。