Google

Google Maps Directions

Retrieve Google Maps Directions data.

post/v1/google/maps/directions

Request

  • Base URL: https://api.prismcrawl.com
  • URL: https://api.prismcrawl.com/v1/google/maps/directions
  • Auth: API key in header x-api-key

Request body

originstring

Starting address or place for directions.

destinationstring

Destination address or place for directions.

travel_mode'driving' | 'walking' | 'bicycling' | 'transit' | 'two-wheeler' | 'best' | 'flight'

Transport mode for the requested directions.

countrystring

Two-letter country or storefront code, such as us or gb.

languagestring

Provider-supported language code, such as en.

limitinteger

Maximum number of items to return. The provider may return fewer.

device'desktop' | 'mobile' | 'tablet'

Device presentation for the source request.

start_data_idstring

Google Maps hexadecimal data ID for this endpoint; use one of address, data ID, or coordinates.

start_coordsstring

Route endpoint as latitude,longitude.

end_data_idstring

Google Maps hexadecimal data ID for this endpoint; use one of address, data ID, or coordinates.

end_coordsstring

Route endpoint as latitude,longitude.

distance_unitinteger

Display distances in kilometers (0) or miles (1), calculated from the native route distance in meters.

avoidstring

Comma-separated road types to avoid.

preferstring

Comma-separated preferred transit modes; requires transit travel mode.

routeinteger

Transit routing preference: fewer transfers (2), less walking (3), or wheelchair accessible (4).

timestring

depart_at:timestamp, arrive_by:timestamp, or last_available (transit only). Unix timestamps use seconds.

htmlboolean

Return the encoded original response rather than parsed JSON.

zero_traceboolean

Do not archive source or parsed response artifacts.

output'json' | 'html' | 'md' | 'null' nullable

Response content format. md returns Markdown in data.content with data.format=md; the JSON success/request envelope remains. Accept: text/markdown also selects Markdown unless output or html=true is explicit. html is an alias for html=true and retains the existing Brotli/Base64 source format.

json_restrictorstring nullable

Select fields within data.content for JSON or Markdown. Supports comma-separated paths, non-negative array indices, half-open slices [0:3] (either bound may be omitted), [] and .{nested,subqueries}. Up to128 selections and16 levels. Missing fields are omitted; selected declared fields retain their zero defaults. The request envelope and credit headers remain. Include next_page_token when pagination is needed. Incompatible with HTML output. This changes response presentation only; tracing-enabled history retains the complete JSON result.

no_cacheboolean nullable

Accepted for compatibility. Searches are always fetched without a result cache for either value; normal successful-request billing applies.

Example request

{
  "json_restrictor": "results[].{title,url},has_next_page,next_page_token"
}

Response

Request completed. One credit is charged, including recognized empty or unavailable source results and source inventory changes discovered after a valid continuation is fetched. These completed responses may preserve verified partial results; operational failures remain errors.

successtrue required
request_idstring uuid required

Changes

No recorded changes to this operation across all 1 revision of this API.