Transit Route
Note: This service is subject to Terms and Conditions as described in Supplier Terms for Developers Using HERE Location Platform APIs.
To find a transit route from Chicago's O'Hare Airport to the Chicago Blue Line Station using public transit, send the following GET request:
https://transit.api.here.com/v3/route.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&routing=all
&dep=41.9773,-87.9019
&arr=41.8961,-87.6552
&time=2019-06-24T07%3A30%3A00
The response to the above request includes the following high level elements:
- a total of 3 transit connections or journeys
- each journey includes the following information:
- multiple transit segments with each segment (representing either a pedestrian or a transit segment) containing departure/arrival times, duration and coordinates
- frequency of next 3 departures
- the transit segment shows the actual stops or stations of departure, arrival and all intermediate stops in between
- a set of operators who run the services included in the journeys, including operator code, operator name and links to operator websites, if any
{
"Res": {
"serviceUrl": "http://ip-10-124-92-96.eu-west-1.compute.internal:8080/hafasproxy/G1B",
"Connections": {
"context": "fc66402d-4acc-4546-94b8-11c6fd07afaa",
"Connection": [
{
"id": "R0009a4-C0",
"duration": "PT43M",
"transfers": 0,
"Dep": {
"time": "2017-04-11T07:35:00",
"Addr": {
"x": -87.90189,
"y": 41.977296
}
},
"Arr": {
"time": "2017-04-11T08:18:00",
"Stn": {
"id": "418811467#104",
"name": "Chicago-Blue",
"x": -87.655217,
"y": 41.896079
}
},
"Sections": {
"Sec": [
{
"mode": 20,
"id": "R0009a4-C0-S0",
"Dep": {
"time": "2017-04-11T07:35:00",
"Addr": {
"x": -87.90189,
"y": 41.977296
},
"Transport": {
"mode": 20
}
},
"Journey": {
"duration": "PT7M",
"distance": 300
},
"Arr": {
"time": "2017-04-11T07:42:00",
"Stn": {
"id": "418811763#104",
"name": "O'Hare",
"x": -87.904218,
"y": 41.977665
},
"AP": {
"x": -87.90384,
"y": 41.977827,
"id": "418812178#104",
"name": "OHare"
}
}
},
{
"mode": 7,
"id": "R0009a4-C0-S1",
"Dep": {
"time": "2017-04-11T07:42:00",
"Stn": {
"id": "418811763#104",
"name": "O'Hare",
"x": -87.904218,
"y": 41.977665
},
"Transport": {
"mode": 7,
"dir": "Forest Park",
"name": "Blue Line",
"At": {
"operator": "1gA48700",
"color": "#00A1DE",
"textColor": "#FFFFFF",
"category": "Train"
}
},
"Freq": {
"min": 3,
"max": 10,
"AltDep": [
{
"time": "2017-04-11T07:45:00",
"Transport": {
"mode": 7,
"dir": "Forest Park",
"name": "Blue Line",
"At": {
"operator": "1gA48700",
"color": "#00A1DE",
"textColor": "#FFFFFF",
"category": "Train"
}
}
},
{
"time": "2017-04-11T07:50:00",
"Transport": {
"mode": 7,
"dir": "Forest Park",
"name": "Blue Line",
"At": {
"operator": "1gA48700",
"color": "#00A1DE",
"textColor": "#FFFFFF",
"category": "Train"
}
}
},
{
"time": "2017-04-11T07:53:00",
"Transport": {
"mode": 7,
"dir": "Uic",
"name": "Blue Line",
"At": {
"operator": "1gA48700",
"color": "#00A1DE",
"textColor": "#FFFFFF",
"category": "Train"
}
}
}
]
}
},
"Journey": {
"duration": "PT36M",
"Stop": [
{
"dep": "2017-04-11T07:42:00",
"Stn": {
"id": "418811763#104",
"name": "O'Hare",
"x": -87.904218,
"y": 41.977665
}
},
{
"dep": "2017-04-11T07:47:00",
"Stn": {
"id": "418811355#104",
"name": "Rosemont",
"x": -87.859389,
"y": 41.983508
}
},
{
"dep": "2017-04-11T07:49:00",
"Stn": {
"id": "418811242#104",
"name": "Cumberland",
"x": -87.83803,
"y": 41.984245
}
},
{
"dep": "2017-04-11T07:53:00",
"Stn": {
"id": "418811342#104",
"name": "Harlem-O'Hare",
"x": -87.808896,
"y": 41.982267
}
},
{
"dep": "2017-04-11T07:57:00",
"Stn": {
"id": "418811443#104",
"name": "Jefferson Park",
"x": -87.760894,
"y": 41.970635
}
},
{
"dep": "2017-04-11T07:59:00",
"Stn": {
"id": "418811456#104",
"name": "Montrose-Blue",
"x": -87.743572,
"y": 41.961538
}
},
{
"dep": "2017-04-11T08:02:00",
"Stn": {
"id": "418811303#104",
"name": "Irving Park-Blue",
"x": -87.729225,
"y": 41.952926
}
},
{
"dep": "2017-04-11T08:03:00",
"Stn": {
"id": "418811435#104",
"name": "Addison-Blue",
"x": -87.719058,
"y": 41.94738
}
},
{
"dep": "2017-04-11T08:05:00",
"Stn": {
"id": "418811211#104",
"name": "Belmont-Blue",
"x": -87.712361,
"y": 41.93813
}
},
{
"dep": "2017-04-11T08:08:00",
"Stn": {
"id": "418811394#104",
"name": "Logan Square",
"x": -87.708541,
"y": 41.929725
}
},
{
"dep": "2017-04-11T08:10:00",
"Stn": {
"id": "418811308#104",
"name": "California-O'Hare",
"x": -87.696891,
"y": 41.921941
}
},
{
"dep": "2017-04-11T08:12:00",
"Stn": {
"id": "418811325#104",
"name": "Western-O'Hare",
"x": -87.687362,
"y": 41.916161
}
},
{
"dep": "2017-04-11T08:14:00",
"Stn": {
"id": "418811761#104",
"name": "Damen-O'Hare",
"x": -87.677438,
"y": 41.909742
}
},
{
"dep": "2017-04-11T08:16:00",
"Stn": {
"id": "418811261#104",
"name": "Division",
"x": -87.666498,
"y": 41.903351
}
},
{
"dep": "2017-04-11T08:18:00",
"Stn": {
"id": "418811467#104",
"name": "Chicago-Blue",
"x": -87.655217,
"y": 41.896079
}
}
]
},
"Arr": {
"time": "2017-04-11T08:18:00",
"Stn": {
"id": "418811467#104",
"name": "Chicago-Blue",
"x": -87.655217,
"y": 41.896079
}
}
}
]
}
},
... more lines ...
],
"Operators": {
"Op": [
{
"code": "1gA48700",
"name": "Chicago Transit Authority",
"type": "TT",
"Link": [
{
"type": "website",
"href": "https://transit.api.here.com/r?app_id={YOUR_APP_ID}&u=http://transitchicago.com",
"text": "Chicago Transit Authority"
}
],
"At": {
"phone": "1-888-YOURCTA"
}
}
]
}
}
}
}