Get place and address suggestions from a partial Google Maps search query.

View all Google Maps Data API: Business Search, Reviews & Photos endpoints →

Returns the most relevant Google Maps search completions for a partial text query, intended for location-search typeahead. Send the required query string (for example "los ange") and optionally add country, lang and a lat/lng search center. The response is a JSON object with status (true on success), request_id, a data array of suggestions and the echoed request_params. In a live test call, the query "los ange" returned five suggestions, each with title, description, google_id, place_id, latitude, longitude, country and type; the type values seen were locality, establishment and geocode. The endpoint documentation also mentions street_address, administrative_area_level_1, route, transit_station and political types, but those were not seen in the test call and there is no type parameter, so filtering by type is done on the client. The google_id and place_id values use the same 0x...:0x... and ChIJ... formats that the business endpoints accept as business_id. The response example published with the endpoint is an empty object, so the fields above come from the live test call only.

API Features

Partial-query completions Turns a fragment such as "los ange" into ranked place, city and address suggestions with a single GET request.
Coordinates and IDs on every row Each suggestion carries latitude, longitude, google_id and place_id, so a pick can be mapped or handed to the business endpoints without a second lookup.
Suggestion type labels Every row has a type field (locality, establishment and geocode in the test call) plus a country code, which lets the client build city-only, venue-only or address pickers.
Country, language and center hints Optional country, lang, lat and lng parameters shape which completions come back, and the test call returned a short list of five suggestions.
Traceable response envelope status, request_id and the echoed request_params come back with the data array, which makes debounced keystroke calls easy to log and match to the input.

Live API Demo

GET /api/project/google-maps-extractor/autocomplete

Request cost is temporarily unavailable. No price is assumed.

View pricing

API Response (JSON)

{}
curl -X GET 'https://api.opendata-api.com/api/project/google-maps-extractor/autocomplete?key=<API_KEY>&query=los+ange'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

Frequently asked questions

What does the autocomplete endpoint return?

A JSON object with status, request_id, a data array of suggestions and the echoed request_params. In a live test call, the query "los ange" returned five rows, each with title, description, google_id, place_id, latitude, longitude, country and type.

Which parameters are required?

Only query is required; the sample form uses "los ange". country, lang, lat and lng are optional hints, and their accepted values are not enumerated in the endpoint documentation.

Can I filter suggestions by type such as locality or street_address?

There is no type parameter, so the filter is applied on your side. Every row includes a type field; the test call showed locality, establishment and geocode, and the documentation also mentions street_address and administrative_area_level_1.

How do I use a suggestion with the business endpoints?

Pass the row's google_id or place_id as business_id on the business details or photos endpoints. Their formats match what those endpoints document, but the test call did not chain the two requests, so check your own flow. For city rows, use latitude and longitude instead.

Are results limited to one country?

Not by default. The test call mixed Los Angeles in the US with Los Angeles in Chile, so read the country field on each row, and send the country parameter if you want to steer results toward one market.

How many suggestions come back per call?

The test call returned five. The endpoint has no limit parameter, so do not assume a fixed count and size your dropdown for a short list.

Related operations

Guides

View Subscription Plans →