Yelp
Yelp Reviews API
A page of Yelp reviews as JSON: star rating, the full text, detected language, the author's profile and expertise counts, attached photos, reaction counts and any owner response. Ten reviews per page, sortable and filterable by star rating. Costs 2 credits per page — and page 1 is redundant if you already called the Business endpoint.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonbusiness_idstringWhich business, 1-500 characters. Accepts the alias (mozarts-coffee-roasters-austin), the opaque encid, or a yelp.com/biz URL. Either this or url is required.
Example: mozarts-coffee-roasters-austin
urlstringA yelp.com/biz URL, 1-1000 characters, as an alternative to business_id. Either this or business_id is required.
Example: https://www.yelp.com/biz/mozarts-coffee-roasters-austin
pageintegerResults page, 1-based, at Yelp's fixed 10 per page. START AT PAGE 2: page 1 re-fetches the exact document the Business endpoint already returned and costs you another 2 credits for reviews you have. A page past the last review is a 404, not an empty result — follow has_next_page instead of guessing.
Example: 2
sortenum<string>default:relevanceReview ordering. CLOSED SET: Yelp ignores a sortby it does not recognise and serves default ordering under a 200, so a typo silently buys an unsorted page at full price. The response echoes Yelp's own internal name for the sort it actually ran (relevance_desc for the default).
Example: newest
relevance— Yelp's default ordering.newest— Most recent first.oldest— Oldest first.rating_high— Highest star rating first.rating_low— Lowest star rating first.elites— Yelp Elite reviewers only.
ratingintegerRestrict to one star rating: 1, 2, 3, 4 or 5. This changes filtered_review_count on the response, NOT review_count — review_count stays the business's headline total.
Example: 1
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
# Page 1 already came back with client.yelp.business(...) - start at 2.
page = 2
while True:
resp = client.yelp.reviews(
business_id="mozarts-coffee-roasters-austin",
page=page,
sort="newest",
)
for review in resp["data"]["reviews"]:
print(review["rating"], review["author"], review["published_date"])
if not resp["data"]["has_next_page"]:
break
page += 1Response