/google-maps-autocomplete

Get automatic search suggestions for your queries on Google Maps.

↗ Open in API Explorer
GET

Google Maps Autocomplete

Get automatic search suggestions for your queries on Google Maps.

Request

Endpoint: GET https://api.outscraper.cloud/google-maps-autocomplete

Parameters

NameInTypeRequiredDescriptionExampleConstraints
query query array<string> Yes The parameter defines the query to search for suggestions (e.g., central, restaurant). It supports batching by sending arrays with up to 1000 queries (e.g., query=text1&query=text2&query=text3). It allows multiple queries to be sent in one request and to save on network latency time. - -
coordinates query array<string> No Coordinates from Google Maps URL (e.g., '@23.4933124,53.9623381,11.42z'). Optional parameter to bias results towards a specific location. - default @23.4933124,53.9623381,11.42z
language query string enum No The parameter specifies the language to use for website. - default en, allowed en, de, es, es-419, fr, hr, it, nl, …
region query string enum No The parameter specifies the country to use for website. It's recommended to use it for a better search experience. - allowed AF, AL, DZ, AS, AD, AO, AI, AG, …

Responses

200

The response contains the status of the request and data. Data is an array where each element represents a response for a single query from the request.

202

application/json

The response contains a request ID that can be used to fetch results by using Request Results endpoint. Each response is available for 4 hours after a request has been completed.

{
  "id": "your-request-id",
  "status": "Pending",
  "results_location": "https://api.outscraper.cloud/requests/your-request-id"
}

401

application/json

Wrong or missing API Key (token).

{
  "error": true,
  "errorMessage": "401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."
}

402

application/json

Past due invoices or a payment method not connected.

{
  "error": true,
  "errorMessage": "Please close past due invoices or verify your card information is correct."
}

422

application/json

Wrong query url parameters.

{
  "error": true,
  "errorMessage": "422 Unprocessable Entity: The request was well-formed but was unable to be followed due to semantic errors."
}

Code Samples

cURL

curl -X GET "https://api.outscraper.cloud/google-maps-autocomplete?query=bars&async=false" -H  "X-API-KEY: YOUR-API-KEY"

cURL (async)

curl -X GET "https://api.outscraper.cloud/google-maps-autocomplete?query=bars" -H  "X-API-KEY: YOUR-API-KEY"

Related Endpoints

Returns Google Maps photos from places when using search queries (e.g., restaurants, Manhattan, NY, USA) or from a single place when using IDs or names (e.g., NoMad Restaurant, NY…

Returns Google Maps reviews from places when using search queries (e.g., restaurants, Manhattan, NY, USA) or from a single place when using Google IDs or names (e.g., NoMad Restau…

Returns places from Google Maps based on a given search query (or many queries). The results from searches are the same as you would see by visiting a regular Google Maps site. Ho…