# Yellow Pages Business Profile API Documentation

Get one public Yellow Pages business by the id from the search: contacts, e-mail when public, categories, services, rating, address, coordinates, weekly hours, payment methods and full-size images. Costs 9 credits per request. Failed requests are free.

- **Documentation:** [https://scrappa.co/docs/yellowpages-api/yellowpages_business](https://scrappa.co/docs/yellowpages-api/yellowpages_business)
- **API group:** Yellow Pages API
- **Endpoint:** `GET https://scrappa.co/api/yellowpages/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 |
| --- | --- | --- | --- |
| `id` | string | Yes | Business id from the search results (the business path). A full Yellow Pages business link is accepted too. Example: /austin-tx/mip/clarke-kent-plumbing-10674347. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/yellowpages/business?id=%2Faustin-tx%2Fmip%2Fclarke-kent-plumbing-10674347"
```

## Example response

```json
{
    "success": true,
    "data": {
        "business": {
            "id": "/austin-tx/mip/clarke-kent-plumbing-10674347",
            "ypid": "10674347",
            "name": "Clarke Kent Plumbing",
            "url": "https://www.yellowpages.com/austin-tx/mip/clarke-kent-plumbing-10674347",
            "claimed": true,
            "description": "Regardless of when you call us, you will always get a real person.",
            "categories": [
                "Plumbers",
                "Plumbing-Drain & Sewer Cleaning"
            ],
            "rating": 3,
            "review_count": 15,
            "address": {
                "street": "1408 W Ben White Blvd",
                "city": "Austin",
                "region": "TX",
                "postal_code": "78704",
                "formatted": "1408 W Ben White Blvd, Austin, TX 78704"
            },
            "coordinates": {
                "lat": 30.228342,
                "lon": -97.78136
            },
            "phone": "(512) 766-0970",
            "other_phones": [],
            "email": "admin@clarkekentplumbing.com",
            "website": "http://www.clarkekentplumbing.com",
            "hours": [
                {
                    "day": "monday",
                    "opens": "09:00",
                    "closes": "17:00"
                }
            ],
            "open_status": "closed now",
            "years_in_business": 40,
            "founded": "1986",
            "payment_methods": [
                "cash",
                "visa",
                "check"
            ],
            "services": [
                "Drain Cleaning",
                "Water Heaters"
            ],
            "amenities": [
                "FAST & SAME DAY EMERGENCY SERVICE"
            ],
            "languages": [
                "Spanish"
            ],
            "social_links": [
                "https://www.facebook.com/Clarke-Kent-Plumbing-Inc-140942559358301/"
            ],
            "images": [
                "https://i4.ypcdn.com/blob/f4836299151475e05471929ce4083a3802453e39"
            ]
        }
    },
    "meta": {
        "endpoint_family": "business_detail",
        "billable": true,
        "credits": 9
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The id is missing or not a Yellow Pages business id. This response is not billable. |
| 404 | Business Not Found | No business has this id. This response is not billable. |
| 502 | Upstream Unavailable | Yellow Pages did not answer with usable data. This response is not billable. Retry later. |

## 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)
