The Google Maps Search API allows users to search for locations using keyword, coordinates, and various filters. The API returns relevant location details and map data.
Get Your API Key
Sign in at hasdata.com, go to your account settings, and copy your API key.
All requests must include your key in the x-api-key header.
Request Cost and API Credits
Each request to the Google Maps Search API consumes API Credits from your account balance.
- Cost per request: 5 API Credits
- Credits are deducted only for successful requests.
- Your total available credits depend on your active plan.
You can use your credits across all HasData APIs. The same credit balance is shared platform-wide.
Unused credits do not roll over. Any remaining credits expire at the end of the current billing period.
To monitor your credit usage and remaining balance, sign in to your account dashboard at app.hasdata.com.
Make Your First Request
curl --request GET \
--url 'https://api.hasdata.com/scrape/google-maps/search?q=Pizza&ll=%4040.7455096%2C-74.0083012%2C14z' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>'
API Parameters
| Parameter | Default Value | Required | Description |
|---|
q | Pizza | Yes | Search query term or phrase. |
domain | - | No | Google domain to use. Default is google.com. |
gl | - | No | The two-letter country code for the country you want to limit the search to. |
hl | - | No | The two-letter language code for the language you want to use for the search. |
start | - | No | Specifies the result offset for pagination purposes. The offset dictates the number of rows to skip from the beginning of the results. This is useful for accessing subsequent pages of search results. For example, an offset of 0 (the default value) returns the first page of results, 20 returns the second page, 40 returns the third page, and so on. This parameter is especially relevant when used in conjunction with the ‘ll’ parameter for location-based searches.
|
ll | @40.7455096,-74.0083012,14z | No | GPS coordinates of the location where the search query is to be performed. This parameter is required if the ‘start’ parameter is present. The format for the ll parameter is @ followed by latitude, longitude, and zoom level, separated by commas. The latitude and longitude should be in decimal degrees, and the zoom level is an integer. Example: @40.7455096,-74.0083012,14z.
|