Welcome to SOSRoute 👋
Your API is ready. Follow the 3 steps below to ship safety features into your app in under 5 minutes.
Copy Your API Key
Use the sandbox key below — it works immediately. No signup, no credit card, no OAuth.
Make Your First Call
Hit any endpoint with X-API-Key header. Try the interactive explorer below.
Ship It
Parse the JSON response and render it in your UI. Average response time: 42ms.
Your Sandbox API Key
sos_test_demo1234567890abcdef12345678
# Find the 3 nearest hospitals to Times Square curl -X GET "https://api.sosroute.dev/v1/contacts/nearest?lat=40.7580&lng=-73.9855&type=hospital&limit=3" \ -H "X-API-Key: sos_test_demo1234567890abcdef12345678"
const response = await fetch( "https://api.sosroute.dev/v1/contacts/nearest?lat=40.7580&lng=-73.9855&type=hospital&limit=3", { headers: { "X-API-Key": "sos_test_demo1234567890abcdef12345678" } } ); const { data } = await response.json(); data.forEach(facility => { console.log(`${facility.name} — ${facility.phone} (${facility.distance_km}km)`); });
import requests response = requests.get( "https://api.sosroute.dev/v1/contacts/nearest", params={"lat": 40.7580, "lng": -73.9855, "type": "hospital", "limit": 3}, headers={"X-API-Key": "sos_test_demo1234567890abcdef12345678"} ) for facility in response.json()["data"]: print(f"{facility['name']} — {facility['phone']} ({facility['distance_km']}km)")
🧪 Interactive API Explorer
Enter coordinates and hit "Send Request" to see a live response from the SOSRoute API.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | number | Required | Latitude (-90 to 90) |
| lng | number | Required | Longitude (-180 to 180) |
| type | string | Optional | Filter: hospital, fire_station, police_station, ems_station, urgent_care, pharmacy, 911_center |
| radius | string | Optional | Search radius (default: 50km) |
| limit | number | Optional | Max results 1-25 (default: 5) |
Response Fields
| Field | Type | Description |
|---|---|---|
| id | uuid | Unique facility identifier |
| type | string | Facility type |
| name | string | Facility name |
| phone | string | Contact phone number |
| address | string | Street address |
| city | string | City |
| state | string | State/province code |
| lat, lng | number | GPS coordinates |
| distance_m | number | Distance in meters |
| distance_km | number | Distance in kilometers |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | number | Required | Latitude |
| lng | number | Required | Longitude |
| radius | number | Optional | Analysis radius in km (1-100, default: 10) |
Response
Returns a composite risk score (0 = safest, 100 = highest risk) computed from 7 weighted factors: seismic activity, weather alerts, air quality, wildfire proximity, flood zone status, crime index, and emergency facility density.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | number | Required | Latitude |
| lng | number | Required | Longitude |
| radius | string | Optional | Search radius (default: 25km) |
| limit | number | Optional | Max results 1-50 (default: 10) |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | number | Required | Latitude |
| lng | number | Required | Longitude |
| radius | string | Optional | Search radius (default: 50km) |
| source | string | Optional | Filter by source: noaa, usgs, epa, nifc |
| severity | string | Optional | Filter: extreme, severe, moderate, minor |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| category | string | Required | hazmat, fire, flood, earthquake, weather, crime, infrastructure, medical, other |
| title | string | Required | Short description |
| lat | number | Required | Latitude |
| lng | number | Required | Longitude |
| severity | string | Optional | low, medium, high, critical |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Geofence name |
| center_lat | number | Required | Center latitude |
| center_lng | number | Required | Center longitude |
| radius_km | number | Required | Radius in km (0.1-500) |
| alert_types | string[] | Optional | Types to monitor: weather, seismic, wildfire, air_quality, flood, all |
| webhook_url | string | Optional | URL for push notifications |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Your webhook endpoint URL (HTTPS) |
| events | string[] | Required | Events: alert.created, alert.updated, geofence.triggered, incident.created |
| secret | string | Optional | Signing secret for HMAC-SHA256 payload verification |
No authentication required. Returns service status, version, and uptime. Use this for monitoring and uptime checks.
Full Documentation
Complete API reference with response schemas, error codes, and pagination.
OpenAPI Spec
Download the OpenAPI 3.0 YAML spec. Import into Postman, Swagger UI, or your SDK generator.
SDK & Examples
Official JavaScript SDK, Python examples, and MCP server for AI agent integration.
Upgrade to Pro
Unlock higher rate limits, live keys, webhook push, and dedicated support.
Use Case Gallery
10 app mockups showing safety features in ride-sharing, dating, delivery, insurance, and more.
AI / LLM Integration
llms.txt, MCP server, and function-calling schemas for Cursor, Claude, GPT, and other AI agents.