All APIs

Google Travel and Maps

Google Maps Directions API

Retrieve Google Maps Directions data.

Make a request

Use your existing PrismCrawl API key and credit balance. A completed request consumes one credit, including recognized empty or unavailable results and source changes found during a valid continuation. Validation and operational errors remain uncharged. Each completed continuation request is billed separately.

POST /v1/google/maps/directions
curl 'https://api.prismcrawl.com/v1/google/maps/directions' \
  --request POST \
  --header 'content-type: application/json' \
  --header 'x-api-key: <PRISMCRAWL_API_KEY>' \
  --data '{
  "destination": "Dallas, TX",
  "origin": "Austin, TX",
  "travel_mode": "driving"
}'

Supported parameters

ParameterUsage
originStarting address or place for directions.
destinationDestination address or place for directions.
travel_modeTransport mode for the requested directions.

driving, walking, bicycling, transit, two-wheeler, best, flight

countryTwo-letter country or storefront code, such as us or gb.
languageProvider-supported language code, such as en.
limitMaximum number of items to return. The provider may return fewer.
deviceDevice presentation for the source request.

desktop, mobile, tablet

start_data_idGoogle Maps hexadecimal data ID for this endpoint; use one of address, data ID, or coordinates.
start_coordsRoute endpoint as latitude,longitude.
end_data_idGoogle Maps hexadecimal data ID for this endpoint; use one of address, data ID, or coordinates.
end_coordsRoute endpoint as latitude,longitude.
distance_unitDisplay distances in kilometers (0) or miles (1), calculated from the native route distance in meters.
avoidComma-separated road types to avoid.
preferComma-separated preferred transit modes; requires transit travel mode.
routeTransit routing preference: fewer transfers (2), less walking (3), or wheelchair accessible (4).
timedepart_at:timestamp, arrive_by:timestamp, or last_available (transit only). Unix timestamps use seconds.
htmlReturn the encoded original response rather than parsed JSON.
zero_traceDo not archive source or parsed response artifacts.

Structured results

Read items from data.content.results. The response also includes the search metadata, pagination state, and any extracted SERP features. Optional fields appear when supplied by the provider.

addresscategorycoordinatesdescriptiondistancedistance_metersdurationduration_secondsflightidlatitudelongitudenamephonepositionrankratingrating_maxrating_sourcereview_countsnippetstepssummarythumbnailtitletravel_modetypeurlwebsite

SDKs and guides

The official SDKs cover this endpoint with typed parameters, automatic retries, and pagination helpers.