{"openapi":"3.0.3","info":{"title":"alerts.live public API","version":"1.0.0","description":"Free, informational API for real-time public alerts (protests, strikes, road closures, incidents). Not an official source; no police-position data. Attribution required: \"Data: alerts.live\". Anonymous 60 req/min; free API key 600 req/min (self-serve at /developers). Paid tier: contact us."},"servers":[{"url":"https://alerts.live/api/v1"}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"security":[{},{"ApiKey":[]}],"paths":{"/events":{"get":{"summary":"List events","parameters":[{"name":"bbox","in":"query","description":"minLon,minLat,maxLon,maxLat","schema":{"type":"string"}},{"name":"city","in":"query","description":"city slug","schema":{"type":"string"}},{"name":"country","in":"query","description":"ISO-3166 alpha-2","schema":{"type":"string"}},{"name":"continent","in":"query","description":"AF|AS|EU|NA|SA|OC","schema":{"type":"string"}},{"name":"type","in":"query","description":"comma list clashes,shooting,assault,closure,gathering,cordon","schema":{"type":"string"}},{"name":"min_danger","in":"query","description":"1-100","schema":{"type":"string"}},{"name":"size","in":"query","description":"small,medium,large,unknown","schema":{"type":"string"}},{"name":"min_confidence","in":"query","description":"0-100 (default: user reports below 50 are hidden; set e.g. 0 to include unconfirmed reports, they carry possibly_fake=true)","schema":{"type":"string"}},{"name":"since","in":"query","description":"ISO date or unix time (max 30 days back; default last 12h)","schema":{"type":"string"}},{"name":"limit","in":"query","description":"max 200","schema":{"type":"string"}},{"name":"offset","in":"query","schema":{"type":"string"}},{"name":"format","in":"query","description":"json|geojson","schema":{"type":"string"}}],"responses":{"200":{"description":"events"}}}},"/events/{id}":{"get":{"summary":"Single event with news sources, photos, videos and timeline","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"event"},"404":{"description":"not found"}}}},"/stats":{"get":{"summary":"Incident-count time series","parameters":[{"name":"period","in":"query","description":"hour|day|week|month|year","schema":{"type":"string"}},{"name":"scope","in":"query","description":"world|continent|country|city","schema":{"type":"string"}},{"name":"value","in":"query","description":"continent code, country code or city slug","schema":{"type":"string"}},{"name":"types","in":"query","description":"comma list","schema":{"type":"string"}},{"name":"bands","in":"query","description":"danger bands e.g. 1-20,81-100","schema":{"type":"string"}},{"name":"minDanger","in":"query","schema":{"type":"string"}},{"name":"sizes","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"stats"}}}},"/top-cities":{"get":{"summary":"Top cities by alerts in the last N hours","parameters":[{"name":"hours","in":"query","schema":{"type":"integer"}},{"name":"n","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"cities"}}}},"/feed/city/{slug}.{fmt}":{"get":{"summary":"RSS (rss) or Atom (atom) feed for a city","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"fmt","in":"path","required":true,"schema":{"type":"string","enum":["rss","atom"]}}],"responses":{"200":{"description":"feed"}}}},"/feed/country/{cc}.{fmt}":{"get":{"summary":"RSS/Atom feed for a country","parameters":[{"name":"cc","in":"path","required":true,"schema":{"type":"string"}},{"name":"fmt","in":"path","required":true,"schema":{"type":"string","enum":["rss","atom"]}}],"responses":{"200":{"description":"feed"}}}},"/keys":{"post":{"summary":"Create a free API key (shown once)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"contact":{"type":"string","description":"optional email, only used to reach you about the API"}}}}}},"responses":{"201":{"description":"key"}}}},"/webhooks":{"get":{"summary":"List your webhooks (key required)","responses":{"200":{"description":"list"}}},"post":{"summary":"Subscribe to new events (key required). Deliveries are HMAC-SHA256 signed: header X-Alerts-Signature = sha256=HMAC(secret, timestamp + \".\" + body), X-Alerts-Timestamp","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"https only"},"types":{"type":"array","items":{"type":"string"}},"min_danger":{"type":"integer"},"scope":{"type":"string"},"value":{"type":"string"}}}}}},"responses":{"201":{"description":"created; secret shown once"}}},"delete":{"summary":"Delete webhook ?id=","responses":{"200":{"description":"ok"}}}}}}