/google-maps-suggestions

Get automatic search suggestions for your queries on Google Maps.

↗ Open in API Explorer
GET

Place Autocomplete

Get automatic search suggestions for your queries on Google Maps.

Request

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

Parameters

NameInTypeRequiredDescriptionExampleConstraints
origin query array<string> Yes The parameter defines the query to search for suggestions (e.g., 5th Av, Central Pa). 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> Yes The latitude and longitude coordinates specifying the location for search (e.g., 37.427074,-122.1439166, 40.7449819,-74.0271321). - default 40.7449819,-74.0271321
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

application/json

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.

{
  "id": "your-request-id",
  "status": "Success",
  "data": [
    {
      "query": "bars",
      "suggestions": [
        "bars",
        "Barstool Sports NY Headquarters, 7th Avenue, New York, NY",
        "Barstow, CA",
        "Barstool Sansom Street, Sansom Street, Philadelphia, PA",
        "Barstool Sports HQ, 7th Avenue, New York, NY"
      ]
    }
  ]
}

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-suggestions?query=bars&coordinates=40.7449819,-74.0271321&async=false" -H  "X-API-KEY: YOUR-API-KEY"

cURL (async)

curl -X GET "https://api.outscraper.cloud/google-maps-suggestions?query=bars&coordinates=40.7449819,-74.0271321" -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…