Getting information about a place

There are two ways to get additional information (address, description, rating, image, and more) about a particular place.

In the previous page, we used google_maps_search to search for a list of places with a query string and coordinates. In the response, each place result includes a nimble_place_link that, when accessed, returns additional data about that place.

For example, if the place link returned was:

https://api.webit.live/api/v1/realtime/serp?search_engine=google_maps_reviews&csrf_token=cjHpY_DuJqSr5NoP8P6wuAo&place_id=ChIJ_58pLKJZwokRvRwO5eftKC8

Then the link would be accessed with the below example:

Nimble APIs requires that a base64 encoded credential string be sent with every request to authenticate your account. For detailed examples, see Web API Authentication.

curl --location --request GET 'https://api.webit.live/api/v1/realtime/serp?search_engine=google_maps_reviews&csrf_token=cjHpY_DuJqSr5NoP8P6wuAo&place_id=ChIJ_58pLKJZwokRvRwO5eftKC8' \
--header 'Authorization: Basic <credential string>'

Using a place_id

If you already have a place_id from a previous Places API search or otherwise, you can directly request information about that place, as in the example below:

curl --location --request POST 'https://api.webit.live/api/v1/realtime/serp' \
--header 'Authorization: Basic <credential string>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "search_engine": "google_maps_place",
    "place_id": "desired-place-id"
}'

place_id and data_id are both identifiers used by Google to identify a particular location. Although both can be used to request reviews, their values are not interchangeable, and only one can be used at a time.

Structured Data Example

Nimble's Maps API uses AI to intelligently structure the rich information available through maps engines. For example, a request for the first place returned by the example on the previous page "Searching for Places" would return:

Request options

Parameter
Required
Type
Description

search_engine

Required

Enum: google_maps_search | google_maps_place | google_maps_reviews

The search engine from which to collect results.

place_id/data_id

Required

String

A string used by Google to identify a particular place. place_id and data_id cannot both be used in a single request.

domain

Optional

String

Search through a custom top-level domain of Google. eg: "co.uk"

country

Optional (default = all)

String

Country used to access the target URL, use ISO Alpha-2 Country Codes i.e. US, DE, GB

locale

Optional (default = en)

String

String | LCID standard locale used for the URL request. Alternatively, user can use auto for automatic locale based on country targeting.

parse

Optional (default = true)

Enum: true | false

Instructs Nimble whether to structure the results into a JSON format or return the raw HTML.

Response

200 - OK

Supported parsing fields

Below is a list of all the fields supported by Nimble's parsing engine. This list is always growing and subject to change. Additionally, while Nimble supports all of these fields, which fields are available depends on the external search engine as well, and thus different fields will be available at different times.

*marked fields vary according to the available data, and vary according to the creator of the Place.

Notice that in the above response, a nimble_reviews_link is included that allows for a separate Places API request to collect the reviews written by people about the targeted place. For more information on collecting reviews, see the Collecting reviews page.

500 Error

400 Input Error

Response Codes

Status
Description

200

OK.

400

The requested resource could not be reached.

401

Unauthorized/invalid credental string.

500

Internal service error.

501

An error was encountered by the proxy service.

Last updated