# Yelp Business Details API Documentation

Retrieve one public Yelp business by its alias or business id: name, canonical alias and id, public url, star rating, review count, price level, categories, address, phone, website, opening hours per weekday, amenities the business offers and the photo count. An alias that Yelp has renamed resolves to the current business and returns the current alias.

- **Documentation:** [https://scrappa.co/docs/yelp-api/yelp_business](https://scrappa.co/docs/yelp-api/yelp_business)
- **API group:** Yelp API
- **Endpoint:** `GET https://scrappa.co/api/yelp/business`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `business` | string | Yes | Yelp business alias (the last part of the yelp.com/biz URL) or the 22 character business id. Example: gary-danko-san-francisco. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/yelp/business?business=gary-danko-san-francisco"
```

## Example response

```json
{
    "success": true,
    "data": {
        "business": {
            "encid": "WavvLdfdP6g8aZTtbBQHTw",
            "alias": "gary-danko-san-francisco",
            "name": "Gary Danko",
            "url": "https://www.yelp.com/biz/gary-danko-san-francisco",
            "summary": "Fine dining with customizable menus and a romantic ambiance.",
            "rating": 4.5,
            "review_count": 6148,
            "price": "$$$$",
            "categories": [
                {
                    "alias": "newamerican",
                    "title": "New American"
                },
                {
                    "alias": "french",
                    "title": "French"
                }
            ],
            "address": {
                "line1": "800 N Point St",
                "city": "San Francisco",
                "region": "CA",
                "country": "US",
                "formatted": "800 N Point St, San Francisco, CA 94109"
            },
            "phone": "(406) 626-8866",
            "website": "http://garydanko.com",
            "hours": [
                {
                    "day": "Mon",
                    "hours": "5:00 PM - 10:00 PM"
                },
                {
                    "day": "Tue",
                    "hours": "Closed"
                }
            ],
            "amenities": [
                "Takes reservations",
                "Walk-ins welcome",
                "Wheelchair accessible"
            ],
            "is_claimed": true,
            "photo_count": 14880
        }
    },
    "meta": {
        "endpoint_family": "business_detail",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required query parameter is missing or invalid. This response is not billable. |
| 404 | Resource Not Found | The requested Yelp business does not exist. This response is not billable. |
| 502 | Invalid Source Response | The upstream answered with a shape that no longer matches the documented contract. This response is not billable. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
