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 Go
go mod init example
Call Yelp review history in a date window API from Go
POST /v1/yelp/businesses/{business}/reviews/history. Save this as main.go and run go run main.go. It reads the items in reviews and prints text and rating for each.
package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"time"
)
// The fields this program reads, as the recorded response has them.
type Page struct {
Reviews []struct {
Text string `json:"text"`
Rating float64 `json:"rating"`
} `json:"reviews"`
}
var client = &http.Client{Timeout: 60 * time.Second}
func fetch() (*Page, error) {
req, err := http.NewRequest("POST", "https://api.groundsocial.dev/v1/yelp/businesses/katzs-delicatessen-new-york/reviews/history", bytes.NewReader([]byte(`{"since":"2026-10-01","max_reviews":200}`)))
if err != nil {
return nil, err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("GROUNDSOCIAL_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
var e struct {
Error struct {
Code string `json:"code"`
Hint string `json:"hint"`
Retryable bool `json:"retryable"`
} `json:"error"`
}
json.NewDecoder(res.Body).Decode(&e)
return nil, fmt.Errorf("%s: %s", e.Error.Code, e.Error.Hint)
}
var page Page
if err := json.NewDecoder(res.Body).Decode(&page); err != nil {
return nil, err
}
return &page, nil
}
func main() {
page, err := fetch()
if err != nil {
log.Fatal(err)
}
for _, item := range page.Reviews {
fmt.Println(item.Text, item.Rating)
}
}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.
// fetch returns the API error as "code: hint". To retry the retryable ones
// (rate_limited, upstream_timeout), wait for Retry-After and call again:
for attempt := 0; attempt < 3; attempt++ {
page, err = fetch()
if err == nil {
break
}
time.Sleep(2 * time.Second)
}| 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, JavaScript, TypeScript, PHP, cURL.
- Yelp review history in a date window API reference: every field and status code.
- Yelp tutorials and all Go tutorials.
- Yelp API: every endpoint and price.
- How to scrape reviews of a Yelp business with Go: 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 Go: 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.