Before you start
- Get an API keySign up for 100 free credits, no card. Keys start with
gs_live_. - Put it in the environmentEvery example reads it from
GROUNDSOCIAL_API_KEY:export GROUNDSOCIAL_API_KEY=gs_live_… - Set up Python
pip install requests
Call Yelp review history in a date window API from Python
POST /v1/yelp/businesses/{business}/reviews/history. Save this as main.py and run python main.py. It reads the items in reviews and prints text and rating for each.
import os
import requests
API = "https://api.groundsocial.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"}
res = requests.post(
f"{API}/v1/yelp/businesses/katzs-delicatessen-new-york/reviews/history",
json={"since": "2026-10-01", "max_reviews": 200},
headers=HEADERS,
timeout=60,
)
res.raise_for_status()
data = res.json()
for item in data["reviews"]:
print(item.get("text"), item.get("rating"))
print("credits charged:", res.headers["x-credits-charged"])The response
A real Yelp response to this call, recorded from the live API on 27 Nov 2026 and shortened for display: arrays keep their first items and … marks every cut. The recorded page had 61 items in reviews. Live calls return current data in the same shape.
{
"business": {
"id": "V7lXZKBDzScDeGB8JmnzSA",
"alias": "katzs-delicatessen-new-york",
"name": "Katz's Delicatessen",
"url": "https://www.yelp.com/biz/katzs-delicatessen-new-york",
"rating": 4.1,
"review_count": 17151,
"rating_distribution": {
"1": 1076,
"2": 961,
"3": 1910,
"4": 4426,
"5": 8783
},
"possible_languages": [
{
"language": "en",
"count": 16961
},
{
"language": "de",
"count": 62
},
"… 12 more"
]
},
"total": 17151,
"since": "2026-10-01T00:00:00.000Z",
"until": null,
"reviews": [
{
"id": "0oYZ_bfD_WFWjPf2NKth5A",
"url": "https://www.yelp.com/biz/katzs-delicatessen-new-york?hrid=0oYZ_bfD_WFWjPf2NKth5A",
"text": "It is truly a fun place with great food The staff was so nice and so so many people.",
"language": "en",
"rating": 5,
"time_created": "2026-11-26T13:46:02-05:00",
"user": {
"id": "taaWY9muysp07O4ULgWyfA",
"name": "Tami W.",
"profile_url": "https://www.yelp.com/user_details?userid=taaWY9muysp07O4ULgWyfA",
"image_url": null,
"location": "Newberg, United States",
"review_count": 0,
"friend_count": 0,
"photo_count": 2,
"elite_year": null
},
"reactions": {
"helpful": 0,
"thanks": 0,
"love_this": 0,
"oh_no": 0
},
"photos": [],
"business_reply": null,
"previous_review_count": 0,
"is_first_review": false,
"check_in_count": 0
},
{
"id": "niFSZ3OxWf9Coqlv97HVJg",
"url": "https://www.yelp.com/biz/katzs-delicatessen-new-york?hrid=niFSZ3OxWf9Coqlv97HVJg",
"text": "Always delicious! Don't be scared off by the long line down the block, waited about 20-25 minutes to get it. Cutters ar…",
"language": "en",
"rating": 5,
"time_created": "2026-11-26T09:37:16-05:00",
"user": {
"id": "qMD11uJx_0hLZIrPKDS2tQ",
"name": "Michael T.",
"profile_url": "https://www.yelp.com/user_details?userid=qMD11uJx_0hLZIrPKDS2tQ",
"image_url": "https://s3-media0.fl.yelpcdn.com/photo/qOI2H-iSfK3_nbD-VkQUYg/60s.jpg",
"location": "Rocklin, United States",
"review_count": 11,
"friend_count": 12,
"photo_count": 8,
"elite_year": null
},
"reactions": {
"helpful": 0,
"thanks": 0,
"love_this": 0,
"oh_no": 0
},
"photos": [
{
"id": "Xx7js7Q6r0BuN_NB0gzk9A",
"url": "https://s3-media0.fl.yelpcdn.com/bphoto/Xx7js7Q6r0BuN_NB0gzk9A/348s.jpg",
"caption": "Cutter lines",
"width": 2000,
"height": 1500,
"uploaded_at": null,
"author": null
},
{
"id": "P9W2sv-8PYd27NXKUaGGkw",
"url": "https://s3-media0.fl.yelpcdn.com/bphoto/P9W2sv-8PYd27NXKUaGGkw/348s.jpg",
"caption": "Waiting to eat",
"width": 1500,
"height": 2000,
"uploaded_at": null,
"author": null
},
"… 5 more"
],
"business_reply": null,
"previous_review_count": 0,
"is_first_review": false,
"check_in_count": 0
},
"… 59 more"
],
"is_complete": true,
"pages_read": 2
}Top-level fields
| Field | Type | Description |
|---|---|---|
business | YelpBusinessRef | – |
total | integer | All reviews in the business’s recommended feed. |
since | string | null | – |
until | string | null | – |
reviews | YelpReview[] | Newest first. |
is_complete | boolean | true when every review in the window was read; false when max_reviews cut it short. |
pages_read | integer | – |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business (required) | path | string | The business: its alias (the part after /biz/ in its link), its Yelp id, or the link itself (any Yelp site), URL-encoded. Example: katzs-delicatessen-new-york. |
It takes a JSON body; the example sends {"since":"2026-10-01","max_reviews":200}. The endpoint reference lists every body field.
Errors and retries
Every error is JSON with error.code (stable: branch on it), message, hint (what to do next), docs_url and retryable. A failed call is never charged. Retry only when retryable is true, after the Retry-After header.
import os, time
import requests
def call(url, **kwargs):
headers = {"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"}
for attempt in range(3):
res = requests.post(url, headers=headers, timeout=60, **kwargs)
if res.ok:
return res.json()
err = res.json()["error"]
# Branch on the stable code; the hint says what to do next.
if err["retryable"] and attempt < 2:
time.sleep(int(res.headers.get("Retry-After", 2)))
continue
raise RuntimeError(f"{err['code']}: {err.get('hint', err['message'])}")
data = call("https://api.groundsocial.dev/v1/yelp/businesses/katzs-delicatessen-new-york/reviews/history", json={"since": "2026-10-01", "max_reviews": 200})| Status | Meaning |
|---|---|
200 | The reviews in the window. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No Yelp business by that alias, id or link. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Yelp is temporarily unavailable. Retryable; nothing was charged. |
Every error code and what to do about it.
Pricing
| Cost | |
|---|---|
| Per call | 10 credits per call |
| 1,000 calls | $10.00 on the starter pack, $4.00 at volume |
| No key (MPP or x402) | $0.10 per call |
| Failed call | Refunded, never charged |
Every response has x-credits-charged and x-credits-remaining headers. Credits never expire. Packs and calculator.
From an AI agent (MCP)
The same call is the yelp_business_reviews_history tool on the hosted MCP server, so Claude, Cursor or any MCP client can make it without code. Add the server once:
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcpThen ask for it in words (“Every review of a Yelp business in a date window, newest first (up to 500)”), or call the tool directly:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "yelp_business_reviews_history",
"arguments": {
"business": "katzs-delicatessen-new-york",
"since": "2026-10-01",
"max_reviews": 200
}
}
}MCP setup for Claude Desktop, Cursor, VS Code and ChatGPT.
Use Yelp business reviews_history in a pipeline
Every recommended review of a business in a date window, newest first, in one call: Yelp’s feed is read newest-first, 49 a page, until a review is older than since or max_reviews (default 200, at most 500) is reached; is_complete says whether the window was read to the end. languages picks the review languages (default the business’s main one; ["all"] for every language it has).
Keep going
- This call in JavaScript, TypeScript, Go, PHP, cURL.
- Yelp review history in a date window API reference: every field and status code.
- Yelp tutorials and all Python tutorials.
- Yelp API: every endpoint and price.
- How to scrape reviews of a Yelp business with Python: A page of a Yelp business’s reviews (up to 49): sort, star filter, search, language, not-recommended feed.
- How to get a Yelp business with Python: A Yelp business: rating and distribution, categories, price, contact, address, hours, amenities, photos.
Run it on your own data
One key for Yelp and 76 more platforms, over REST or MCP. Free credits on signup, no card.
Yelp is a trademark of its owner. We are not affiliated with or endorsed by it.