API reference
AsiaSafe API
Live safety data for Southeast Asia: alerts, area safety scores, scams and hospitals. The public surface is keyless and licensed CC BY 4.0. Aggregate endpoints for partners are keyed.
Base URLs and auth
The public REST surface needs no credentials. Partner endpoints take an X-API-Key header. There are no request signing steps.
- Public REST
- https://api.thaisafe.app/v1
- Keyless. CC BY 4.0.
- Partner data
- https://api.thaisafe.app/b2b
- Header: X-API-Key.
Your first request
List active alerts. Every list response carries a data array and a pagination block.
curl https://api.thaisafe.app/v1/alerts?pageSize=2{
"success": true,
"data": [
{
"id": "alr_8f21c0",
"type": "weather",
"severity": "high",
"title": "Heavy rainfall warning",
"description": "Flash flooding possible across low-lying districts.",
"region": "chiang-mai",
"latitude": 18.7883,
"longitude": 98.9853,
"isActive": true,
"startTime": "2026-07-30T22:10:00Z",
"endTime": null,
"createdAt": "2026-07-30T22:12:04Z"
}
],
"pagination": { "page": 1, "pageSize": 2, "total": 37 }
}Public endpoints
All relative to https://api.thaisafe.app/v1. List endpoints accept page and pageSize.
| GET | /alerts | Active safety alerts, paginated and sorted newest first. |
| GET | /safety/hospitals | Hospital directory with emergency contacts and 24h status. |
| GET | /safety/scams | Verified tourist scams ranked by report frequency. |
| GET | /safety/beaches | Beach conditions: flag status, currents, water quality. |
| GET | /weather/forecast | Current conditions and 7-day forecast for a region. |
| GET | /community/feed | Moderated community safety reports from travellers. |
| GET | /news | Regional safety news, filterable by category and region. |
Partner endpoints
Aggregate views relative to https://api.thaisafe.app/b2b. These need a partner key.
| GET | /data/safety-summary | Active alert, scam and report counts grouped by type. |
| GET | /data/trends | Incident trends by week or month, filterable by type and region. |
| GET | /data/heatmap | Anonymised incident density points for mapping. |
curl https://api.thaisafe.app/b2b/data/safety-summary \
-H "X-API-Key: $ASIASAFE_KEY"MCP server
A stateless remote MCP server exposes the same data to AI agents over JSON-RPC 2.0 at POST /mcp. Tools available:
curl https://api.thaisafe.app/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_region_safety",
"arguments": { "region": "phuket" }
}
}'Rate limits
| Surface | Limit | Auth |
|---|---|---|
| Public REST (/v1) | 60 requests / minute per IP | None |
| MCP (/mcp) | 30 requests / minute per IP | None |
| Partner data (/b2b) | 1000 requests / minute | X-API-Key |
Building on this?
See how tourism teams and insurers use the data, or request a partner key for production.