Google Maps
Perform Search
Overview
| Method | Endpoint | Version | Description |
|---|---|---|---|
POST |
/api/v1/open/search |
v1 | Google Search API endpoint for retrieving search results |
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type |
string |
Yes | Must be set to application/json |
Accept |
string |
No | Response format (defaults to application/json) |
Authentication
API Key Authentication
- Pass the API key as a request parameter:
api_key=your_api_key - Example:
"api_key": "your_api_key_here"
HTTP Status Codes
| Code | Status | Description | Retry |
|---|---|---|---|
| 200 | OK | Request successful | No |
Response Codes
| Code | Description | Retry |
|---|---|---|
| 200 | Request successful | No |
| 400100 | Unsupported search engine | No |
| 400200 | The search service is temporarily unavailable. Please try again later | No |
| 400300 | ForUserQuery contains prohibited content | No |
| 400400 | No results found, please adjust keywords and try again | No |
| 400500 | Authorization failed, please check your API credentials | No |
| 400600 | The request frequency is too high, please try again later | No |
| 400700 | You have reached the daily search limit | No |
| 400710 | Insufficient Balance | No |
Request Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
api_key |
string |
Yes | API key for authentication | |
engine |
string |
Yes | Search engine type, currently engine value is google_maps |
|
q |
string |
Yes | Search query, supports regular Google search syntax (like inurl:, site:, intitle:) and advanced search parameters | |
google_domain |
string |
No | Google domain, defaults to google.com | google.com |
hl |
string |
No | Search language code (e.g., en-English, es-Spanish, fr-French). Head to the Google languages page for a full list of supported Google languages. | |
ll |
string |
No | Parameter defines the GPS coordinates of the location where you want the search to originate from. Its value must match the following format: @ + latitude + , + longitude + , + zoom/map_height This will form a string that looks like this: e.g. @40.7455096,-74.0083012,14z or @43.8521864,11.2168835,10410m. The zoom attribute ranges from 3z, map completely zoomed out - to 21z, map completely zoomed in. Alternatively, you can specify map_height in meters (e.g., 10410m). The parameter should only be used when type is set to search. Parameter is required when using pagination. Results are not guaranteed to be within the requested geographic location. | |
data |
string |
No | Parameter can be used to filter the search results. You can visit Google Maps website, set filters you want and simply copy the data value from their URL to SerpApi URL. One of the uses of the parameter is to search for a specific place; therefore, it is required if the type is set to place. Alternatively, place_id or data_cid can be used. To use the data parameter to search for a specific place, it needs to be constructed in the following sequence: !4m5!3m4!1s + data_id + !8m2!3d + latitude + !4d + longitude This will form a string that looks like this: !4m5!3m4!1s0x89c259b7abdd4769:0xc385876db174521a!8m2!3d40.750231!4d-74.004019. You can find the data_id using our Google Maps API. | |
start |
number |
No | Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.). | |
place_id |
string |
No | Parameter defines the unique reference to a place in Google Maps. Place IDs are available for most locations, including businesses, landmarks, parks, and intersections. You can find the place_id using our Google Maps API. You can read more about Place IDs here. place_id can be used without any other optional parameter. place_id and data_cid can't be used together. Parameter should not be confused with place_id in Google Search API and Google Local API which are the same as data_cid in Google Maps API. | |
safe |
string |
No | Parameter defines the level of filtering for adult content. It can be set to active or off, by default Google will blur explicit content. off or active | |
data_cid |
string |
No | Parameter defines the Google CID (customer identifier) of a place. This parameter can be found in Google Maps API local results, as well as in Google Search API and Google Local API local results under the name of place_id. You can also acquire it using Google's CID converter. data_cid can be used without any other optional parameter. data_cid and place_id can't be used together. | |
type |
string |
No | Parameter defines the type of search you want to make. It can be set to: search - returns a list of results for the set q parameter, place - returns results for a specific place when data parameter is set Parameter is not required when using place_id or data_cid. | |
html |
string |
No | Whether to return HTML format, 1-yes, 0-no | 0 |
Response Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
Complete Response Parameters Overview
search_metadata
object Contains metadata about the search execution
| Parameter | Type | Description | Applicable Terminal |
|---|---|---|---|
id |
string |
Unique identifier for the search request | |
json_endpoint |
string |
Provide an interface endpoint for searching related JSON data, through which JSON-formatted search data can be obtained | |
created_at |
string |
The timestamp when the search request was created, recording the time when the search was initiated | |
processed_at |
string |
The timestamp when the search results were processed and became available for return, recording the time point from processing to completion of the search | |
google_url |
string |
The Google search URL, which contains the search keyword "coffee" along with language parameters (hl=en for English), regional parameters (gl=us for the United States), and other search parameters, used to redirect to the corresponding Google search page | |
status |
string |
Status of the search execution (e.g., Success) | |
raw_html_file |
string |
Identifier for the original HTML file | |
total_time_taken |
number |
The total time spent on the entire search process (including request sending, result parsing, and other stages) |
search_information
object Contains information about the search results
| Parameter | Type | Description | Applicable Terminal |
|---|---|---|---|
organic_results_state |
string |
State of organic results | |
time_taken_displayed |
number |
TDisplay time (i.e., the time spent on displaying the search results) | |
query_displayed |
string |
Displayed query term, i.e., the actual keyword searched by the user in Google Maps |
search_parameters
object Contains the parameters used for the search
| Parameter | Type | Description | Applicable Terminal |
|---|---|---|---|
q |
string |
Keywords used for this query | |
engine |
string |
Search engine used for this query (e.g., google_web) | |
html |
string |
When HTML=0, returns JSON; when HTML=1, returns HTML; when HTML=2, returns both JSON and HTML | |
google_domain |
string |
Specifies the corresponding Google domain (e.g., google.com, etc., used to distinguish Google services in different regions/locales) |
local_results
object[] Google Maps returns a collection of local places/services based on the user’s search query (e.g., hotel, restaurant, attraction).
| Parameter | Type | Description | Applicable Terminal |
|---|---|---|---|
position |
number |
Ranking position in local search results | |
rating |
string |
Rating of the place | |
price |
string |
Price range description | |
place_id |
string |
Unique identifier ID of a place in Google Maps | |
gps_coordinates |
object |
Latitude and longitude coordinate information of the place | |
gps_coordinates.latitude |
number |
Latitude value | |
gps_coordinates.longitude |
number |
Longitude value | |
title |
string |
Name of the place | |
type |
string |
Type of place | |
address |
string |
Address of the place | |
phone |
string |
Contact phone number of the place | |
hours |
string |
Brief description of the operating status of the place | |
data_id |
string |
Internal data ID related to the place | |
data_cids |
string |
Another internal identifier related to the place | |
reviews_link |
string |
Link to the place’s review page | |
thumbnail |
string |
Thumbnail image link of the place | |
reviews |
number |
Number of reviews of the place | |
types |
string[] |
Array form of place types | |
type_id |
string |
Identifier of the place type | |
type_ids |
string[] |
Array form of place type identifiers | |
open_state |
string |
Detailed description of the operating status of the place | |
operating_hours |
object |
Specific business hours of the place | |
operating_hours.Friday |
string |
Friday business hours | |
operating_hours.Monday |
string |
Monday business hours | |
operating_hours.Saturday |
string |
Saturday business hours | |
operating_hours.Sunday |
string |
Sunday business hours | |
operating_hours.Thursday |
string |
Thursday business hours | |
operating_hours.Tuesday |
string |
Tuesday business hours | |
operating_hours.Wednesday |
string |
Wednesday business hours | |
website |
string |
Official website link of the place | |
extensions |
object[] |
Collection of extended information of the place | |
extensions[].service_options |
string[] |
Service options list | |
extensions[].highlights |
string[] |
List of place highlights | |
extensions[].offerings |
string[] |
List of provided products/services | |
extensions[].dining_options |
string[] |
List of dining options | |
extensions[].atmosphere |
string[] |
List of atmosphere descriptions | |
extensions[].crowd |
string[] |
List of customer group descriptions | |
extensions[].payments |
string[] |
List of payment methods | |
extensions[].children |
string[] |
List of child-friendly related descriptions | |
extensions[].parking |
string[] |
List of parking-related options | |
unsupported_extensions |
object[] |
Collection of unsupported extended information | |
unsupported_extensions[].service_options |
string[] |
List of unsupported service options | |
unsupported_extensions[].dining_options |
string[] |
List of unsupported dining options | |
unsupported_extensions[].planning |
string[] |
List of planning-related descriptions | |
service_options |
object |
Key-value description of service options | |
service_options.Delivery |
boolean |
Whether delivery service is supported | |
service_options.Drive-through |
boolean |
Whether drive-through is supported | |
order_online |
string |
Link for online ordering | |
user_review |
string |
User review content |