# Get Google Maps reviews and Tripadvisor data with Litescrape

Litescrape returns Google Maps, Google Reviews, Tripadvisor and Yelp results as structured JSON, and the `place_id` in a search result is the input for that place's reviews or details. Each call is one request at $0.00015 per request, so a Maps search plus one place's reviews costs $0.0003. Send a GET to `https://agents.litescrape.com/zcj/xd548ye6gpaj/api/google/maps` with `Authorization: Bearer <token>` for an agent credential that holds a plan.

## At a glance

- **Endpoints:** `GET https://agents.litescrape.com/zcj/xd548ye6gpaj/api/google/maps`, `/api/google/reviews`, `/api/tripadvisor/search`, `/api/tripadvisor/place`
- **Query:** Maps takes `q`, `type=search`, `gl` and `hl`. Reviews takes `place_id`, plus `num`, `sort_by`, `topic_id`, `query` and `next_page_token`. Tripadvisor search takes `q`, and Tripadvisor place takes `place_id`.
- **Price:** $0.00015 per request. Every endpoint has the same flat rate per request.
- **Access:** every call draws on a plan, the Free trial or Credits, held by the agent credential you send. Calls are not sold one at a time.
- **Payment:** Credits are bought through a 402, the price quote, settled over x402, MPP or card.
- **Response:** JSON. Each place in `local_results[]` or `search_results[]` carries a `place_id`.
- **Full purchase flow:** [the buyer skill](https://agents.litescrape.com/zcj/xd548ye6gpaj/SKILL.md)

## Search Google Maps and read a place's reviews

1. Search for places. Use `q` for the query and `type=search` for a place search, `gl` for the country and `hl` for the language:

   ```bash
   curl -s "https://agents.litescrape.com/zcj/xd548ye6gpaj/api/google/maps?q=coffee+shops+in+Austin%2C+TX&type=search&gl=us&hl=en" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
   ```

   Each place in `local_results` looks like this (trimmed):

   ```json
   {
     "position": 1,
     "title": "BRB Coffee",
     "place_id": "<place_id>",
     "data_id": "0x8644cb19d5f5779b:0xbce93fffd046e2be",
     "rating": 4.9,
     "reviews": 338,
     "type": "Coffee shop",
     "website": "https://brbcoffee-atx.com/",
     "open_state": "Open · Closes 9 PM"
   }
   ```

   This example returned 20 places, and each one also had `address`, `gps_coordinates`, `operating_hours`, `phone`, `reviews_link` and `place_id_search`. The example search drew $0.00015 from credit. Follow `pagination.next` to get more places.

2. Request that place's reviews. Set `PLACE_ID` to the place's `place_id`, and use `num` to set how many reviews come back:

   ```bash
   curl -s "https://agents.litescrape.com/zcj/xd548ye6gpaj/api/google/reviews?place_id=$PLACE_ID&gl=us&hl=en&num=3" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
   ```

   The response has these parts:

   - `place_info`: `title`, `address`, `rating` and `reviews`.
   - `reviews[]`: each review has `review_id`, `rating`, `date`, `iso_date`, `snippet`, `user`, `likes`, `subratings`, `images` and `link`.
   - `topics[]`: each topic has `keyword`, `mentions` and `id`.
   - `pagination`: `next` and `next_page_token`.

   The example returned three reviews and drew $0.00015 from credit.

3. Narrow the reviews or move to the next page with these parameters:

   | To | Parameter |
   | --- | --- |
   | Set how many reviews come back | `num` |
   | Change the order | `sort_by` |
   | Keep reviews about one topic | `topic_id`, an `id` from `topics[]` |
   | Keep reviews matching free text | `query` |
   | Get the next page | `next_page_token` from `pagination` |

   The accepted values are in the [Google Reviews spec](https://agents.litescrape.com/zcj/xd548ye6gpaj/services/google-reviews/openapi.json).

## Search Tripadvisor and open one place

1. Search by text:

   ```bash
   curl -s "https://agents.litescrape.com/zcj/xd548ye6gpaj/api/tripadvisor/search?q=coffee+Austin" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
   ```

   Each entry in `search_results` (trimmed):

   ```json
   {"position": 1, "place_id": "666078", "title": "Austin's Restaurant & Bar", "location": "Incline Village, Nevada", "type": "EATERY", "detail_type": "Restaurant", "rating": 4.1, "max_rating": 5, "reviews": 471}
   ```

   This example returned 30 results on the page, and each result also carried `place_api_link` and `reviews_api_link`. The search drew $0.00015 from credit.

2. Open the place by its `place_id`:

   ```bash
   curl -s "https://agents.litescrape.com/zcj/xd548ye6gpaj/api/tripadvisor/place?place_id=666078" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
   ```

   The response's `place_results` object holds these fields:

   - Location and contact: `address`, `structured_address`, `gps_coordinates`, `phone` and `website`.
   - Ratings: `rating`, `reviews`, `subratings` (`atmosphere`, `food`, `service`, `value`) and `ranking`.
   - Categories: `categories`, with cuisines, diets, meals and dining options.
   - Opening and price: `price`, `open_state`, `is_open` and `weekly_hours`.

   The call drew $0.00015 from credit. The place's reviews come from the Tripadvisor reviews operation, which supports sorting and machine translation.

## Yelp and live foot traffic

- **Yelp search:** `GET https://agents.litescrape.com/zcj/xd548ye6gpaj/api/yelp/search?find_loc=<place>` finds businesses near a place, narrowed by category, keywords, a map area or a sort order.
- **Yelp reviews:** `GET https://agents.litescrape.com/zcj/xd548ye6gpaj/api/yelp/reviews?place_id=<place_id>` returns one business's reviews, with language, rating, sort and pagination controls. The [Yelp spec](https://agents.litescrape.com/zcj/xd548ye6gpaj/services/yelp/openapi.json) lists the paths.
- **Popular Times:** `GET https://agents.litescrape.com/zcj/xd548ye6gpaj/api/google/maps/popular-times?place_id=<place_id>` says how busy a Google Maps place is right now. The [Google Maps spec](https://agents.litescrape.com/zcj/xd548ye6gpaj/services/google-maps/openapi.json) has the operation.

## What is charged

- Calls draw on a plan's credit. A call with no credential is refused with `401`, and no price is quoted.
- Each call is one request. A search plus the reviews of five places is six requests, which costs $0.0009.
- The only 402 is the plan purchase. Nothing is charged until you pay it.
- A billed response carries a `zc-billing` header with `chargedUsd`. A response without that header billed nothing.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `401 bearer_required` | The call has no agent credential | Register at [auth.md](https://agents.litescrape.com/zcj/xd548ye6gpaj/auth.md), then retry with `Authorization: Bearer <token>` |
| `401 invalid_token` | The token did not verify. Access tokens last minutes. | On `token_expired`, exchange the stored assertion for a fresh token |
| `403 plan_required` | Your credential holds no plan that covers this call | Buy one of the plans listed in the body's `plans`, then retry |
| `403 verified_email_required` | The Free trial needs a credential claimed with a verified email | Complete the claim first. Retrying without it fails. |
| `usage_exhausted` | Your credit is used up | Top up with `POST https://agents.litescrape.com/zcj/xd548ye6gpaj/extend` |
| `503 service_unavailable` | The scraper could not complete the request | Not billed. Retry with bounded backoff. |
| `rate_limit_exceeded` | You sent too many calls | Wait `retry_after`, then retry |

## Frequently asked questions

### Is Litescrape a Google Maps API alternative for places?

Litescrape returns Google Maps place search results as structured JSON, so you don't run browsers or proxies yourself. Each result includes ratings, review counts, addresses, opening hours and a `place_id` for follow-up calls. Each call is one request at $0.00015 per request.

### How do I get Google Maps reviews for a place?

Take the `place_id` from a Maps search result and send it to `/api/google/reviews`. Use `num` to set how many reviews come back. Use `sort_by`, `topic_id` or `query` to order and filter them. Use `next_page_token` to get the next page.

### Does Litescrape have a Tripadvisor API?

Yes. `/api/tripadvisor/search` searches by text, location, coordinates and place type. `/api/tripadvisor/place` returns one place's details by `place_id`. A reviews operation returns that place's reviews. Each call is one request at $0.00015 per request.

### Can Litescrape search Yelp?

Yes. Yelp search takes a location in `find_loc` and returns businesses. Yelp reviews take one business's `place_id`. Each call is one request at $0.00015 per request.

### Do I need an API key?

No upstream API key is needed. You need an agent credential, which the storefront issues for free, and a plan on that credential: the Free trial or Credits. [The buyer skill](https://agents.litescrape.com/zcj/xd548ye6gpaj/SKILL.md) has the steps.

## Keep reading

- [Buyer skill](https://agents.litescrape.com/zcj/xd548ye6gpaj/SKILL.md): the full purchase flow
- [Identity](https://agents.litescrape.com/zcj/xd548ye6gpaj/auth.md): register and refresh an agent credential
- [How to pay](https://agents.litescrape.com/zcj/xd548ye6gpaj/payment.md): plans, rails and top-ups
- [Error reference](https://agents.litescrape.com/zcj/xd548ye6gpaj/errors.md): every error code
- [Services and pricing](https://agents.litescrape.com/zcj/xd548ye6gpaj/services): one page per service

---

Updated 2026-11-05. All Litescrape guides: https://agents.litescrape.com/guides.md. Storefront: https://agents.litescrape.com/zcj/xd548ye6gpaj/llms.txt.
