Google Maps Directions
The routes between two places, with the time each travel mode takes, answered as the document: `search_metadata`, `search_parameters` (the request as read, with the defaults), `search_information` (`{}`), `travel_modes`, `places_info` and `directions`.
The routes between two places, with the time each travel mode takes, answered as the document:
search_metadata, search_parameters (the request as read, with the defaults),
search_information ({}), travel_modes, places_info and directions. Durations are
seconds and distances meters. A transit route has a time_window and rides between walks; a
flying one has the departure, arrival, price and airlines. Places Google cannot find are a 200
with directions: [] and a null address in places_info. Not answered: the route's geometry
and the traffic bars; transit preferences (prefer, and route other than best) are a 400.
Failures: timeout when the page never named its route request, blocked when the response was
not Maps' data.
X-API-Key<token>Your API key.
cancel_token?stringA name you make up for this request (a UUID is fine), so you can later GET /v1/cancel
with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.
1 <= length <= 128from*stringAn address, lat,lng, or a data id (0x...:0x...).
length <= 300to*stringThe same forms as from.
length <= 300waypoints?array<string>Up to 8 stops in order. Not with transit or time.
items <= 8travel_mode?stringbest is driving, transit and flying, one route of each.
"best""best""driving""cycling""walking""transit""flying"time?stringdepart_at:<unix seconds> or arrive_by:<unix seconds>. Not with waypoints; last_available is not supported.
^(depart_at|arrive_by):[0-9]+$avoid?array<>tolls and highways for driving and best; ferries for walking and cycling. A value the mode does not take is a 400.
distance_units?stringNot with transit or flying. automatic is by country.
"automatic""automatic""km""mi"route?stringTransit preference; only best is accepted.
prefer?stringDeprecatedTransit preference: not supported, a 400.
gl?stringCountry.
"us"hl?stringLanguage.
"en"The routes, as the document. When the page could not be parsed, the usual envelope.
application/json- response
The first three keys of every parsed 200 (the answer is the document itself, no success/data
envelope): what the search was (search_metadata), what it asked (search_parameters), the
parser's own search_information ({} when it has none). The engine's blocks follow, at the same
level. An engine whose answer is a list puts it under results.
search_metadata*search_parameters*The request's own fields as sent, engine first, without cancel_token.
search_information*The parser's own, e.g. yelp_search's; otherwise {}.
travel_modes?array<>places_info?array<>directions?array<>[key: string]?anycurl -X GET 'https://api.justserp.com/v1/google/maps/directions?from=New+York&to=Chicago%2C+Illinois&travel_mode=driving'{ "search_metadata": { "id": "string", "status": "Success", "created_at": "string", "request_url": "string", "html_url": "string" }, "search_parameters": {}, "search_information": {}, "travel_modes": [ { "travel_mode": "string", "formatted_duration": "string", "duration": 0 } ], "places_info": [ { "address": "string", "data_id": "string", "coordinates": { "latitude": 0, "longitude": 0 } } ], "directions": [ { "travel_mode": "string", "via": "string", "formatted_duration": "string", "duration": 0, "distance": 0, "formatted_typical_duration": "string", "optimistic_duration": 0, "pessimistic_duration": 0, "formatted_distance": "string", "warnings": [ "string" ], "time_window": {}, "instructions": [ { "travel_mode": "string", "action": "string", "information": "string", "formatted_duration": "string", "formatted_distance": "string", "duration": 0, "distance": 0, "latitude": 0, "longitude": 0, "details": [ { "travel_mode": "string", "action": "string", "information": "string", "formatted_duration": "string", "formatted_distance": "string", "duration": 0, "distance": 0, "latitude": 0, "longitude": 0 } ], "walking": {}, "depart_from": { "place": "string", "at": "string", "timezone": "string", "latitude": 0, "longitude": 0 }, "direction": "string", "vehicle": "string", "line_name": "string", "arrive_at": { "place": "string", "at": "string", "timezone": "string", "latitude": 0, "longitude": 0 }, "service_provider": "string", "stops": [ {} ] } ], "departure": "string", "arrival": "string", "formatted_price": "string", "price": 0, "airlines": [ "string" ], "flights_link": "string" } ]}Google Travel Explore Destination GET
The flight options to one destination on the dates Google's Explore map lists for it (or on dates given), as Google ranks them, answered as the document with `departure_date`, `return_date` and `flights`.
Google Maps Photos GET
The photos of one Google Maps place, 20 a page, answered as the document: `search_metadata`, `search_parameters`, `search_information` (`{}`), `photos` and `pagination.next_page_token` (absent on the last page; a page past the end has neither).