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 JavaScript
node --version # 18 or newer: fetch is built in, nothing to install
Call Yelp review history in a date window API from JavaScript
POST /v1/yelp/businesses/{business}/reviews/history. Save this as main.mjs and run node main.mjs. It reads the items in reviews and prints text and rating for each.
// main.mjs: Node.js 18+, no dependencies
const url = new URL('https://api.groundsocial.dev/v1/yelp/businesses/katzs-delicatessen-new-york/reviews/history')
const res = await fetch(url, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({"since":"2026-10-01","max_reviews":200}),
signal: AbortSignal.timeout(60_000),
})
if (!res.ok) {
const { error } = await res.json()
throw new Error(`${error.code}: ${error.hint ?? error.message}`)
}
const data = await res.json()
for (const item of data.reviews) {
console.log(item.text, item.rating)
}
console.log('credits charged:', res.headers.get('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.
async function call(url, init = {}, attempt = 0) {
const res = await fetch(url, {
...init,
headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}`, ...init.headers },
signal: AbortSignal.timeout(60_000),
})
if (res.ok) return res.json()
const { error } = await res.json()
// Branch on error.code (stable); error.hint says what to do next.
if (error.retryable && attempt < 2) {
const wait = Number(res.headers.get('retry-after') ?? 2)
await new Promise((r) => setTimeout(r, wait * 1000))
return call(url, init, attempt + 1)
}
throw Object.assign(new Error(error.hint ?? error.message), { code: error.code })
}| 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 Python, TypeScript, Go, PHP, cURL.
- Yelp review history in a date window API reference: every field and status code.
- Yelp tutorials and all JavaScript tutorials.
- Yelp API: every endpoint and price.
- How to scrape reviews of a Yelp business with JavaScript: 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 JavaScript: 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.