List Google Maps businesses around a latitude and longitude for a search query such as a trade, with address, contact and rating fields.

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

Searches for places near a given search center. Send the required query (for example "attorney") and optionally lat and lng for the center (the sample form uses 39.9525839 and -75.1652215), plus country and language codes. The response is a JSON object with status (true on success), request_id, a data array of places and the echoed request_params. In a live test call with query=attorney and the sample coordinates, data held 20 places, each with 37 fields: google_id, google_mid, place_id, cid, name, status (OPEN in all 20), 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, reservation_url, reservation_domain, working_hours by weekday, rating, reviews_count, featured_photo, about attribute groups, can_claim and owner_name, owner_id and owner_profile_url. hotel_about, hotel_descriptions, hotel_stars, order_online_url, about_descriptions, price_range and price_breakdown were null for all 20 sampled law firms, and reservation_url was set for 8 of the 20. The echoed request_params held lat, lng and query as strings. There is no limit, offset, zoom or radius parameter on this endpoint, so the number of rows is not caller-controlled; the test call returned 20. The documentation says status is false on failure, but no failed call was captured. The response example published with the endpoint is an empty object, so the fields above come from the live test call only.

API Features

Business search around a center A query plus lat and lng returns the places found around that point in one GET request, with no map session or browser automation on your side.
37-field place record Each row in the test call carried 37 fields covering identifiers, name, address, categories, hours, contact, rating and ownership, so a lead list needs no second lookup for basics.
Structured address object detailed_address splits every place into district, street, city, zip_code, state and country, alongside address, full_address and latitude and longitude for mapping.
Weekday opening hours working_hours is keyed Monday through Sunday, each day with a working_hours list and a usual_working_hours flag, ready for open-now logic in a store finder.
Rating and review volume rating and reviews_count come with each place (ratings from 4 to 5 and review counts from 36 to 7854 in the test call), which supports ranking or filtering by reputation.
Four identifiers per place google_id, google_mid, place_id and cid are returned for every row, so a chosen place can be stored and looked up again, including through the business endpoints.
Ownership and claim flags owner_name, owner_id, owner_profile_url and can_claim describe who manages the listing and whether it is claimable (false for all 20 sampled firms).

Live API Demo

GET /api/project/google-maps-extractor/search-nearby

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/search-nearby?key=<API_KEY>&lat=39.9525839&lng=-75.1652215&query=attorney'
📢
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 search nearby endpoint return?

A JSON object with status, request_id, a data array of places and the echoed request_params. In a live test call with query "attorney" and the sample Philadelphia coordinates, data held 20 places with 37 fields each, including google_id, place_id, name, address, rating, reviews_count, phone and website_url.

Which parameters are required?

Only query is required. lat and lng are marked optional and the sample form pre-fills 39.9525839 and -75.1652215, but what happens when they are left out is not documented or tested, so send both. country and language are optional codes whose accepted values are not enumerated.

How many places come back, and how do I get more?

The test call returned 20 places. There is no limit, offset or next_token parameter, so the list size is not caller-controlled. To cover more ground, repeat the call from different lat and lng centers or with different queries; paging for this endpoint is not documented.

Can I set a search radius?

No radius or zoom parameter is documented for this endpoint, and the documentation does not state how far from the center it searches. If you need a zoom input, query locate and locate and search accept one.

How do I get coordinates for a city?

Call query locate with a text such as "Philadelphia, PA, USA" and pass the returned latitude and longitude as lat and lng. Alternatively, locate and search resolves the text and lists businesses in a single request. The chain was not run end to end in the test.

Why are some fields null, such as hotel_stars or price_range?

hotel_about, hotel_descriptions, hotel_stars, order_online_url, about_descriptions, price_range and price_breakdown were null for all 20 sampled law firms, and reservation_url was empty for 12 of them. They probably fill in for other business types such as hotels or restaurants, but that was not tested.

Can I use the returned IDs with the business endpoints?

Each place has google_id (0x...:0x... format), place_id (ChIJ... format), google_mid and cid. The google_id and place_id formats match what the business endpoints document as business_id, but the test did not chain the calls, so verify the hand-off on your own data.

Are the echoed lat and lng numbers?

In the test call request_params held lat, lng and query as strings, for example "39.9525839", even though lat and lng are declared as numbers. Parse them as needed when you log or compare the echoed values.

Related operations

Guides

View Subscription Plans →