• Yelp
  • Local businesses

How to scrape Yelp reviews beyond the three-excerpt limit

Get full Yelp reviews as JSON: business aliases, search by location, sort by newest or elites, star and keyword filters, owner replies, with code samples.

By ScrapeReviews · · 4 min read

Yelp is where people in the US, and in a good part of Canada and Europe, review restaurants, salons, dentists and plumbers. For a local business, the last fifty Yelp reviews say more about what customers want than most surveys. The problem is getting them: the official Yelp Fusion API is designed to display businesses, and its reviews endpoint returns, as far as its documentation goes, up to three short excerpts per business. This guide shows how to read the full Yelp reviews of a business, page after page, as JSON with ScrapeReviews, an independent API not affiliated with Yelp.

Find the business

Every Yelp business has an alias, the end of its URL: yelp.com/biz/gary-danko-san-francisco has the alias gary-danko-san-francisco. That is the id to pass in the paths below. The encrypted id Yelp uses internally works too; the API returns it in extra.encid.

If you only have a name, search. Yelp's search needs a place, so pass location (a city, a neighbourhood or an address) along with query: without it you get few or no businesses. The search uses Yelp's suggestions and usually returns 1 to 5 businesses with their alias, name and rating.

curl "https://api.scrapereviews.com/v1/yelp/businesses/search?query=gary%20danko&location=San%20Francisco,%20CA&limit=5" \
  -H "X-API-Key: $SCRAPEREVIEWS_API_KEY"

The business itself is at /v1/yelp/businesses/{business_id}: a unified Entity with rating (1 to 5 stars), review_count and an extra holding alias, encid, address, city, region, postal_code, latitude, longitude, phone, price_range, neighborhoods and review_languages.

Read the reviews

The reviews route is /v1/yelp/businesses/{business_id}/reviews: up to 20 reviews per call (one Yelp page), newest first by default, with a cursor.

curl "https://api.scrapereviews.com/v1/yelp/businesses/gary-danko-san-francisco/reviews?sort=recent&stars=1,2&limit=20" \
  -H "X-API-Key: $SCRAPEREVIEWS_API_KEY"

A Yelp review has the unified fields (rating, text, language, published_at, helpful_count, a pseudonymised author with review_count, and owner_reply when the business answered publicly) plus an extra with:

  • author_is_elite: the reviewer belongs to the Yelp Elite programme, frequent and trusted reviewers.
  • previous_review_count: earlier reviews by the same person of this business, a sign of a regular customer.
  • reactions: the counts of helpful, thanks, love_this and oh_no.
  • photo_count, check_in_count and is_first_reviewer.

Sorting and filters: who applies what

Yelp sorts and filters some things itself, and the API applies the others on each page of 20 reviews it reads. The difference matters for cost and for meta.total.

ParameterValuesApplied by
sortrecent (default), relevant, oldest, highest, lowest, elitesYelp
starse.g. 1,2Yelp (on our side when combined with search)
searchwords the review mentions, e.g. parkingYelp
languageISO 639-1 codeeach page, on our side
since, untildateseach page, on our side

With only Yelp's filters, meta.total is Yelp's count. With language, since or until, it is null, and a page whose 20 reviews all fall outside the filter comes back empty with has_more: true and is not billed: keep following the cursor. With the default newest-first order, a since window ends as soon as the reviews get older than it.

sort=elites puts the reviews of Elite members first: useful when you want a short, high-signal sample of a busy business.

Sorting by rating on very large businesses. highest and lowest make Yelp sort the whole list, and on businesses with thousands of reviews that can be slow enough to end in a 504 upstream_timeout (free). If you want the negative reviews, use stars=1,2 with the default order instead: same reviews, newest first, and fast.

What you get, and what you do not

The API reads the reviews Yelp recommends, the ones shown on the business page and counted in its rating. Reviews Yelp files as "not recommended" are not included, and the end of the list is the end of the recommended reviews, so meta.complete is always true. For most analyses this is what you want anyway: it is the set of reviews your customers actually see.

Signals worth keeping

Yelp reviews carry more context than a rating and a text, and a little of it goes a long way in analysis:

  • Elite authors. Elite members write often and in detail, and their reviews tend to be read more. Tracking the share of Elite reviews, and their average rating against everyone else's, tells you whether your most influential reviewers are happy.
  • Returning customers. previous_review_count above zero means the person reviewed this business before. A regular who drops from five stars to two is a stronger signal than a first-time visitor's complaint.
  • Reactions. reactions.helpful and love_this show which reviews other users found useful; sort your sample by them when you need the reviews that shape opinion.
  • Owner replies. Measure how many negative reviews got a public reply and how fast, comparing owner_reply.published_at with published_at. Response rate is one of the easiest numbers for a local business to improve.

Use case: what customers complain about, block by block

A multi-location restaurant group, a franchise or an agency managing local listings can run the same loop every week: for each location, read the reviews since the last run, keep the 1-star and 2-star ones, and group them by topic with search (wait, price, parking, rude). Compare with the competitors two doors down, found through search with the same location. The method is the one in competitor review monitoring; for hotels and attractions, add Tripadvisor reviews. Before storing review texts, read is it legal to scrape reviews?: authors are pseudonymised, but the use you make of the data is your responsibility.

Costs and errors

  • 1 credit per successful call, up to 20 reviews in it; search and business details are 1 credit each. Failed calls cost nothing.
  • Unknown business: 404 entity_not_found. A bad parameter: 400 invalid_parameter. Yelp unreachable or slow: 503 upstream_blocked or 504 upstream_timeout. The list is in errors.
  • Every parameter is documented in the reference: search, business, reviews, and in the overview of the Yelp Reviews API.

Start with one business

Create a free account and get 30 free calls every month, no card needed: enough to read the latest reviews of your business and its neighbours today. The getting started guide shows the first request, and the SDKs wrap the cursor for you.

Frequently asked questions

Why not use the Yelp Fusion API?
The official Yelp API is built for showing businesses, not for analysing reviews: as far as its public documentation goes, it returns up to three short review excerpts per business. To read the full texts and every page of reviews you need another way to get them.
What is the business id on Yelp?
The alias at the end of the business URL: yelp.com/biz/gary-danko-san-francisco gives gary-danko-san-francisco. The encrypted id that the API returns in extra.encid works too.
Do I get the reviews Yelp does not recommend?
No. The API reads the recommended reviews, the ones Yelp shows on the business page and counts in its rating. The reviews Yelp hides as not recommended are not included.
Why does sorting by rating sometimes time out?
On businesses with thousands of reviews, Yelp can be slow to sort by rating and the call ends with a 504 that costs nothing. Use the stars filter with the default newest-first order instead: it gives the same reviews and answers quickly.

Get the reviews, skip the scraper

30 free calls every month, no credit card. One API key for Trustpilot, the App Store, Google Play, Tripadvisor, Booking.com, Yelp, G2 and Capterra.