# Yodobashi Category Tree API Documentation

Returns the category menu tree the site embeds in its public pages: category and maker ids, labels, query strings and the id path. Use a category id in the search endpoint. This is a public id source, not a product feed. Failed requests (404, 422, 503 and transport errors) are never billed. A valid answer with zero rows is a successful, billable 200. Each request makes one upstream lookup.

- **Documentation:** [https://scrappa.co/docs/yodobashi-api/yodobashi_categories](https://scrappa.co/docs/yodobashi-api/yodobashi_categories)
- **API group:** Yodobashi API
- **Endpoint:** `GET https://scrappa.co/api/yodobashi/categories`

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

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/yodobashi/categories"
```

## Example response

```json
{
    "success": true,
    "data": {
        "count": 2,
        "categories": [
            {
                "id": "19055",
                "name": "\u30aa\u30fc\u30c7\u30a3\u30aa",
                "query_string": "19055/",
                "path": [
                    "19055"
                ]
            },
            {
                "id": "19063",
                "name": "\u30d8\u30c3\u30c9\u30db\u30f3",
                "query_string": "19055/19063",
                "path": [
                    "19055",
                    "19063"
                ]
            }
        ]
    },
    "meta": {
        "endpoint_family": "categories",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The product, page or id does not exist on the site. This response is not billable. |
| 422 | Validation Error | A parameter is invalid: a SKU that is not 18 digits, a maker id that is not 10 digits, a price range or page out of range, or a sort parameter (price sort is not supported). This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. Failed requests are never billed. |

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