文档

使用
GlobMaps API

用于疫情预测、风险地图和供应链可视化的生产级地理智能API。

简介

GlobMaps provides production-ready geo-intelligence APIs for outbreak prediction, risk mapping, and supply chain visibility. All APIs return JSON responses with consistent envelopes.

认证

Include your API key in the X-API-Key header. Get your API key from the dashboard. All requests must include a valid key.

快速开始

Make your first API call in minutes. Get risk data for Thailand with a simple GET request.

端点

Explore our API endpoints for Risk Map, Outbreak Radar, and Supply Chain services.

响应格式

All responses follow a consistent envelope structure with requestId, asOf, data, and warnings.

错误处理

Learn about error codes, validation rules, and how to handle rate limits.

代码示例

cURL
curl -X GET "https://api.globmaps.com/v1/risk-data?regionId=TH" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json"
JavaScript
const response = await fetch('https://api.globmaps.com/v1/risk-data?regionId=TH', {
  headers: {
    'X-API-Key': 'your_api_key',
    'Content-Type': 'application/json'
  }
});
const data = await response.json();
Python
import requests

response = requests.get(
    'https://api.globmaps.com/v1/risk-data',
    params={'regionId': 'TH'},
    headers={'X-API-Key': 'your_api_key'}
)
data = response.json()

响应格式

{
  "requestId": "req_abc123",
  "asOf": "2026-04-19T10:30:00Z",
  "data": {},
  "warnings": []
}

查询参数

参数类型描述
localestring (默认: en)en | th | zh
regionIdstringCountry or province code
asOfISO8601Timestamp for historical data

HTTP状态码

200成功
400验证错误
401未授权
404未找到
429速率限制
500服务器错误

错误响应

{
  "requestId": "req_abc123",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid regionId",
    "details": {
      "field": "regionId"
    }
  }
}