Public Transit API Developer's Guide

Real-Time Transit Alerts

User Story

The user wants to obtain detailed information about possible public transit alerts or other announcements from an external source, such as Twitter, in their location (41.88425,-87.63245)

Note: Transit Alerts are sourced from API feeds of transit agencies and/or Twitter accounts where available. If the alerts' origin is from Twitter, you are required to follow Twitter's requirements for presenting alerts correctly. HERE does not provide any data for Twitter's logo and links to Twitter's actions. Refer to Twitter Display Requirements for detailed information.

Request

The query parameter center specifies the location of the search. The max parameter limits the number of transit alerts to 10.

https://transit.api.here.com/v3/alerts/nearby.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&max=10
&center=41.88425,-87.63245

Response

The response to the request contains the following information blocks:
  • a maximum of 40 transit alerts by default, can be configured using the optional max parameter
  • each transit alert includes the following information:
    • origin of the alert, for example Twitter
    • name of the transit operator
    • validity of the alert – date and time
    • related transit lines, if available
{

  "Res": {
    "serviceUrl": "http://internal-ptes-cit-v194-1362002986.us-east-1.elb.amazonaws.com/tfa",
    "Alerts": {
      "Alert": [{
          "id": "49609-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-18T04:00:00",
          "valid_from": "2018-06-15T07:00:00",
          "severity": "LOW",
          "info": "NB end at the Halsted/Belmont bus terminal.\n\nSB begin at the Halsted/Belmont bus terminal, operate via Belmont to Halsted,  normal route on Halsted.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49609",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49609"
          },
          "Transports": {
            "Transport": [{
              "name": "8",
              "mode": 5
            }]
          }
        },
        {
          "id": "49555-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-15T16:00:00",
          "valid_from": "2018-06-13T09:00:00",
          "severity": "LOW",
          "info": "Westbound #63 buses will operate via 63rd, State, 59th, and Yale, then resume their normal route on 63rd.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49555",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49555"
          },
          "Transports": {
            "Transport": [{
              "name": "63",
              "mode": 5
            }]
          }
        },
        {
          "id": "49262-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-26T00:00:00",
          "valid_from": "2018-06-12T00:00:00",
          "severity": "INFO",
          "info": "The Kimball- and Linden-bound platform elevator at the Wellington station will be temporarily out of service.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49262",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49262"
          },
          "Transports": {
            "Transport": [{
                "name": "Purple Line Express",
                "mode": 7
              },
              {
                "name": "Brown Line",
                "mode": 7
              }
            ]
          }
        },
        {
          "id": "49459-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-22T16:00:00",
          "valid_from": "2018-06-11T07:00:00",
          "severity": "LOW",
          "info": "#103 buses will operate in both directions via 103rd, Western, 111th, Kedzie, and 103rd.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49459",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49459"
          },
          "Transports": {
            "Transport": [{
              "name": "103",
              "mode": 5
            }]
          }
        },
        {
          "id": "49532-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-29T16:00:00",
          "valid_from": "2018-06-11T07:00:00",
          "severity": "LOW",
          "info": "Northbound #71 buses will operate via Exchange, South Shore, 67th, and Jeffery, then resume their normal route on 71st.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49532",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49532"
          },
          "Transports": {
            "Transport": [{
              "name": "71",
              "mode": 5
            }]
          }
        },
        {
          "id": "49261-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-22T00:00:00",
          "valid_from": "2018-06-08T00:00:00",
          "severity": "INFO",
          "info": "The Loop-bound platform elevator at the Damen station will be temporarily out of service.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49261",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49261"
          },
          "Transports": {
            "Transport": [{
              "name": "Brown Line",
              "mode": 7
            }]
          }
        },
        {
          "id": "49387-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-07-02T16:00:00",
          "valid_from": "2018-06-05T09:00:00",
          "severity": "LOW",
          "info": "WB #67,  NB #94 via 69th, Western, and Marquette to California.\n\n#67 via California to 71st, normal route.\n\n#94  normal route on California.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49387",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49387"
          },
          "Transports": {
            "Transport": [{
                "name": "94",
                "mode": 5
              },
              {
                "name": "67",
                "mode": 5
              }
            ]
          }
        },
        {
          "id": "48030-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-30T16:00:00",
          "valid_from": "2018-05-31T09:00:00",
          "severity": "LOW",
          "info": "#71 buses will operate in both directions via 71st, South Chicago, \nSt. Lawrence, and 71st.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=48030",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=48030"
          },
          "Transports": {
            "Transport": [{
              "name": "71",
              "mode": 5
            }]
          }
        },
        {
          "id": "49035-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-29T00:00:00",
          "valid_from": "2018-05-29T00:00:00",
          "severity": "INFO",
          "info": "The Cottage Grove-bound platform elevator at the King Drive Green Line station will be temporarily out of service.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49035",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49035"
          },
          "Transports": {
            "Transport": [{
              "name": "Green Line",
              "mode": 7
            }]
          }
        },
        {
          "id": "49128-dXMuaWwuY2hpY2Fnby5jdGE",
          "operator": "CTA",
          "origin": "API",
          "valid_till": "2018-06-19T18:00:00",
          "valid_from": "2018-05-24T07:00:00",
          "severity": "LOW",
          "info": "Southbound #24 buses will operate via Wentworth, 69th, Lafayette, and Vincennes to Wentworth, then continue their normal route on Vincennes.",
          "Link": {
            "href": "http://mobility.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49128",
            "type": "alert",
            "text": "http://www.transitchicago.com/travel_information/alert_detail.aspx?AlertId=49128"
          },
          "Transports": {
            "Transport": [{
              "name": "24",
              "mode": 5
            }]
          }
        }
      ]
    }
  }

}