JustSERPDocs
Google

Google Maps search

The places a Google Maps search lists, about 20, each completed from Google's own record of the place: ids, coordinates, categories, phone, website, the week's hours, attributes.

GET
/v1/google/maps

The places a Google Maps search lists, about 20, each completed from Google's own record of the place: ids, coordinates, categories, phone, website, the week's hours, attributes. A search that matches exactly one place is not a failure: Maps shows that place's page instead of a list, and the answer is that place (in the document form, place_result, with search_information.local_results_state saying so). Google decides per request, so the same search can come back as a short list another time.

$1 request $2 q, and ll or none of latitude, longitude, zoom, is the document-form Google Maps call: ll is @latitude,longitude,zoom or @latitude,longitude,meters, page is 1 only (Maps lists 20 places to a visitor who is not signed in; 2 and later is a 400), and the answer is the document (search_metadata, search_parameters, search_information (local_results_state Results for exact spelling, query_displayed), ads, local_results) with each place as in the schema below, or the one-place document above. $1 request $2 latitude, longitude or zoom is the call above.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
q?string

What to search for.

Length1 <= length
latitude?number

Where the search is centred. Without coordinates, Maps centres the search wherever the request is made from, so send them for local results.

Range-90 <= value <= 90
longitude?number
Range-180 <= value <= 180
zoom?integer
Range3 <= value <= 21
Default14
hl?string

Leave at en; the answer is read from the English page.

Default"en"
gl?string

Country.

ll?string

Where the search applies: @latitude,longitude,zoom (z from 3 to 21) or @latitude,longitude,meters (m from 62 to 18636559). The last part is optional.

page?integer

Only 1: Maps gives a visitor 20 places and no more; 2 and later is a 400.

Default1

Response Body

The listings, or the one place the search matched. With ll, the document.

application/json
  1. response

The first three keys of every parsed 200 (the answer is the document itself, no success/data envelope): what the search was (search_metadata), what it asked (search_parameters), the parser's own search_information ({} when it has none). The engine's blocks follow, at the same level. An engine whose answer is a list puts it under results.

search_metadata*
search_parameters*

The request's own fields as sent, engine first, without cancel_token.

search_information*

The parser's own, e.g. yelp_search's; otherwise {}.

local_results?array<>

The organic listings in order, 20 at most.

ads?array<>

Sponsored listings, same fields, numbered on their own.

total_results?integer

Length of local_results.

Example Request
curl -X GET 'https://api.justserp.com/v1/google/maps?q=pizza&latitude=40.7455&longitude=-74.0083&zoom=14&gl=us'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {},  "local_results": [    {      "position": 0,      "title": "string",      "link": "string",      "place_id": "string",      "data_id": "string",      "data_cid": "string",      "latitude": 0,      "longitude": 0,      "rating": 0,      "reviews": 0,      "category": "string",      "address": "string",      "price": "string",      "extracted_price": 0,      "description": "string",      "hours": "string",      "phone": "string",      "thumbnail": "string",      "types": [        "string"      ],      "type_id": "string",      "provider_id": "string",      "phone_international": "string",      "website": "string",      "full_address": "string",      "neighborhood": "string",      "country_code": "string",      "timezone": "string",      "service_area": true,      "open_state": "string",      "operating_hours": {        "property1": "string",        "property2": "string"      },      "price_distribution": [        {          "price": "string",          "count": 0,          "share": 0        }      ],      "extensions": [        {          "property1": [            "string"          ],          "property2": [            "string"          ]        }      ],      "unsupported_extensions": [        {          "property1": [            "string"          ],          "property2": [            "string"          ]        }      ],      "service_options": {        "property1": true,        "property2": true      },      "reviews_link": "string",      "order_online": "string",      "reserve_a_table": "string",      "booking_links": [        {          "source": "string",          "link": "string"        }      ]    }  ],  "ads": [    {      "position": 0,      "title": "string",      "link": "string",      "place_id": "string",      "data_id": "string",      "data_cid": "string",      "latitude": 0,      "longitude": 0,      "rating": 0,      "reviews": 0,      "category": "string",      "address": "string",      "price": "string",      "extracted_price": 0,      "description": "string",      "hours": "string",      "phone": "string",      "thumbnail": "string",      "types": [        "string"      ],      "type_id": "string",      "provider_id": "string",      "phone_international": "string",      "website": "string",      "full_address": "string",      "neighborhood": "string",      "country_code": "string",      "timezone": "string",      "service_area": true,      "open_state": "string",      "operating_hours": {        "property1": "string",        "property2": "string"      },      "price_distribution": [        {          "price": "string",          "count": 0,          "share": 0        }      ],      "extensions": [        {          "property1": [            "string"          ],          "property2": [            "string"          ]        }      ],      "unsupported_extensions": [        {          "property1": [            "string"          ],          "property2": [            "string"          ]        }      ],      "service_options": {        "property1": true,        "property2": true      },      "reviews_link": "string",      "order_online": "string",      "reserve_a_table": "string",      "booking_links": [        {          "source": "string",          "link": "string"        }      ]    }  ],  "total_results": 0}