Get alert
One alert by feed entity id.
/api/alerts/:id Alerts have no natural key in GTFS-realtime, so the id is the feed entity id, prefixed with the file it came from — for example sl-service-alerts.pb:14050001800799847. It is stable for as long as the agency keeps publishing that entity, and no longer.
Try it
Runs from your browser against the API in .
Path
Query
Run this in your terminal
curl equivalent
Parameters
Path
| Parameter | Type | Default | Description |
|---|---|---|---|
idrequiredpath | string | — | Feed entity id. |
Query
| Parameter | Type | Default | Description |
|---|---|---|---|
at | timestamp | now | The instant to evaluate |
lang | string | — | Language tag used to pick among an alert's translations. Matches an exact tag first ( Inert in this capture. None of the 177 alerts tag their translations with a language, so every request falls through to the untagged translation regardless of what you pass. |
Response
A single object under data, with no meta.
curl "$API_BASE/api/alerts/sl-service-alerts.pb:14050001800799847" {
"data": {
"id": "sl-service-alerts.pb:14050001800799847",
"activePeriods": [
{
"start": {
"epoch": 1743746928,
"iso": "2025-04-04T06:08:48.000Z"
},
"end": {
"epoch": 1817157543,
"iso": "2027-08-01T21:59:03.000Z"
}
}
],
"informedEntities": [
{
"stopId": "9022050009805001",
"stop": {
"stopId": "9022050009805001",
"name": "Himlabacken",
"latitude": 59.376235,
"longitude": 18.048877,
"locationType": 0,
"parentStation": "9805",
"platformCode": "1"
}
},
{
"stopId": "9022050009805001",
"stop": {
"stopId": "9022050009805001",
"name": "Himlabacken",
"latitude": 59.376235,
"longitude": 18.048877,
"locationType": 0,
"parentStation": "9805",
"platformCode": "1"
}
}
],
"cause": "CONSTRUCTION",
"effect": "UNKNOWN_EFFECT",
"headerText": {
"text": "Hållplats Himlabacken flyttad",
"translations": [
{
"text": "Hållplats Himlabacken flyttad"
}
]
},
"descriptionText": {
"text": "Hållplats Himlabacken är flyttad 90 meter Ulriksdal i färdriktningen för buss linje 503 mot (Ulriksdals begravnpl-) Ulriksdals st-Ö Bergshamra och 503 mot Ö Bergshamra-Ulriksdals stn-(Ulriksdals begravnpl) från och med 2025-04-01 pga vägarbete.\nDetta planeras pågå till och med 2027-08-01.",
"translations": [
{
"text": "Hållplats Himlabacken är flyttad 90 meter Ulriksdal i färdriktningen för buss linje 503 mot (Ulriksdals begravnpl-) Ulriksdals st-Ö Bergshamra och 503 mot Ö Bergshamra-Ulriksdals stn-(Ulriksdals begravnpl) från och med 2025-04-01 pga vägarbete.\nDetta planeras pågå till och med 2027-08-01."
}
]
},
"isActive": true
}
} Errors
{ "error": "request_failed", … } No alert carries that id.