Collecting reviews

There are two ways to collect reviews written for a particular place:

Previously, we discussed how to search for places or directly request a place with a place_id, both of which produce a relevant nimble_reviews_link that can be used to request reviews for the relevant place. For example, for the following reviews link:

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

A request that executes the above reviews link would look like:

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 or data_id

If you have a place_id or data_id from a previous search, place request, or independently from another source, you can use it to directly gather reviews left for that place. For example:

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_reviews",
    "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 reviews returned by the example on the previous page "Getting Information about a Place" 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.

sort

Optional

Enum:

relevant |

newest |

lowest_rating | highest_rating

Defines the order in which Google Maps reviews are returned.

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.

When requesting reviews, the returned HTML will always be a Google Protobuff output. This is a result of Google Maps' output. We recommend always using the parsed data for maximum simplicity.

The above example is for illustrative purposes only. Review data will vary in accordance with the reviews requested.

Traversing paginated reviews

Some providers automatically paginate reviews so that only a certain number are displayed at once. If surplus reviews exist, an attribute named next_page will be present in Nimble's response which can be used to request the next batch of reviews.

In the above response, the next_page attribute contains the full address needed to request the next page's batch of reviews:

The below example demonstrates how to use the provided next_page URL in a request:

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