A documentação da API está disponível em inglês.

Google Maps Reviews

Get reviews for a Google Maps place.

GET/api/v1/google/reviews

Costs 1 credit per request; failed requests are refunded. Authentication, the search_metadata envelope and error codes are the same as for every endpoint (see the API reference). Try it in the playground.

Parameters

Place identifier

ParameterTypeDescription
data_idconditionalstringHexadecimal Google Maps feature identifier.Format: 0x123:0x456Exactly one of data_id or place_id is required.
place_idconditionalstringGoogle place identifier for the business whose reviews should be returned.Exactly one of place_id or data_id is required.

Sorting and localization

ParameterTypeDescription
hlstringLanguage used for returned review labels and place context.
glstringLowercase two-letter country code used for regional localization.
sort_by"qualityScore" | "newestFirst" | "ratingHigh" | "ratingLow"Controls the order of returned reviews.

Review filters

ParameterTypeDescription
topic_idstringReturns reviews associated with a topic ID from the topics response group.Cannot be combined with query.
querystringReturns reviews matching a free-text query.Cannot be combined with topic_id.
numstringRequested number of unique reviews to return.Initial unfiltered requests accept 1 through 100; the default remains eight.Requests return one response with up to the requested number of available reviews.Filtered and continuation requests accept 1 through 20.
source_metadatastringIncludes additional review-provider icon and scale metadata when available.

Pagination

ParameterTypeDescription
next_page_tokenstringOpaque continuation token from pagination.next_page_token.Pass the token back unchanged.Continuation requests default to ten reviews unless num is provided.

Response

A JSON object with search_metadata (request id, credits used and remaining) and the result groups the page returns. Groups and fields depend on the content of each page, so treat every field as optional.

Examples

cURL
curl "https://serpfast.com/api/v1/google/reviews?data_id=0x88e5b787f92eb419%3A0x837211a455038baa&num=2&sort_by=newestFirst" \
  -H "Authorization: Bearer $SERPFAST_KEY"
Node.js 18+
const params = new URLSearchParams({
  "data_id": "0x88e5b787f92eb419:0x837211a455038baa",
  "num": 2,
  "sort_by": "newestFirst"
});
const res = await fetch(`https://serpfast.com/api/v1/google/reviews?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);
Python
import os, requests

params = {
  "data_id": "0x88e5b787f92eb419:0x837211a455038baa",
  "num": 2,
  "sort_by": "newestFirst"
}
res = requests.get(
    "https://serpfast.com/api/v1/google/reviews",
    params=params,
    headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
    timeout=120,
)
print(res.json())