地震查询
按时间窗口(最多 31 天)查询 USGS 地震目录,可按最小震级和圆形区域筛选,返回时间、震级、地点、坐标、深度和海啸标记。
不依赖你自己的任何账号,在组织中开通后即可调用。
商品介绍
按时间窗口(最多 31 天)查询 USGS 地震目录,可按最小震级和圆形区域筛选,返回时间、震级、地点、坐标、深度和海啸标记。 ## 数据源 请求中的 `provider` 从以下数据源中选择: - `usgs` (us) ## 调用与计费 - 调用 ID(`invocation_id`)由市场网关写入,请求中无需携带,携带的值会被替换。 - 只有服务返回执行成功(`data.execution.outcome` 为 `succeeded`)的调用按一次请求计费;参数错误、数据源失败和结果未知的调用不计费。 - 服务在 `data.execution.usage.units` 中报告用量,单位为 `events`。
价格
免费
- 按请求:免费
按实际用量计费,开通本身不收费。调用成功后才计量。
以上为公开标价。你的组织可能有协议价,以控制台显示的价格为准。
档位
- 档位
- zgiservices · standard
- 档位标识
- zgi-earthquake-standard
- 接口协议
- HTTP 接口
如何使用
为组织开通
在控制台为组织开通此商品。开通后即可调用,不需要你自己的厂商账号。
创建凭证
在控制台“凭证”中创建一个凭证。密钥只显示一次,请保存到环境变量 ZGI_MARKET_KEY,并在每次请求中携带:
Authorization: Bearer $ZGI_MARKET_KEY也可以使用 X-API-Key 请求头。一份凭证可以调用组织已开通的所有商品。
调用网关
沿用厂商原有的请求与响应格式,只需把 Base URL 和密钥换成下面的值。
- Base URL
https://market-api.zgi.im/v1/gateway/zgi-earthquake-standard
请求示例 curl -X POST "https://market-api.zgi.im/v1/gateway/zgi-earthquake-standard/v1/earthquake-queries" \ -H "Authorization: Bearer $ZGI_MARKET_KEY" \ -H "Content-Type: application/json" \ -d '{}'入参与输出
各操作的入参和输出结构,以 JSON Schema 描述。
POST /v1/earthquake-queries入参 Schema { "type": "object", "required": [ "provider", "start_time", "end_time" ], "properties": { "end_time": { "type": "string", "description": "Window end, RFC 3339 timestamp after start_time and at most 31 days later." }, "latitude": { "type": "number", "description": "Optional circle center latitude, -90 to 90; latitude, longitude and radius_km must be set together." }, "provider": { "enum": [ "usgs" ], "type": "string", "description": "Provider that serves the request; choose by the coverage described for this tool." }, "longitude": { "type": "number", "description": "Optional circle center longitude, -180 to 180; latitude, longitude and radius_km must be set together." }, "radius_km": { "type": "number", "description": "Optional circle radius in kilometers, above 0 and at most 20001.6; latitude, longitude and radius_km must be set together." }, "start_time": { "type": "string", "description": "Window start, RFC 3339 timestamp such as 2024-01-01T00:00:00Z; must not be in the future." }, "max_results": { "type": "integer", "description": "Number of events to return, 1-200; default 50." }, "min_magnitude": { "type": "number", "description": "Optional minimum magnitude, -1 to 10." } }, "additionalProperties": false }输出 Schema { "type": "object", "required": [ "code", "data" ], "properties": { "code": { "type": "integer" }, "data": { "type": "object", "required": [ "execution", "result" ], "properties": { "result": { "type": "object", "required": [ "events", "source" ], "properties": { "events": { "type": [ "array", "null" ], "items": { "type": "object", "required": [ "id", "time", "magnitude", "magnitude_type", "place", "latitude", "longitude", "depth_km", "tsunami_flag", "url" ], "properties": { "id": { "type": "string" }, "url": { "type": [ "string", "null" ] }, "time": { "type": "string", "format": "date-time" }, "place": { "type": [ "string", "null" ] }, "depth_km": { "type": [ "number", "null" ] }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "magnitude": { "type": [ "number", "null" ] }, "tsunami_flag": { "type": "boolean" }, "magnitude_type": { "type": [ "string", "null" ] } } } }, "source": { "type": "object", "required": [ "name", "license", "url" ], "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "license": { "type": "string" } } } } }, "execution": { "type": "object", "description": "The recorded execution: id, invocation_id, outcome, usage, and timing." } } }, "message": { "type": "string" } } }
来源与审核
- 审核状态
- 未记录
- 许可证
- 未说明
审核状态是平台对上架信息的记录,不构成对上游服务质量或可用性的担保。
相关商品
- APIZGI 数据服务
车辆 VIN 解码
由 zgiservices 提供
通过美国 NHTSA vPIC 数据库把车辆识别码(VIN)解码为品牌、车型、年款、配置、车身、制造商、产地、燃料、发动机和驱动形式。
- zgi-services
- vins
- nhtsa
免费开通即用 - APIZGI 数据服务
学术文献检索
由 zgiservices 提供
按关键词检索学术文献,返回标题、作者、年份、期刊、DOI、被引次数和开放获取链接,可按出版年份过滤。
- zgi-services
- works
- crossref
- +1
免费开通即用 - APIZGI 数据服务
节假日查询
由 zgiservices 提供
把一个日期区间(最多 93 天)内的每一天分类为工作日、周末、法定节假日或调休上班日。中国大陆请用 holiday-cn,它包含调休信息。
- zgi-services
- days
- gov-uk
- +1
2.00 点 / 次请求开通即用