Updated Oct 2026
Yelp API in Python: business search, the 3 reviews, and what to do next
The Yelp Fusion API (now documented as the Yelp Places API) is quick to use from Python and honest about its limit: the reviews endpoint returns up to 3 excerpts per business, not the full list, and there is no owner endpoint and no reply API. This guide shows the two calls that matter, the errors you’ll hit, and the options when 3 excerpts aren’t enough for a business you own. The plan-by-plan detail is in Yelp API review limit.
pip install requestsCreate an app in the Yelp developer portal to get an API key; it’s sent as a Bearer token.
1. Find the business ID
import os, requests
H = {"Authorization": f"Bearer {os.environ['YELP_API_KEY']}"}
BASE = "https://api.yelp.com/v3"
r = requests.get(f"{BASE}/businesses/search", headers=H,
params={"term": "Café Ruzafa", "location": "Valencia, Spain", "limit": 5}, timeout=30)
r.raise_for_status()
for b in r.json()["businesses"]:
print(b["id"], b["alias"], b["name"], b["rating"], b["review_count"])
BIZ = r.json()["businesses"][0]["id"]businesses/search gives you the ID or alias, the overall rating and review_count; that count is the real number of reviews on Yelp, which you’ll compare with what the reviews endpoint returns.
2. Read the reviews (up to 3)
r = requests.get(f"{BASE}/businesses/{BIZ}/reviews", headers=H,
params={"locale": "en_US", "sort_by": "yelp_sort"}, timeout=30)
r.raise_for_status()
data = r.json()
print(data["total"], "reviews on Yelp,", len(data["reviews"]), "returned")
for rev in data["reviews"]:
print(rev["rating"], rev["user"]["name"], rev["time_created"], rev["text"], rev["url"])Each review has rating, text (an excerpt of roughly 160 characters), time_created, the user’s name and photo, and url, the link to the full review on Yelp. sort_by accepts yelp_sort or newest. total tells you how many reviews exist; reviews has at most 3 (7 on paid plans). That’s the whole API: there is no pagination, no owner mode, no reply.
3. Errors and quotas
| Error | Meaning | Fix |
|---|---|---|
401 VALIDATION_ERROR | Key missing or malformed | Authorization: Bearer <key>; keys are per app |
404 BUSINESS_NOT_FOUND | Wrong ID or alias | Use the id or alias from businesses/search |
429 ACCESS_LIMIT_REACHED | Daily quota used up | Cache responses; the free tier is capped per day |
| 403 on a review field | Field not in your plan | Compare plans in Yelp’s portal |
Cache what you read: reviews change slowly and every call counts against the quota.
4. When 3 excerpts aren’t enough
- Display on your site: the 3 excerpts with Yelp’s logo and the link are exactly what Yelp intends. Yelp’s display guidelines allow this.
- Every review of a business you own: Prisma reads the public reviews of the Yelp page you connect (no login shared) on a schedule and returns them in the same JSON as Google, Tripadvisor and 50+ other platforms, with each review’s URL so you answer on Yelp. Read-only; no replies, because Yelp offers none.
- Competitor research: scraping APIs (Outscraper, SerpApi) do that per request. Not what Prisma does.
H = {"Authorization": f"Bearer {os.environ['PRISMA_API_KEY']}"}
r = requests.get("https://api.prismareviews.com/v1/reviews", headers=H, params={"platform": "yelp", "limit": 100}, timeout=30)
for rev in r.json()["data"]:
print(rev["rating"], rev["author"], rev["text"], rev["url"])Connecting a Yelp page: POST /v1/connections with platform: "yelp" and the listing_url of the business page; details on Connections. Yelp page reads are paid on Prisma’s side, so Yelp is included from the Beam plan up, or on Spark with a read pack; see Pricing.
FAQ
How many reviews does the Yelp API return in Python?
Up to 3 review excerpts per business on the free tier, truncated to about 160 characters, with a link to the full review on Yelp. Paid plans raise it to 7. There is no endpoint that returns all reviews, even for the business owner.
Can I reply to Yelp reviews through the API?
No. Yelp has no reply endpoint for third parties. Owners reply in Yelp for Business. Prisma returns each Yelp review with its URL so you answer there.
Is the Yelp API free?
There is a free tier with a daily call quota and the 3-review limit; higher tiers are paid. Check Yelp’s developer portal for the current plans.
Every Yelp review of the businesses you own, next to Google's.
2 locations free. Test keys return sample reviews from every platform.