ScavioScavio
ToolsPricingDocs
Sign InGet Started
  1. Home
  2. Guides
  3. Scrape Google Reviews with TypeScript
Tutorial

How to Scrape Google Reviews with TypeScript

Step-by-step guide to scraping Google Reviews search results using TypeScript and the Scavio API. Get review text, star rating, reviewer profile as structured JSON.

Get Free API KeyAPI Docs

Google Reviews contains valuable data -- review text, star rating, reviewer profile, review date, and more. Scraping this data directly means dealing with anti-bot detection, CAPTCHAs, IP rotation, and constantly breaking selectors. The Scavio API handles all of that and returns clean, structured JSON from a single POST request.

This tutorial shows you how to scrape Google Reviews using TypeScript and the Scavio API. By the end, you will have a working TypeScript script that fetches real-time Google Reviews data and parses the results.

Prerequisites

  • TypeScript installed on your machine
  • A Scavio API key (free tier includes 50 credits on signup -- no credit card required)

Step 1: Install Dependencies

Install fetch to make HTTP requests:

Bash
npm install -D typescript tsx

Step 2: Make Your First Google Reviews Search

Send a POST request to the Scavio Google Reviews API endpoint with your query. The API returns structured JSON with review text, star rating, reviewer profile, and more.

// Reviews are per place: get a data_id (or place_id) from POST /api/v2/google/maps/search
// first. Owner responses are not part of this response.
const API_KEY = "sk_live_your_key";
const dataId = "0x89c259869319e7af:0x54953953a5ede7bb";

interface GoogleReviewsResponse {
  place_info: { title: string; address: string; rating: number; reviews: number };
  reviews: Array<{ position: number; rating: number; date: string; iso_date: string; snippet: string; likes: number; link: string; user: { name: string; link: string; local_guide: boolean } }>;
  response_time: number;
  credits_used: number;
  credits_remaining: number;
}

const response = await fetch("https://api.scavio.dev/api/v2/google/maps/reviews", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ data_id: dataId, num: 10, sort_by: "newest" }),
});

if (!response.ok) {
  throw new Error("Scavio API error: " + response.status);
}

const data = (await response.json()) as GoogleReviewsResponse;
const rows = data?.reviews ?? [];
for (const row of rows.slice(0, 5)) {
  console.log(row?.rating);
  console.log("  ", row?.date, row?.snippet, row?.user?.name);
}

Step 3: Example Response

The API returns structured JSON. Here is an example response for a Google Reviews search:

JSON
{
  "search_parameters": { "engine": "google_maps_reviews", "data_id": "0x89c259869319e7af:0x54953953a5ede7bb", "num": 10 },
  "place_info": { "title": "Jives Media", "address": "800 6th Ave Ste 36C, New York, NY 10001", "rating": 4.9, "reviews": 199 },
  "reviews": [
    {
      "position": 1,
      "rating": 5,
      "date": "a year ago",
      "iso_date": "2025-06-11T00:00:00Z",
      "snippet": "We have been working with the Jives Media team for over a year now...",
      "likes": 0,
      "user": { "name": "P Gol", "link": "https://www.google.com/maps/contrib/100121084533228462911", "local_guide": true }
    }
  ],
  "pagination": { "next_page_token": "CAESY0NBRVFB..." },
  "response_time": 3720,
  "credits_used": 1,
  "credits_remaining": 4811
}

Every field is structured and typed -- no HTML parsing, no CSS selectors, no regex extraction. Your TypeScript code can access any field directly.

Step 4: Full Working Example

Here is a complete, runnable TypeScript script that searches Google Reviews and prints the results:

/**
 * Fetch Google Reviews data with the Scavio API.
 * POST /api/v2/google/maps/reviews - rows come back under reviews, 1 credit per call.
 * Run with: npx tsx google-reviews.ts
 */
// Reviews are per place: get a data_id (or place_id) from POST /api/v2/google/maps/search
// first. Owner responses are not part of this response.
const API_URL = "https://api.scavio.dev/api/v2/google/maps/reviews";
const API_KEY = process.env.SCAVIO_API_KEY as string;

