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
Live API Demo
🔒 Sign in to try it live
Log in to call this API with your own API key. New accounts get 100 free credits — no card required.
Log in / Sign upNo active API key found. Create one in your Dashboard, then reload this page. Dashboard →
/api/project/google-maps-extractor/autocomplete API Response (JSON)
{} curl -X GET 'https://api.opendata-api.com/api/project/google-maps-extractor/autocomplete?key=<API_KEY>&query=los+ange'
Query Result
Use Cases
- Typeahead city or venue picker in a booking, delivery or lead-capture form, centered on the visitor's lat/lng
- Address-only or city-only pickers built by keeping just the locality, street_address or administrative_area_level_1 rows on the client
- Canonicalizing free-text place names from a spreadsheet into suggestion strings before resolving them to coordinates or business IDs
- Search-box spelling help for a local directory, showing the top completions as the user types with debounced requests
- Country-restricted suggestions for a regional marketplace by sending country and lang with each request
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.