Plan a trip from Los Angeles’ Union Station to Scripps College
Note that the Geocoder transforms place names to latitude/longitude.
curl 'https://otp.metroservices.io/otp/routers/default/plan?arriveBy=false&date=09-26-2019&fromPlace=34.055862,-118.234286&maxWalkDistance=2253.0759999999996&mode=BUS,RAIL,TRAM,SUBWAY,WALK&numItineraries=2&optimize=QUICK&showIntermediateStops=true&time=5:27pm&toPlace=34.10387,-117.71035&wheelchair=false' \ -XGET \ -H 'Accept: application/json, text/plain, /' \ -H 'Accept-Encoding: br, gzip, deflate' \ -H 'Connection: keep-alive'
That request returns:
{ "requestParameters": { "date": "09-26-2019", "mode": "BUS,RAIL,TRAM,SUBWAY,WALK", "arriveBy": "false", "wheelchair": "false", "optimize": "QUICK", "showIntermediateStops": "true", "fromPlace": "34.055862,-118.234286", "toPlace": "34.10387,-117.71035", "maxWalkDistance": "2253.0759999999996", "time": "5:27pm", "numItineraries": "2" }, "plan": { "date": 1569544020000, "from": { "name": "Origin", "lon": -118.234286, "lat": 34.055862, "orig": "", "vertexType": "NORMAL" }, "to": { "name": "Destination", "lon": -117.71035, "lat": 34.10387, "orig": "", "vertexType": "NORMAL" }, "itineraries": [ { "duration": 5258, "startTime": 1569544020000, "endTime": 1569549278000, "walkTime": 901, "transitTime": 3720, "waitingTime": 637, "walkDistance": 1650.5325000000005, "walkLimitExceeded": false, "elevationLost": 0, "elevationGained": 0, "transfers": 0, "legs": [ { "startTime": 1569544020000, "endTime": 1569544102000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 132.335, "pathway": false, "mode": "WALK", "route": "", "agencyTimeZoneOffset": -25200000, "interlineWithPreviousLeg": false, "from": { "name": "Origin", "lon": -118.234286, "lat": 34.055862, "departure": 1569544020000, "orig": "", "vertexType": "NORMAL" }, "to": { "name": "path", "lon": -118.23480500646632, "lat": 34.05584072376971, "arrival": 1569544102000, "departure": 1569544103000, "vertexType": "NORMAL" }, "legGeometry": { "points": "cpznEjsspUw@KA@hALJB?BC^ABCX?@CZIA", "length": 12 }, "rentedBike": false, "transitLeg": false, "duration": 82, "intermediateStops": [], "steps": [ { "distance": 33.307, "relativeDirection": "DEPART", "streetName": "Platform 7;8", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -118.23429188006396, "lat": 34.05586285216829, "elevation": [] }, { "distance": 48.406000000000006, "relativeDirection": "LEFT", "streetName": "path", "absoluteDirection": "SOUTH", "stayOn": false, "area": false, "bogusName": true, "lon": -118.2342418, "lat": 34.056150800000005, "elevation": [] }, { "distance": 45.213, "relativeDirection": "RIGHT", "streetName": "Union Station Underground Walkway", "absoluteDirection": "WEST", "stayOn": false, "area": false, "bogusName": false, "lon": -118.2343318, "lat": 34.0557219, "elevation": [] }, { "distance": 5.409, "relativeDirection": "RIGHT", "streetName": "path", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": true, "lon": -118.2348151, "lat": 34.0557928, "elevation": [] } ] }, { "startTime": 1569544103000, "endTime": 1569544105000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 0, "pathway": false, "mode": "WALK", "route": "", "agencyTimeZoneOffset": -25200000, "interlineWithPreviousLeg": false, "from": { "name": "Union Station - Metro Red & Purple Lines", "lon": -118.234249, "lat": 34.056197, "arrival": 1569544102000, "departure": 1569544103000, "vertexType": "NORMAL" }, "to": { "name": "UNION STATION/800 N ALAMEDA ST", "stopId": "6:10018", "lon": -118.23435634906, "lat": 34.056579508926, "arrival": 1569544105000, "departure": 1569544740000, "stopIndex": 0, "stopSequence": 0, "vertexType": "TRANSIT" }, "legGeometry": { "points": "erznEsspUXdB", "length": 2 }, "rentedBike": false, "transitLeg": false, "duration": 2, "intermediateStops": [], "steps": [ { "distance": 129.805, "relativeDirection": "RIGHT", "streetName": "Union Station - Metro Gold Line => UNION STATION/800 N ALAMEDA ST", "absoluteDirection": "SOUTHEAST", "stayOn": false, "area": false, "bogusName": false, "lon": -118.234759, "lat": 34.056061, "elevation": [] } ] }, { "startTime": 1569544740000, "endTime": 1569548460000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 48036.401909817745, "pathway": false, "mode": "RAIL", "route": "ML SB", "agencyName": "Metrolink", "agencyUrl": "http://www.metrolinktrains.com/", "agencyTimeZoneOffset": -25200000, "routeType": 2, "routeId": "6:582.1", "interlineWithPreviousLeg": false, "headsign": "SAN BERNARDINO\"\"", "agencyId": "31", "tripId": "6:582.1-18-0-2857-1739-1925-2167-0-0-00-326_ML_1CR", "serviceDate": "20190926", "from": { "name": "UNION STATION/800 N ALAMEDA ST", "stopId": "6:10018", "lon": -118.23435634906, "lat": 34.056579508926, "arrival": 1569544105000, "departure": 1569544740000, "stopIndex": 0, "stopSequence": 0, "vertexType": "TRANSIT" }, "to": { "name": "CLAREMONT STATION/200 W 1ST ST", "stopId": "6:10040", "lon": -117.71547177074, "lat": 34.09390044496, "arrival": 1569548460000, "departure": 1569548461000, "stopIndex": 6, "stopSequence": 1579, "vertexType": "TRANSIT" }, "legGeometry": { "points": "qtznEvsspU{d@q|KmvAa_Y_x@g_Nsf@chLkHudZ_Ai}E", "length": 7 }, "routeShortName": "ML SB", "routeLongName": "METROLINK SAN BERNARDINO LINE", "rentedBike": false, "transitLeg": true, "duration": 3720, "intermediateStops": [ { "name": "CAL STATE LA STATION", "stopId": "6:10019", "lon": -118.16818749602, "lat": 34.062636155015, "arrival": 1569545580000, "departure": 1569545580000, "stopIndex": 1, "stopSequence": 201, "vertexType": "TRANSIT" }, { "name": "EL MONTE METROLINK STATION/10925 RAILROAD ST", "stopId": "6:10026", "lon": -118.03505261282, "lat": 34.076624852838, "arrival": 1569546240000, "departure": 1569546240000, "stopIndex": 2, "stopSequence": 608, "vertexType": "TRANSIT" }, { "name": "BALDWIN PARK STATION/3825 DOWNING AV", "stopId": "6:10028", "lon": -117.95821807644, "lat": 34.085748351241, "arrival": 1569546840000, "departure": 1569546840000, "stopIndex": 3, "stopSequence": 843, "vertexType": "TRANSIT" }, { "name": "COVINA STATION/600 N CITRUS AV", "stopId": "6:10030", "lon": -117.89019924123, "lat": 34.092080715893, "arrival": 1569547380000, "departure": 1569547380000, "stopIndex": 4, "stopSequence": 1050, "vertexType": "TRANSIT" }, { "name": "POMONA NORTH STATION/205 SANTA FE ST", "stopId": "6:10037", "lon": -117.75104863541, "lat": 34.093586043899, "arrival": 1569548160000, "departure": 1569548160000, "stopIndex": 5, "stopSequence": 1471, "vertexType": "TRANSIT" } ], "steps": [] }, { "startTime": 1569548461000, "endTime": 1569549278000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 1517.826, "pathway": false, "mode": "WALK", "route": "", "agencyTimeZoneOffset": -25200000, "interlineWithPreviousLeg": false, "from": { "name": "CLAREMONT STATION/200 W 1ST ST", "stopId": "6:10040", "lon": -117.71547177074, "lat": 34.09390044496, "arrival": 1569548460000, "departure": 1569548461000, "stopIndex": 6, "stopSequence": 1579, "vertexType": "TRANSIT" }, "to": { "name": "Destination", "lon": -117.71035, "lat": 34.10387, "arrival": 1569549278000, "orig": "", "vertexType": "NORMAL" }, "legGeometry": { "points": "w}aoEvhnmU?cAF??U?UI?I?E?@?qA?[?_E?gE?cE@?Y?mA?qB?aCc@?yB??a@Ic@KUIQM?{D?OA_F@qAAAc@CQOY@y@K_@Kk@GOICkD?QBE@{AmB?Ma@?iB@O?@i@?A", "length": 47 }, "rentedBike": false, "transitLeg": false, "duration": 817, "intermediateStops": [], "steps": [ { "distance": 35.021, "relativeDirection": "DEPART", "streetName": "Platform 2", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71547184191404, "lat": 34.09388419750691, "elevation": [] }, { "distance": 20.825, "relativeDirection": "LEFT", "streetName": "path", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": true, "lon": -117.7151398, "lat": 34.0938432, "elevation": [] }, { "distance": 93.518, "relativeDirection": "LEFT", "streetName": "South College Avenue", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71491370000001, "lat": 34.093847700000005, "elevation": [] }, { "distance": 326.158, "relativeDirection": "CONTINUE", "streetName": "College Avenue", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71491800000001, "lat": 34.0946887, "elevation": [] }, { "distance": 159.93099999999998, "relativeDirection": "RIGHT", "streetName": "4th Street", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71492140000001, "lat": 34.0976219, "elevation": [] }, { "distance": 264.39799999999997, "relativeDirection": "LEFT", "streetName": "path", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": true, "lon": -117.71318450000001, "lat": 34.0976262, "elevation": [] }, { "distance": 170.844, "relativeDirection": "CONTINUE", "streetName": "College Way", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -117.7126288, "lat": 34.0996605, "elevation": [] }, { "distance": 118.11, "relativeDirection": "RIGHT", "streetName": "Columbia Avenue", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": false, "lon": -117.7126252, "lat": 34.101196900000005, "elevation": [] }, { "distance": 115.486, "relativeDirection": "LEFT", "streetName": "Columbia Avenue", "absoluteDirection": "NORTH", "stayOn": true, "area": false, "bogusName": false, "lon": -117.7114772, "lat": 34.1016211, "elevation": [] }, { "distance": 213.53499999999997, "relativeDirection": "RIGHT", "streetName": "path", "absoluteDirection": "NORTHEAST", "stayOn": false, "area": false, "bogusName": true, "lon": -117.7114894, "lat": 34.102654300000005, "elevation": [] } ] } ], "tooSloped": false }, { "duration": 6758, "startTime": 1569544020000, "endTime": 1569550778000, "walkTime": 901, "transitTime": 3600, "waitingTime": 2257, "walkDistance": 1650.5325000000005, "walkLimitExceeded": false, "elevationLost": 0, "elevationGained": 0, "transfers": 0, "legs": [ { "startTime": 1569544020000, "endTime": 1569544102000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 132.335, "pathway": false, "mode": "WALK", "route": "", "agencyTimeZoneOffset": -25200000, "interlineWithPreviousLeg": false, "from": { "name": "Origin", "lon": -118.234286, "lat": 34.055862, "departure": 1569544020000, "orig": "", "vertexType": "NORMAL" }, "to": { "name": "path", "lon": -118.23480500646632, "lat": 34.05584072376971, "arrival": 1569544102000, "departure": 1569544103000, "vertexType": "NORMAL" }, "legGeometry": { "points": "cpznEjsspUw@KA@hALJB?BC^ABCX?@CZIA", "length": 12 }, "rentedBike": false, "transitLeg": false, "duration": 82, "intermediateStops": [], "steps": [ { "distance": 33.307, "relativeDirection": "DEPART", "streetName": "Platform 7;8", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -118.23429188006396, "lat": 34.05586285216829, "elevation": [] }, { "distance": 48.406000000000006, "relativeDirection": "LEFT", "streetName": "path", "absoluteDirection": "SOUTH", "stayOn": false, "area": false, "bogusName": true, "lon": -118.2342418, "lat": 34.056150800000005, "elevation": [] }, { "distance": 45.213, "relativeDirection": "RIGHT", "streetName": "Union Station Underground Walkway", "absoluteDirection": "WEST", "stayOn": false, "area": false, "bogusName": false, "lon": -118.2343318, "lat": 34.0557219, "elevation": [] }, { "distance": 5.409, "relativeDirection": "RIGHT", "streetName": "path", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": true, "lon": -118.2348151, "lat": 34.0557928, "elevation": [] } ] }, { "startTime": 1569544103000, "endTime": 1569544105000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 0, "pathway": false, "mode": "WALK", "route": "", "agencyTimeZoneOffset": -25200000, "interlineWithPreviousLeg": false, "from": { "name": "Union Station - Metro Red & Purple Lines", "lon": -118.234249, "lat": 34.056197, "arrival": 1569544102000, "departure": 1569544103000, "vertexType": "NORMAL" }, "to": { "name": "UNION STATION/800 N ALAMEDA ST", "stopId": "6:10018", "lon": -118.23435634906, "lat": 34.056579508926, "arrival": 1569544105000, "departure": 1569546360000, "stopIndex": 0, "stopSequence": 0, "vertexType": "TRANSIT" }, "legGeometry": { "points": "erznEsspUXdB", "length": 2 }, "rentedBike": false, "transitLeg": false, "duration": 2, "intermediateStops": [], "steps": [ { "distance": 129.805, "relativeDirection": "RIGHT", "streetName": "Union Station - Metro Gold Line => UNION STATION/800 N ALAMEDA ST", "absoluteDirection": "SOUTHEAST", "stayOn": false, "area": false, "bogusName": false, "lon": -118.234759, "lat": 34.056061, "elevation": [] } ] }, { "startTime": 1569546360000, "endTime": 1569549960000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 48036.401909817745, "pathway": false, "mode": "RAIL", "route": "ML SB", "agencyName": "Metrolink", "agencyUrl": "http://www.metrolinktrains.com/", "agencyTimeZoneOffset": -25200000, "routeType": 2, "routeId": "6:582.1", "interlineWithPreviousLeg": false, "headsign": "SAN BERNARDINO\"\"", "agencyId": "31", "tripId": "6:582.1-19-0-2857-1806-1951-2167-0-0-00-328_ML_1CR", "serviceDate": "20190926", "from": { "name": "UNION STATION/800 N ALAMEDA ST", "stopId": "6:10018", "lon": -118.23435634906, "lat": 34.056579508926, "arrival": 1569544105000, "departure": 1569546360000, "stopIndex": 0, "stopSequence": 0, "vertexType": "TRANSIT" }, "to": { "name": "CLAREMONT STATION/200 W 1ST ST", "stopId": "6:10040", "lon": -117.71547177074, "lat": 34.09390044496, "arrival": 1569549960000, "departure": 1569549961000, "stopIndex": 6, "stopSequence": 1579, "vertexType": "TRANSIT" }, "legGeometry": { "points": "qtznEvsspU{d@q|KmvAa_Y_x@g_Nsf@chLkHudZ_Ai}E", "length": 7 }, "routeShortName": "ML SB", "routeLongName": "METROLINK SAN BERNARDINO LINE", "rentedBike": false, "transitLeg": true, "duration": 3600, "intermediateStops": [ { "name": "CAL STATE LA STATION", "stopId": "6:10019", "lon": -118.16818749602, "lat": 34.062636155015, "arrival": 1569547140000, "departure": 1569547140000, "stopIndex": 1, "stopSequence": 201, "vertexType": "TRANSIT" }, { "name": "EL MONTE METROLINK STATION/10925 RAILROAD ST", "stopId": "6:10026", "lon": -118.03505261282, "lat": 34.076624852838, "arrival": 1569547800000, "departure": 1569547800000, "stopIndex": 2, "stopSequence": 608, "vertexType": "TRANSIT" }, { "name": "BALDWIN PARK STATION/3825 DOWNING AV", "stopId": "6:10028", "lon": -117.95821807644, "lat": 34.085748351241, "arrival": 1569548400000, "departure": 1569548400000, "stopIndex": 3, "stopSequence": 843, "vertexType": "TRANSIT" }, { "name": "COVINA STATION/600 N CITRUS AV", "stopId": "6:10030", "lon": -117.89019924123, "lat": 34.092080715893, "arrival": 1569548880000, "departure": 1569548880000, "stopIndex": 4, "stopSequence": 1050, "vertexType": "TRANSIT" }, { "name": "POMONA NORTH STATION/205 SANTA FE ST", "stopId": "6:10037", "lon": -117.75104863541, "lat": 34.093586043899, "arrival": 1569549660000, "departure": 1569549660000, "stopIndex": 5, "stopSequence": 1471, "vertexType": "TRANSIT" } ], "steps": [] }, { "startTime": 1569549961000, "endTime": 1569550778000, "departureDelay": 0, "arrivalDelay": 0, "realTime": false, "distance": 1517.826, "pathway": false, "mode": "WALK", "route": "", "agencyTimeZoneOffset": -25200000, "interlineWithPreviousLeg": false, "from": { "name": "CLAREMONT STATION/200 W 1ST ST", "stopId": "6:10040", "lon": -117.71547177074, "lat": 34.09390044496, "arrival": 1569549960000, "departure": 1569549961000, "stopIndex": 6, "stopSequence": 1579, "vertexType": "TRANSIT" }, "to": { "name": "Destination", "lon": -117.71035, "lat": 34.10387, "arrival": 1569550778000, "orig": "", "vertexType": "NORMAL" }, "legGeometry": { "points": "w}aoEvhnmU?cAF??U?UI?I?E?@?qA?[?_E?gE?cE@?Y?mA?qB?aCc@?yB??a@Ic@KUIQM?{D?OA_F@qAAAc@CQOY@y@K@Kk@GOICkD?QBE@{AmB?Ma@?iB@O?@i@?_A", "length": 47 }, "rentedBike": false, "transitLeg": false, "duration": 817, "intermediateStops": [], "steps": [ { "distance": 35.021, "relativeDirection": "DEPART", "streetName": "Platform 2", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71547184191404, "lat": 34.09388419750691, "elevation": [] }, { "distance": 20.825, "relativeDirection": "LEFT", "streetName": "path", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": true, "lon": -117.7151398, "lat": 34.0938432, "elevation": [] }, { "distance": 93.518, "relativeDirection": "LEFT", "streetName": "South College Avenue", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71491370000001, "lat": 34.093847700000005, "elevation": [] }, { "distance": 326.158, "relativeDirection": "CONTINUE", "streetName": "College Avenue", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71491800000001, "lat": 34.0946887, "elevation": [] }, { "distance": 159.93099999999998, "relativeDirection": "RIGHT", "streetName": "4th Street", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": false, "lon": -117.71492140000001, "lat": 34.0976219, "elevation": [] }, { "distance": 264.39799999999997, "relativeDirection": "LEFT", "streetName": "path", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": true, "lon": -117.71318450000001, "lat": 34.0976262, "elevation": [] }, { "distance": 170.844, "relativeDirection": "CONTINUE", "streetName": "College Way", "absoluteDirection": "NORTH", "stayOn": false, "area": false, "bogusName": false, "lon": -117.7126288, "lat": 34.0996605, "elevation": [] }, { "distance": 118.11, "relativeDirection": "RIGHT", "streetName": "Columbia Avenue", "absoluteDirection": "EAST", "stayOn": false, "area": false, "bogusName": false, "lon": -117.7126252, "lat": 34.101196900000005, "elevation": [] }, { "distance": 115.486, "relativeDirection": "LEFT", "streetName": "Columbia Avenue", "absoluteDirection": "NORTH", "stayOn": true, "area": false, "bogusName": false, "lon": -117.7114772, "lat": 34.1016211, "elevation": [] }, { "distance": 213.53499999999997, "relativeDirection": "RIGHT", "streetName": "path", "absoluteDirection": "NORTHEAST", "stayOn": false, "area": false, "bogusName": true, "lon": -117.7114894, "lat": 34.102654300000005, "elevation": [] } ] } ], "tooSloped": false } ] }, "debugOutput": { "precalculationTime": 30, "pathCalculationTime": 209, "pathTimes": [ 85, 124 ], "renderingTime": 1, "totalTime": 240, "timedOut": false }, "elevationMetadata": { "ellipsoidToGeoidDifference": -34.300757718908784, "geoidElevation": false } }