Yelp business endpoint

GEThttps://api.scrapereviews.com/v1/yelp/businesses/{business_id}1 credit

The Yelp business endpoint returns a business as a unified Entity of type business: name, Yelp URL, photo, rating out of 5, number of reviews, how the reviews split by star, categories and country.

Yelp-only fields are in extra: alias and Yelp id, address, city, region, postal code and coordinates, public phone number, price range, neighbourhoods and the number of reviews per language.

Any country’s Yelp businesses are served. The id is the alias at the end of the Yelp URL; find it from a name with the search endpoint.

Parameters

Path parameters

ParameterTypeDescription
business_idstringThe alias at the end of the Yelp URL (gary-danko-san-francisco) or the Yelp id (extra.encid)

This endpoint takes no parameters.

Authenticate with your API key in the X-API-Key header or as Authorization: Bearer (see authentication).

Example request

curl "https://api.scrapereviews.com/v1/yelp/businesses/gary-danko-san-francisco" \
  -H "X-API-Key: sr_your_api_key"

Response

Shape
{ "data": Entity, "meta": BaseMeta }
Example (shortened)
{
  "data": {
    "source": "yelp", "type": "business", "id": "gary-danko-san-francisco", "handle": "gary-danko-san-francisco",
    "name": "Gary Danko", "url": "https://www.yelp.com/biz/gary-danko-san-francisco",
    "rating": 4.5, "rating_scale": 5, "review_count": 6160,
    "rating_distribution": { "1": 124, "2": 218, "3": 484, "4": 1100, "5": 4239 },
    "categories": [{ "id": "newamerican", "name": "New American", "is_primary": true }], "country": "US",
    "extra": { "alias": "gary-danko-san-francisco", "encid": "WavvLdfdP6g8aZTtbBQHTw", "city": "San Francisco",
               "region": "CA", "price_range": "$$$$", "review_languages": { "en": 6162, "zh": 3 } }
  },
  "meta": { "credits_used": 1, "cache_hit": false }
}

Every field is described in the response models. Successful responses also carry the X-Credits-Used header.

Cost

Business details cost 1 credit per call. Answers are cached for 24 hours; a cached answer costs the same and is marked meta.cache_hit = true.

Only successful calls are billed: every error costs 0 credits. You get 30 free calls every month; see pricing for credit packs.

Errors

Errors come with an HTTP status and this JSON body: branch on detail.error, show detail.message to humans.

Example error
{
  "detail": {
    "error": "entity_not_found",
    "message": "No Yelp business found for 'no-such-business'"
  }
}
HTTPerrorMeaning
400invalid_parameterA parameter is invalid: bad domain, stars, language or date, missing query, limit out of range...
401missing_api_keyNo API key in X-API-Key or Authorization: Bearer.
401invalid_api_keyThe key does not exist or has been revoked.
402insufficient_creditsYour credit balance is 0.
404entity_not_foundNo location, property, business or product with this id on Tripadvisor, Booking.com, Yelp, G2 or Capterra (the source is named in the message).
429rate_limit_exceededToo many requests per minute.
429insufficient_credits_retry_laterThe balance ran out on recent calls and the key is cooling down.
502upstream_changedThe source (Trustpilot, App Store or Google Play, named in the message) changed its format and the response could not be read.
503upstream_blockedThe source is temporarily blocking requests.
503feature_disabledThe endpoint is temporarily switched off by us (detail.feature names it). The call is not billed.
504upstream_timeoutThe source did not answer in time.

What to do for each code: error handling.

Use cases

  • Follow the rating and the star distribution of your locations and of competitors.
  • Enrich a list of local businesses with address, coordinates, phone and price range.

Related endpoints

  • Yelp reviews GET /v1/yelp/businesses/{business_id}/reviews: Reviews of a Yelp business with sort, star, text, language and date filters, and the owner’s replies.
  • Yelp search GET /v1/yelp/businesses/search: Yelp businesses matching a name near a location (Yelp’s search suggestions).

ScrapeReviews is an independent service and is not affiliated with or endorsed by Yelp.