The best way to show Google reviews on a Next.js site is to fetch them from a review API in a server component, and let Next.js fetch them again at most once an hour. The reviews arrive in the HTML, so the page stays fast, search engines read them, and your API key never reaches the browser. If v0 by Vercel built your site, it's a Next.js site, so this works for you too. The code is at the end, with a prompt you can hand to your AI coding agent. Before you paste it, four choices decide how well it works, so make them on purpose.
TLDR
The best way to show Google reviews on a Next.js site is to fetch them from a review API in a server component, so the reviews arrive in the HTML and your API key never reaches the browser.
The Reviewflowz API pulls your Google reviews without Google Business Profile access or Google's approval, and the same API returns reviews from 200+ platforms in the same fields.
A Reviewflowz review widget is one iframe you customize freely, so you show always-fresh Google reviews on a Next.js site without writing any fetching code.
Reviewflowz tags let each page of your site ask for only the reviews that fit it, whether you tag reviews by hand or let AI tag them.
When to pull the reviews: at build, at page load, or in an iframe
You have three moments to get reviews onto a page, and each one trades speed, freshness and indexing differently.
Option | How it works | The tradeoff |
At build | The server fetches the reviews and writes them into the HTML. | The fastest, most efficient and most effective way. Reviews are as fresh as your last fetch, so plan how they refresh. |
Async at page load | A script loads the reviews after the page opens. | It hurts how the page gets indexed and read. |
Iframe at page load | The page embeds a review widget in an iframe. | A decent tradeoff: always fresh, and still extremely fast, because the widget is loaded statically. |
On Next.js, a server component gives you the first option without the rebuilds. It runs on the server, so the reviews are in the HTML and the key stays out of the browser bundle, and revalidate tells Next.js to fetch them again at most once an hour.
The iframe, without building it. The Reviewflowz review widget is one iframe you customize as much as you like. We keep it fresh and load it statically, so it stays extremely fast. You find it in Integrations, on the Widgets tab.
Where the reviews come from: Places API, Business Profile API, or a review API
Your choice of source sets how many reviews you can show and how much setup stands between you and the first one.
Source | What you get | What it takes |
Google Places API | 5 reviews, a random sample. They can be old, and they can be bad. | A Google Cloud API key. |
Google Business Profile API | All the reviews of your own profile. | Approval first: you apply for access, and Google reviews requests within 14 days. Then OAuth, with owner or manager access to the profile. |
A third-party review API | All your reviews, and reviews from other platforms too. | An API key. No Business Profile access needed. |
Five reviews won't get you far. So in practice you need Business Profile access, through Google's approval, or a service that handles it for you.
No Business Profile access needed. The Reviewflowz API pulls your Google reviews without Business Profile access and without Google's approval, and the same API covers 200+ platforms in the same fields. Here is what it returns for Google.
Which reviews to show
Showing every review is the simplest choice, and rarely the best one. Decide these before you write any code:
All reviews, or a selection?
Selected by hand, or automatically?
With rules: a minimum rating, text required, newest first?
Filtered by topic, by location, by language, or by whatever fits the page?
The code below selects automatically, with rules: 6 reviews, 5 stars, with written text, still on Google, newest first. Each rule is one commented line, so you change it in place. Three more filters go further: language=en for reviews in one language, location=<id> for one of your locations, and tag=<id> for reviews you picked by hand or by AI tag.
Pick reviews per page with tags. In Reviewflowz you tag reviews by hand, or let AI tag them, and each page asks the API for its own tag. Lugg built its reviews page this way: visitors choose a use case and a city and read the reviews about exactly that, and about 6 to 9% of Lugg's new users land on a reviews page first. The testimonial feed guide shows the setup.
Reviews from Tripadvisor, Trustpilot and other platforms
If you want more than Google, you need a third-party review API here too. Some platforms, like Tripadvisor, forbid using your own reviews on your website. De facto, most people don't care. In general, it's best practice to link back to the original review, so those platforms don't bark.
The code below does that for Google: each review carries a url that opens it on Google, and the component shows it as a "Read on Google" link, so a visitor can check the review is real.
Other platforms, same call. With Reviewflowz, Tripadvisor, Trustpilot and the rest come through the same request: change platform, and the reviews come back in the same fields, each with its own url to link back to. The testimonial feed guide lists every filter.
Add Google reviews to your Next.js site, step by step
Step 1. In Reviewflowz, open Review Sources and click New review source. Pick Google Maps, then search for your business and select it.
Step 2. Open Settings → Webhooks & API and click Create an API key. Name it, pick Read only, and create it. The API is part of the Premium plan.
Step 3. Put the key in .env.local as REVIEWFLOWZ_KEY, and add the same variable to your host's environment variables (on Vercel, in the project settings). Step 4. Create app/components/GoogleReviews.tsx and paste this:
// app/components/GoogleReviews.tsx
// A server component: it runs on the server, so the key never reaches the
// browser. Put REVIEWFLOWZ_KEY=rfz_live_... in .env.local (and in your host's
// environment variables, like Vercel's).
type Review = {
id: string;
rating: number;
text: string | null;
reviewer: { name: string | null };
url: string | null;
};
export default async function GoogleReviews() {
const params = new URLSearchParams({
platform: "google_maps", // Google reviews only
rating_min: "5", // 5 stars
has_text: "true", // with written text
removed: "false", // still on Google
sort: "date", // newest first
limit: "6", // how many to show
});
const res = await fetch(`https://api.reviewflowz.com/v3/reviews?${params}`, {
headers: { Authorization: `Bearer ${process.env.REVIEWFLOWZ_KEY}` },
next: { revalidate: 3600 }, // fetch again at most once an hour
});
if (!res.ok) throw new Error(`Reviewflowz API ${res.status}: ${await res.text()}`);
const { data: reviews }: { data: Review[] } = await res.json();
return (
<section className="google-reviews">
{reviews.map((review) => (
<figure key={review.id}>
<p aria-label={`${review.rating} out of 5 stars`}>{"★".repeat(Math.round(review.rating))}</p>
<blockquote>{review.text}</blockquote>
<figcaption>
{review.reviewer.name}
{review.url && <a href={review.url} target="_blank" rel="noopener">Read on Google</a>}
</figcaption>
</figure>
))}
</section>
);
}
Step 5. Import the component into any page and place <GoogleReviews /> where the reviews should appear. Step 6. That's the freshness handled: revalidate: 3600 fetches again at most once an hour. The API sends an ETag, and a 304 answer still counts as a call, within a limit of 300 calls a minute per account.
Prompt for your AI coding agent: Add a Google reviews section to this Next.js site. Create app/components/GoogleReviews.tsx as a server component that fetches GET https://api.reviewflowz.com/v3/reviews?platform=google_maps&rating_min=5&has_text=true&removed=false&sort=date&limit=6 with the header "Authorization: Bearer" plus the REVIEWFLOWZ_KEY environment variable, and next: { revalidate: 3600 }. Keep it a server component, so the key never reaches the browser. Show each review's rating, text, reviewer name and a "Read on Google" link to its url. Follow the checklist in https://api.reviewflowz.com/v3/docs/guides/testimonial-feeds.
Want every option, filter and webhook in one place? Read Build a testimonial feed for every page. Running WordPress instead? Embed a review widget on WordPress.


