API para desenvolvedores do alerts.live — gratuita

Uma API pública e gratuita para desenvolvedores, traders e jornalistas: protestos, greves, estradas fechadas e incidentes de rua em tempo real, no mundo todo.

Início rápido

# latest events in Paris, GeoJSON
curl "https://alerts.live/api/v1/events?city=paris&format=geojson"

# dangerous events (danger ≥ 60) in Europe since a date, with your key
curl -H "X-API-Key: alk_…" "https://alerts.live/api/v1/events?continent=EU&min_danger=60&since=2026-10-18T00:00:00Z"

# bounding box (W,S,E,N), shootings only
curl "https://alerts.live/api/v1/events?bbox=-5,41,10,51&type=shooting"

# time series: incidents per bucket in France, last week
curl "https://alerts.live/api/v1/stats?period=week&scope=country&value=FR"

# top 5 cities in the last 3 hours
curl "https://alerts.live/api/v1/top-cities?hours=3&n=5"

# one event (news, photos, videos, timeline)
curl "https://alerts.live/api/v1/events/123"

# RSS / Atom per city or country
https://alerts.live/api/v1/feed/city/paris.rss
https://alerts.live/api/v1/feed/country/FR.atom

# webhook (key required)
curl -X POST -H "X-API-Key: alk_…" -H "content-type: application/json" \
  -d '{"url":"https://example.com/hook","types":["shooting","clashes"],"min_danger":50,"scope":"country","value":"FR"}' https://alerts.live/api/v1/webhooks

Obter uma chave de API gratuita

Acesso anónimo: 60 pedidos/min. Com chave gratuita: 600 pedidos/min. Quotas diárias: 1.500 pedidos (anónimo) / 20.000 pedidos (chave gratuita); a paginação é limitada (offset ≤ 200 anónimo, ≤ 1.000 com chave). As chaves são guardadas como hash; não conseguimos mostrá-las de novo.

Endpoints

GET /api/v1/eventsbbox, city, country, continent, type, min_danger, min_confidence (0–100; default hides unconfirmed user reports), size, since, limit (≤200), offset, format=json|geojson
GET /api/v1/events/{id}
GET /api/v1/statsperiod=hour|day|week|month|year, scope=world|continent|country|city, value, types, bands, minDanger, sizes
GET /api/v1/top-citieshours (1–24), n
GET /api/v1/feed/city/{slug}.rss|atom
GET /api/v1/feed/country/{CC}.rss|atom
POST /api/v1/keysfree key
GET|POST|DELETE /api/v1/webhookskey required
GET /api/v1/openapi.jsonOpenAPI 3

Especificação OpenAPI · CORS: Access-Control-Allow-Origin: *

Remote MCP

A public, read-only Model Context Protocol server is at https://alerts.live/mcp (Streamable HTTP). Tools: search_alerts, get_alert, list_categories, area_summary. It exposes the same public data and cap as the anonymous map (max 500 events, no account or personal data). Rate limit: 60 requests/minute per IP. Each alert includes the original source link; that source keeps its own terms. alerts.live does not claim a Creative Commons (CC BY) or other licence over third-party content — a licence decision is pending. See /skill.md and the terms below.

// Cursor — .cursor/mcp.json or ~/.cursor/mcp.json
{
  "mcpServers": {
    "alerts-live": { "url": "https://alerts.live/mcp" }
  }
}

// Claude: add a custom connector / remote MCP with URL https://alerts.live/mcp
// ChatGPT: add a remote MCP server with the same URL

Webhooks

Subscribe with POST /api/v1/webhooks (API key required). Each delivery is a JSON POST signed with HMAC-SHA256: header X-Alerts-Signature: sha256=HMAC(secret, X-Alerts-Timestamp + "." + body). HTTPS URLs only; disabled after 10 consecutive failures.

python: hmac.new(secret.encode(), (ts + "." + body).encode(), hashlib.sha256).hexdigest()

Termos de utilização

Precisa de limites mais altos, SLA, exportações do histórico ou licença comercial? Existe um plano pago: Preços · contacte-nos.