# List Amazon Best Seller categories (v1)

Without `category`, lists the departments of `market` with their slugs. With `category` (and `node`), returns that category's name, parent categories and subcategories with their node ids. An unknown category returns `data: null`.

- Platform: Amazon
- Request: `GET https://api.toolzerhub.com/v1/amazon/categories`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/amazon/get-amazon-best-seller-categories

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `category` | query | no | string | Department slug as it appears in the store's Best Sellers URL, such as electronics or books. Slugs differ by store (ce-de is Electronics on amazon.de); /v1/amazon/categories lists them. |
| `node` | query | no | string | Browse node id of a subcategory inside category, from subcategories[].node. Omit for the whole department. |
| `market` | query | no | string | Amazon store, by country code: US is amazon.com, GB amazon.co.uk, DE amazon.de, JP amazon.co.jp. Default: US. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/amazon/categories" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
