# Reviews across sites (/docs/recipes/reviews-across-sites) Find one business on Yelp, Google, Tripadvisor and Trustpilot and read its newest reviews with sentiment already labelled Search each review site for the business, take its id from the result, and read its newest reviews. Every site answers in the same review shape, and every review comes back with a sentiment label read from its words. The example is Harrods, the London department store. Measured on 22/11/2026: four searches and four review calls returned 70 of the newest Harrods reviews for 20 credits. 61 carried a sentiment label. The other 9 were Google reviews with stars and no text. ## Start in five minutes Set your key once. Every block on this page reads it. ```bash title="Terminal" export SOCIALCRAWL_API_KEY=sc_your_key_here ``` Paste this prompt into your coding agent: ```text title="Prompt" Read https://www.socialcrawl.dev/docs/recipes/reviews-across-sites.md and follow it to read the newest reviews of Harrods in London from Yelp, Google, Tripadvisor and Trustpilot. Use the key in SOCIALCRAWL_API_KEY. Price every call first with GET /v1/utility/estimate (free) and show me the total. Match each site's listing by name and address from its search, never a guessed id. Then put the reviews in one table with the site, date, stars and sentiment level. ``` Or price a call yourself. The estimate reads the same prices the API bills with and fetches nothing: ```bash title="cURL" curl -G "https://www.socialcrawl.dev/v1/utility/estimate" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "id=google/business/reviews" \ --data-urlencode "place_id=ChIJ_zAq7TgFdkgRQg1OSw1j7hU" \ --data-urlencode "depth=20" ``` On 22/11/2026 it answered `valid: true` and a hold of 5 credits. ## How it works - You search each site by the business name and a place, and keep the listing that matches. - Each search row carries the id the review call wants. - Each review call returns the newest reviews first, in one shape on every site. - Every review gains a sentiment level and a main issue, free. Both are read from the title and text, never from the stars. - You store each review once, keyed on its site and its id. ## What you need | Call | What it gives | Credits | | --- | --- | --- | | `GET /v1/yelp/search` | Businesses, each with its Yelp id in `place.id` | 1 | | `GET /v1/yelp/business/reviews` | A page of reviews, `sort=newest` | See the [Yelp roster](/docs/yelp.md) | | `GET /v1/google/business/search` | Places, each with `place.ext.place_id` | 5 | | `GET /v1/google/business/reviews` | Reviews of one place, newest first | 5 per started 100 reviews returned | | `GET /v1/tripadvisor/search` | Places, each with its Tripadvisor URL in `place.url` | 1 | | `GET /v1/tripadvisor/reviews` | Reviews of one place, newest first | 1 for up to 40 reviews | | `GET /v1/trustpilot/business-search` | Companies, each with its domain in `author.id` | 1 | | `GET /v1/trustpilot/reviews` | Reviews of one company | 5 a page | | `GET /v1/utility/estimate` | The price of any call above | 0 | Labels on these calls add no credits. [Endpoint pricing](/docs/endpoint-pricing.md) lists every price. ## Steps ### Step 1: Yelp Search by name and city, then read the newest reviews of the matching business. **cURL** ```bash title="cURL" curl -G "https://www.socialcrawl.dev/v1/yelp/search" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "query=Harrods" \ --data-urlencode "location=London, United Kingdom" curl -G "https://www.socialcrawl.dev/v1/yelp/business/reviews" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "id=cmyapOK57SE8dslSk_l0nA" \ --data-urlencode "sort=newest" \ --data-urlencode "limit=10" ``` **Python** ```python title="Python" import json, os, urllib.parse, urllib.request def get(path, **params): url = f"https://www.socialcrawl.dev/v1/{path}?" + urllib.parse.urlencode(params) req = urllib.request.Request(url, headers={"x-api-key": os.environ["SOCIALCRAWL_API_KEY"]}) return json.load(urllib.request.urlopen(req, timeout=120)) found = get("yelp/search", query="Harrods", location="London, United Kingdom") biz = next(r["place"] for r in found["data"]["items"] if r["place"]["name"] == "Harrods") yelp = get("yelp/business/reviews", id=biz["id"], sort="newest", limit=10) ``` - The search also lists Harrods Food Hall and Harrods' Tea Room. Keep the row whose name and address match. - `sort=newest` puts the latest reviews first. `limit` sets the reviews a page. ### Step 2: Google **cURL** ```bash title="cURL" curl -G "https://www.socialcrawl.dev/v1/google/business/search" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "query=Harrods" \ --data-urlencode "location=London, United Kingdom" \ --data-urlencode "limit=5" curl -G "https://www.socialcrawl.dev/v1/google/business/reviews" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "place_id=ChIJ_zAq7TgFdkgRQg1OSw1j7hU" \ --data-urlencode "depth=20" ``` **Python** ```python title="Python" places = get("google/business/search", query="Harrods", location="London, United Kingdom", limit=5) place = places["data"]["items"][0]["place"] google = get("google/business/reviews", place_id=place["ext"]["place_id"], depth=20) ``` - `place.ext.place_id` and the cid in `place.id` both work on the review call. - `depth` sets how many reviews come back, newest first by default. ### Step 3: Tripadvisor **cURL** ```bash title="cURL" curl -G "https://www.socialcrawl.dev/v1/tripadvisor/search" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "q=Harrods" \ --data-urlencode "location=London,England,United Kingdom" curl -G "https://www.socialcrawl.dev/v1/tripadvisor/reviews" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "url_path=Attraction_Review-g186338-d188901-Reviews-Harrods-London_England.html" \ --data-urlencode "depth=20" ``` **Python** ```python title="Python" spots = get("tripadvisor/search", q="Harrods", location="London,England,United Kingdom") spot = next(r["place"] for r in spots["data"]["items"] if r["place"]["name"] == "Harrods") tripadvisor = get("tripadvisor/reviews", url_path=spot["url"].rsplit("/", 1)[-1], depth=20) ``` - `url_path` is the last part of `place.url`, from `Attraction_Review` to `.html`. - Harrods is listed as an attraction. Its restaurants have listings of their own. ```json title="Response (trimmed)" { "data": { "items": [ { "review": { "id": "1085680158", "entity_id": "Attraction_Review-g186338-d188901-Reviews-Harrods-London_England.html", "title": "Interesting but wouldn’t go back", "rating": { "value": 5, "max": 5 }, "published_at": "2026-11-16T00:00:00.000Z" }, "computed": { "labels": { "sentiment": { "level": 2, "score_0_1": 0.43, "confidence": 0.76, "rating_mismatch": false }, "issue": { "label": "customer_service", "confidence": 0.66 } } } } ] }, "credits_used": 1 } ``` The review has five stars and a sentiment of 2, on a scale from 0 (very negative) to 4 (very positive). The label reads the words, so a polite five-star review that would not go back reads as neutral. ### Step 4: Trustpilot **cURL** ```bash title="cURL" curl -G "https://www.socialcrawl.dev/v1/trustpilot/business-search" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "query=Harrods" \ --data-urlencode "depth=10" curl -G "https://www.socialcrawl.dev/v1/trustpilot/reviews" \ -H "x-api-key: $SOCIALCRAWL_API_KEY" \ --data-urlencode "domain=www.harrods.com" \ --data-urlencode "depth=20" \ --data-urlencode "sort=recency" ``` **Python** ```python title="Python" companies = get("trustpilot/business-search", query="Harrods", depth=10) company = max((r["author"] for r in companies["data"]["items"] if r["author"]["display_name"] == "Harrods"), key=lambda a: a["posts_count"] or 0) trustpilot = get("trustpilot/reviews", domain=company["id"], depth=20, sort="recency") ``` - Search by the company name. A bare domain returns no companies. - Two companies are called Harrods. On 22/11/2026 `www.harrods.com` held 6,379 reviews and `harrods.org` held 2. Keep the domain of the shop's own website. ## What the four sites said The measured run on 22/11/2026, newest reviews first: | Site | Reviews read | Newest to oldest | Average stars | Level 0 or 1 | Level 3 or 4 | No text | | --- | --- | --- | --- | --- | --- | --- | | Yelp | 10 | 07/11/2026 to 31/07/2026 | 4.9 | 0 | 9 | 0 | | Google | 20 | 22/11/2026 to 21/11/2026 | 4.45 | 2 | 9 | 9 | | Tripadvisor | 20 | 16/11/2026 to 22/10/2026 | 3.3 | 8 | 8 | 0 | | Trustpilot | 20 | 21/11/2026 to 16/11/2026 | 2.6 | 11 | 8 | 0 | The newest reviews cover a few hours on Google and more than three months on Yelp. Trustpilot reviews are about the company (shipping, refunds, support), not a visit to the shop, so they read differently. ## Store only what is new Key each review on its site and `review.id`. `review.entity_id` names the business it belongs to, so one table holds every site. On the next run, send `since` with the date of your newest stored review. All four review calls take it and leave older reviews off the page. A page emptied by `since` is still billed. To pay only when something is new, use a [Monitor](/docs/engines/monitors.md) or [Listening](/docs/engines/listening.md). ## What it costs | Call | Credits on 22/11/2026 | Request id | | --- | --- | --- | | Yelp search | 1 | `req-ghAVSl3BXLXPUYE9` | | Yelp reviews, 10 | 1 | `req-6Ve36GkRSzSLipu9` | | Google search | 5 | `req-MRo0s4A1QAq19oa3` | | Google reviews, 20 | 5 | `req-YuPM0aptHg00dSQI` | | Tripadvisor search | 1 | `req-ldi54Ug6NCjXBym3` | | Tripadvisor reviews, 20 | 1 | `req-Y94KRUEcJYiq88CZ` | | Trustpilot search | 1 | `req-nSPK0PjZEpeQD0hx` | | Trustpilot reviews, 20 | 5 | `req-rRYhQhOQWGLBNSTw` | | Total | 20 | | None of these was a cache hit. A cache hit is free, so running the same calls again soon costs less. The free estimate gives each price before you call. For a monthly volume, see [Volume costs](/docs/volume-costs.md) or email socialcrawl@ridio.io with your monthly volume. ## Tips, and what not to use - Match each listing by name and address from the search. Never guess an id or a domain. - Count reviews with no text apart. They carry `labels: null`, not a neutral score. - `rating_mismatch` is `true` only when the words clearly contradict the stars. - One Trustpilot call stops at its `depth` cap. For more, start `POST /v1/trustpilot/reviews/history`. Google and Yelp have their own history jobs. - For many businesses at once, `POST /v1/prism/reviews/bulk` collects the history of Yelp and Tripadvisor places in one job. - On Tripadvisor, a filter such as `rating` or `sort_by` makes the first call slower. Later calls are served from cache. - Do not use `GET /v1/prism/product-reviews` for a business. It reads product reviews. ## Full program and agent brief **Full program (Python)** ```python title="Python" # reviews_across_sites.py: the newest reviews of one business from four sites, in one table. # Run: SOCIALCRAWL_API_KEY=... python3 reviews_across_sites.py (Python 3.9+, nothing to install) import json import os import sqlite3 import urllib.parse import urllib.request KEY = os.environ["SOCIALCRAWL_API_KEY"] NAME, CITY = "Harrods", "London, United Kingdom" def get(path, **params): url = f"https://www.socialcrawl.dev/v1/{path}?" + urllib.parse.urlencode(params) req = urllib.request.Request(url, headers={"x-api-key": KEY}) with urllib.request.urlopen(req, timeout=120) as res: return json.load(res) def first(rows, test): return next(r for r in rows if test(r)) lists = {} rows = get("yelp/search", query=NAME, location=CITY)["data"]["items"] biz = first(rows, lambda r: r["place"]["name"] == NAME)["place"] lists["yelp"] = get("yelp/business/reviews", id=biz["id"], sort="newest", limit=10) rows = get("google/business/search", query=NAME, location=CITY, limit=5)["data"]["items"] place = first(rows, lambda r: r["place"]["name"] == NAME)["place"] lists["google"] = get("google/business/reviews", place_id=place["ext"]["place_id"], depth=20) rows = get("tripadvisor/search", q=NAME, location="London,England,United Kingdom")["data"]["items"] spot = first(rows, lambda r: r["place"]["name"] == NAME)["place"] lists["tripadvisor"] = get("tripadvisor/reviews", url_path=spot["url"].rsplit("/", 1)[-1], depth=20) rows = get("trustpilot/business-search", query=NAME, depth=10)["data"]["items"] company = max((r["author"] for r in rows if r["author"]["display_name"] == NAME), key=lambda a: a["posts_count"] or 0) lists["trustpilot"] = get("trustpilot/reviews", domain=company["id"], depth=20, sort="recency") db = sqlite3.connect("reviews.db") db.execute("CREATE TABLE IF NOT EXISTS reviews (site TEXT, id TEXT, business TEXT, published_at TEXT, " "stars REAL, sentiment INTEGER, issue TEXT, text TEXT, PRIMARY KEY (site, id))") new = 0 for site, answer in lists.items(): for row in answer["data"]["items"]: r = row["review"] labels = (row.get("computed") or {}).get("labels") or {} cur = db.execute("INSERT OR IGNORE INTO reviews VALUES (?, ?, ?, ?, ?, ?, ?, ?)", ( site, r["id"], r.get("entity_id"), r.get("published_at"), (r.get("rating") or {}).get("value"), (labels.get("sentiment") or {}).get("level"), (labels.get("issue") or {}).get("label"), r.get("text"))) new += cur.rowcount print(f"{site:12} {len(answer['data']['items'])} reviews, {answer['credits_used']} credits") db.commit() print(f"{new} new reviews stored") ``` **Agent brief** ```text title="Agent brief" Goal: the newest reviews of Harrods in London from Yelp, Google, Tripadvisor and Trustpilot, in one table. Read https://www.socialcrawl.dev/docs/recipes/reviews-across-sites.md first. 1. Price each call with GET /v1/utility/estimate. Show me the total before you run anything. 2. Search each site. Keep the row whose name and address match; never guess an id or a domain. 3. Read each site's newest reviews with the page's parameters. 4. Store each review once by site and review.id, with its stars and computed.labels.sentiment.level. 5. Report per site: reviews read, average stars, how many are level 0 or 1, and how many have no text. ``` ## Next steps - [Labels](/docs/labels.md): What sentiment and issue mean on a review, and how they are read. - [Reviews and reputation](/docs/use-cases/reviews-and-reputation.md): Every review call, and which one fits your question. - [Every review, then new ones](/docs/recipes/every-review-and-new-ones.md): Pull a business