Search Google Maps businesses from a free-text query such as a trade and a city, with the resolved location returned.
View all Google Maps Data API: Business Search, Reviews & Photos endpoints →Resolves a free-text query to a map location and then lists the businesses found around it, in a single request. Send the required query (for example "attorney in Philadelphia, PA, USA") and optionally country, language, limit (default 20), offset (default 0) and zoom (3 zoomed out to 21 zoomed in). The response is a JSON object with status (true on success), request_id, a data array of places, a location object and the echoed request_params. In a live test call with limit=5, data held 5 places, each with 37 fields: google_id, google_mid, place_id, cid, name, status (OPEN in all five), address, full_address, a detailed_address object (district, street, city, zip_code, state, country), main_category, category_id, categories, latitude, longitude, time_zone, phone, full_phone, website_url, website_domain, working_hours by weekday, rating, reviews_count, featured_photo, about attribute groups, owner fields and hotel, price and reservation fields that were null for the sampled law firms. The location object had id, name, altitude, latitude, longitude and zoom, with id and name null and zoom 7. The documentation says this method combines the query locate and search nearby operations and recommends reusing the returned location with search nearby when the same area is queried repeatedly. 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/locate-and-search API Response (JSON)
{} curl -X GET 'https://api.opendata-api.com/api/project/google-maps-extractor/locate-and-search?key=<API_KEY>&limit=20&offset=0&query=attorney+in+Philadelphia%2C+PA%2C+USA'
Query Result
Use Cases
- Prototyping a lead search such as plumbers in Denver in one request, then keeping the returned location and switching to nearby search for the rest of the batch
- Sampling 5-place slices with limit and offset across 20 candidate cities for a market-entry comparison
- Quick demos or no-code workflows where the user only types a query and a country and no coordinates are available
- Comparing how the same keyword resolves across languages or countries by changing only language and country
- Seeding an outreach sheet with the first few businesses per city before deciding which cities deserve a deeper sweep
- Screening a trade in a city by rating and reviews_count to shortlist well-reviewed businesses for a partner program
Frequently asked questions
What does locate and search return?
A JSON object with status, request_id, a data array of places, a location object and the echoed request_params. In a live test call with limit=5, data held five places with 37 fields each, and location held latitude, longitude, zoom, altitude, id and name.
Which parameters are required?
Only query is required; the sample form uses "attorney in Philadelphia, PA, USA" and the documentation suggests a shape like "restaurant in New York City". country, language, limit, offset and zoom are optional.
How is this different from query locate and search nearby?
It performs both steps in one request. The documentation recommends that if you repeat the same area many times, you call it once, keep the returned location, and then use search nearby with that location, which is faster because the location is resolved only once.
How do limit and offset work?
limit is the maximum number of results (default 20) and offset skips results (default 0). The test call used limit=5 and returned five places. Offset paging and the maximum limit were not tested, so check them on your own query.
What range does zoom accept?
The documentation gives 3 (zoomed out) to 21 (zoomed in) as a number. The test call did not send zoom, and its location object showed zoom 7, but how that relates to the default is not documented.
Why are some fields null in the place rows?
Category-specific fields are empty when they do not apply. In the sampled law firms, hotel_stars, hotel_about, price_range, reservation_url and order_online_url were null, while phone, website_url, rating and working_hours were filled. Null-check every field.
Is the language parameter called lang here?
No. This endpoint names it language, unlike the business photos and reviews endpoints, which use lang. Both are optional and their accepted values are not enumerated in the documentation, and the test call sent neither.