Updated Oct 2026

Google reviews API in Node.js: three ways, with working code

Google has two reviews APIs. The Places API returns up to 5 public reviews of any place with an API key. The Business Profile API returns every review of the locations you own, with replies, through OAuth and only after Google approves your Cloud project. Both below in Node.js 18+ with the built-in fetch, then the same through Prisma for Google plus 50+ other platforms. The Python version is here; the two APIs are compared on Google reviews API.

1. Places API: 5 reviews of any place

Create a key with the Places API (New) enabled (how) and find the place ID.

Node.js
const PLACE_ID = "ChIJN1t_tDeuEmsRUsoyG83frY4";
const res = await fetch(`https://places.googleapis.com/v1/places/${PLACE_ID}`, {
  headers: {
    "X-Goog-Api-Key": process.env.GOOGLE_MAPS_API_KEY,
    "X-Goog-FieldMask": "displayName,rating,userRatingCount,reviews",
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const place = await res.json();
console.log(place.displayName.text, place.rating, place.userRatingCount);
for (const r of place.reviews ?? []) console.log(r.rating, r.authorAttribution.displayName, r.text?.text ?? "");

At most 5 reviews, chosen by Google, no owner replies, no way to post one, billed per request as Place Details with the Pro fields. Good for a “what people say” block, not for managing your reviews.

2. Business Profile API: every review of your locations, with replies

You need an approved Cloud project (how to get access), an OAuth client, and a token for an owner or manager of the profile. The example uses google-auth-library for the OAuth dance and plain fetch for the calls.

Shell
npm install google-auth-library
Node.js
import { OAuth2Client } from "google-auth-library";

const client = new OAuth2Client({
  clientId: process.env.GOOGLE_CLIENT_ID,
  clientSecret: process.env.GOOGLE_CLIENT_SECRET,
  redirectUri: "http://localhost:3000/oauth/callback",
});
// 1) send the owner here once; 2) on the callback, exchange `code` and store tokens.refresh_token
const url = client.generateAuthUrl({ access_type: "offline", prompt: "consent",
  scope: ["https://www.googleapis.com/auth/business.manage"] });
// const { tokens } = await client.getToken(code); client.setCredentials(tokens);

client.setCredentials({ refresh_token: process.env.GOOGLE_REFRESH_TOKEN });
const { token } = await client.getAccessToken();
const H = { Authorization: `Bearer ${token}` };
const get = async (u) => { const r = await fetch(u, { headers: H }); if (!r.ok) throw new Error(`${r.status} ${await r.text()}`); return r.json(); };

Account, location, reviews

Node.js
const { accounts } = await get("https://mybusinessaccountmanagement.googleapis.com/v1/accounts");
const account = accounts[0].name;                                   // "accounts/123"
const { locations } = await get(`https://mybusinessbusinessinformation.googleapis.com/v1/${account}/locations?readMask=name,title`);
const location = locations[0].name;                                 // "locations/456"

const STARS = { ONE: 1, TWO: 2, THREE: 3, FOUR: 4, FIVE: 5 };
async function* allReviews(account, location) {
  let pageToken;
  do {
    const u = new URL(`https://mybusiness.googleapis.com/v4/${account}/${location}/reviews`);
    u.searchParams.set("pageSize", "50");
    if (pageToken) u.searchParams.set("pageToken", pageToken);
    const data = await get(u);
    yield* data.reviews ?? [];
    pageToken = data.nextPageToken;
  } while (pageToken);
}
for await (const rev of allReviews(account, location))
  console.log(STARS[rev.starRating], rev.reviewer.displayName, rev.comment ?? "", !!rev.reviewReply);

Reply, edit, delete

Node.js
await fetch(`https://mybusiness.googleapis.com/v4/${rev.name}/reply`, {
  method: "PUT", headers: { ...H, "Content-Type": "application/json" },
  body: JSON.stringify({ comment: "Thank you, Laura. We've passed your note to the kitchen team." }),
});
// the same PUT edits; DELETE …/reply removes the reply

Limits: 300 queries per minute per project, 10 reply edits per minute per profile, 4,096 bytes per reply, 0 QPM until Google approves the project. Backoff and 429 handling: quota guide.

3. Prisma: one key, Google and 50+ other platforms

Node.js
const API = "https://api.prismareviews.com/v1";
const H = { Authorization: `Bearer ${process.env.PRISMA_API_KEY}` };

let cursor;
do {
  const u = new URL(`${API}/reviews`); u.searchParams.set("limit", "100"); if (cursor) u.searchParams.set("cursor", cursor);
  const { data, next_cursor } = await (await fetch(u, { headers: H })).json();
  for (const r of data) console.log(r.platform, r.rating, r.author, r.text, r.reply?.status);
  cursor = next_cursor;
} while (cursor);

await fetch(`${API}/reviews/${reviewId}/reply`, { method: "POST", headers: { ...H, "Content-Type": "application/json" },
  body: JSON.stringify({ text: "Thank you, Laura. We've passed your note to the kitchen team." }) });

Same fields on every platform, rating always 1 to 5, the reply with its status, a review.created webhook instead of polling, and test keys that return sample data before any account is connected. Full reference: GET /v1/reviews, replies, webhooks.

What’s true today: Prisma reads Google reviews from the Google Maps listing (public, read-only) while Google reviews Prisma’s Business Profile API application; replies on Google through Prisma start when that approval arrives. Replies already work by API on the App Store, Google Play, Judge.me, eBay, Trusted Shops, eKomi and others (Platforms).

FAQ

Is there an npm package for the Google reviews API?

googleapis has clients for the Business Profile account and business-information APIs, but reviews still live on the v4 endpoints, so a plain fetch with an OAuth token from google-auth-library is the simplest route. The Places API is one fetch with an API key.

Can I call the Google reviews API from the browser?

The Places API can be called from the browser with a referrer-restricted key, within Google’s attribution rules. The Business Profile API must be called from a server: it needs the owner’s OAuth token and must never expose it to the page.

Why do I get 5 reviews only?

That’s the Places API’s limit. Every review of a location you own comes from the Business Profile API, which requires OAuth as an owner or manager and an approved Google Cloud project.

One fetch, every platform.

Get API key

2 locations free. Test keys return sample reviews, so the code above runs today.

Get your API key in a minute

Free Spark plan: 2 locations, no card. Test keys return sample data on all 58 platforms, so you can build before connecting a real one.