Documentation

History Statistics

Retrieve detailed historical records of alerts with full city data. Each alert includes the list of cities that were targeted simultaneously. By default, only city IDs and names are returned - use the include parameter to add translations and coordinates as needed.

GEThttps://sirenapi.orielhaim.com/stats/history

Returns paginated alert history with nested city data

Query Parameters

ParameterTypeDescriptionDefaultRequired
startDateISO 8601Filter alerts from this date onwardsall timeno
endDateISO 8601Filter alerts until this datenowno
limitintegerNumber of alerts to return (1-1000)20no
offsetintegerNumber of results to skip for pagination0no
cityIdintegerFilter by city ID (exact match)-no
cityNamestringFilter by city name in Hebrew (exact match)-no
searchstringSearch by city name (partial match, 1-100 chars)-no
categorystringFilter by alert type (e.g. missiles, drones, earthquakes)-no
originstringFilter by alert origin(s), comma-separated (e.g. gaza,lebanon)all originsno
sortenumSort results by field: timestamp, type, or origintimestampno
orderenumSort direction: asc or descdescno
includestringComma-separated optional fields: translations, coords, polygons- (none)no

The include Parameter

By default, each city in the cities array only contains id and name. Use include to opt-in to additional fields. This significantly reduces response size when you don't need translations or coordinates.

ValueFields Added to Each CityUse Case
translationstranslations.name (en, ru, ar)Multi-language alert feeds
coordslat, lngPlotting alerts on a map
polygonspolygons (GeoJSON)City boundary / shape on map

City Filter Priority

Three parameters filter by city: cityId, cityName, and search. Only one is applied at a time, in this priority order:

cityIdcityNamesearch

Example Requests

Latest 20 alerts - minimal response

bash
1GET https://sirenapi.orielhaim.com/stats/history

Response Structure

Always included

FieldTypeDescription
data[].idnumberUnique alert ID
data[].timestampstringISO 8601 timestamp of the alert
data[].typestringAlert category (e.g. missiles)
data[].originstring | nullAlert origin / threat source (e.g. gaza, lebanon)
data[].cities[].idnumberCity ID
data[].cities[].namestringCity name in Hebrew

Optional - requires include

FieldTypeDescriptioninclude
data[].cities[].translationsobjectTranslated name in en, ru, artranslations
data[].cities[].latnumberLatitude coordinatecoords
data[].cities[].lngnumberLongitude coordinatecoords
data[].cities[].polygonsobjectGeoJSON polygon for city boundarypolygons

Pagination

FieldTypeDescription
pagination.totalnumberTotal number of matching alerts
pagination.limitnumberRequested limit
pagination.offsetnumberRequested offset
pagination.hasMorebooleanWhether more results are available

Example Responses

GET https://sirenapi.orielhaim.com/stats/history?limit=2 - no include, lean response

json
1{
2 "data": [
3 {
4 "id": 10523,
5 "timestamp": "2023-11-15T14:30:00.000Z",
6 "type": "missiles",
7 "origin": "gaza",
8 "cities": [
9 {
10 "id": 45,
11 "name": "תל אביב - יפו"
12 },
13 {
14 "id": 46,
15 "name": "רמת גן"
16 }
17 ]
18 },
19 {
20 "id": 10522,
21 "timestamp": "2023-11-15T14:25:00.000Z",
22 "type": "missiles",
23 "origin": "gaza",
24 "cities": [
25 {
26 "id": 12,
27 "name": "אשדוד"
28 }
29 ]
30 }
31 ],
32 "pagination": {
33 "total": 5420,
34 "limit": 2,
35 "offset": 0,
36 "hasMore": true
37 }
38}