interface GoogleReviewsResponse {
  place_info: { title: string; address: string; rating: number; reviews: number };
  reviews: Array<{ position: number; rating: number; date: string; iso_date: string; snippet: string; likes: number; link: string; user: { name: string; link: string; local_guide: boolean } }>;
  response_time: number;
  credits_used: number;
  credits_remaining: number;
}

async function fetchGoogleReviews(dataId: string): Promise<GoogleReviewsResponse> {
  const response = await fetch(API_URL, {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ data_id: dataId, num: 10, sort_by: "newest" }),
  });

  if (!response.ok) {
    throw new Error("Scavio API error: " + response.status);
  }

  return (await response.json()) as GoogleReviewsResponse;
}

const data = await fetchGoogleReviews("0x89c259869319e7af:0x54953953a5ede7bb");
const rows = data?.reviews ?? [];
for (const row of rows.slice(0, 5)) {
  console.log(row?.rating);
  console.log("  ", row?.date, row?.snippet, row?.user?.name);
}

Why Use Scavio Instead of Scraping Google Reviews Directly?

  • No proxy management. Direct scraping requires rotating proxies to avoid IP bans. Scavio handles all of this server-side.
  • No CAPTCHA solving. Google Reviews aggressively blocks automated requests. Scavio returns clean data every time.
  • Structured JSON output. No HTML parsing or CSS selector maintenance. Get typed, consistent data from every request.
  • Multi-platform in one API. Search Google, Amazon, YouTube, and Walmart from the same API key with the same authentication pattern.
  • Free tier included. 50 credits on signup with no credit card required. Each search costs 1 credit.

Frequently Asked Questions

Scraping publicly available data from Google Reviews is generally legal, but you should review Google Reviews's Terms of Service. Using the Scavio API avoids the legal gray areas of direct scraping since Scavio handles all data collection through proper channels and returns structured results via API.

Direct scraping of Google Reviews requires managing proxies, CAPTCHAs, rate limits, and anti-bot detection. The Scavio API handles all of this for you. Send a POST request with your query and get structured JSON back — no proxy management or browser automation needed.

The Scavio API returns structured JSON with review text, star rating, reviewer profile, review date, review likes, topic keywords. All data is returned in a clean, consistent format that is easy to parse in TypeScript.

Scavio offers a free tier with 50 credits on signup. Each API request costs 1 credit regardless of which platform you search. No credit card required to start. Paid plans start at $30/month for higher volumes.

Scavio returns Google Reviews results in 1-3 seconds on average. Results are fetched in real time from Google Reviews — there is no caching layer or stale data. Every request returns live results.

More Scraping Tutorials

Scrape Google Reviews with Python

Python tutorial for Google Reviews scraping

Read more

Scrape Google Reviews with JavaScript

JavaScript tutorial for Google Reviews scraping

Read more

Scrape Google Reviews with Go

Go tutorial for Google Reviews scraping

Read more

Scrape Google with TypeScript

TypeScript tutorial for Google scraping

Read more

Scrape Amazon with TypeScript

TypeScript tutorial for Amazon scraping

Read more

Scrape Reddit with TypeScript

TypeScript tutorial for Reddit scraping

Read more

Search API for TypeScript

Full TypeScript API reference with all platforms

Read more

Google Reviews API

Google Reviews API overview and documentation

Read more

Start Scraping Google Reviews with TypeScript

Get your free Scavio API key and start fetching Google Reviews data in TypeScript. 50 free credits on signup -- no credit card required.

Get Started FreeRead the Docs
ScavioScavio

One scraper API for every social, search and ecommerce platform. Built for AI agents.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative
  • Serper Alternative
  • Tavily vs Scavio
  • SerpAPI vs Scavio
  • All alternatives
  • Compare Scavio vs alternatives

Search APIs

  • Google Search API
  • Amazon Product API
  • YouTube API
  • Reddit API
  • Walmart Product API
  • TikTok API
  • Instagram API

Tools

  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy