Amazon API endpoint
Returns the department and subcategory values amazon-charts accepts for a given chart. Omit department to list a chart's top-level departments; pass a department (and optionally a node) to get that category's own name plus its immediate child categories.
/amazon/charts/categoriesQuery parameters:
chart: required. Chart type. Allowed values: best_sellers, new_releases, most_wished_for.department: optional. Amazon department slug. Example: electronics.node: optional. Numeric browse node id (requires department). Example: 172541.Notable behavior:
department, categories lists the chart's top-level departments (name, department slug, link); each entry's node is empty.department (and optional node), the response's category field names the current category and categories lists its immediate child subcategories, each directly usable as amazon-charts' department/node input.department or node returns a 404-style not-found error rather than an empty list.Example response (no department — top-level departments):
{
"code": 200,
"msg": "OK",
"data": {
"chart": "best_sellers",
"categories": [
{
"name": "Electronics",
"department": "electronics",
"link": "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics/ref=zg_bs_unv_electronics_0_1"
}
]
}
}
Example response (with department — current category plus children):
{
"code": 200,
"msg": "OK",
"data": {
"chart": "best_sellers",
"department": "electronics",
"category": {
"name": "Electronics",
"department": "electronics",
"link": "https://www.amazon.com/gp/bestsellers/electronics"
},
"categories": [
{
"name": "Headphones",
"department": "electronics",
"node": "172541",
"link": "https://www.amazon.com/Best-Sellers-Electronics-Headphones-Earbuds/zgbs/electronics/172541/ref=zg_bs_nav_electronics_1"
}
]
}
}
| Field | Filled in, of 40 checked | Values in the sample |
|---|---|---|
| name | 40 | “Amazon Devices & Accessories” and 39 other values |
| department | 40 | “amazon-devices” and 39 other values |
| link | 40 | amazon.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| chart | string | Yes | Chart type Allowed values: best_sellers, new_releases, most_wished_for. | best_sellers | |
| department | string | No | Amazon department slug | electronics | |
| node | string | No | Numeric browse node id (requires department) | 172541 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/amazon/charts/categories?chart=best_sellers" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"chart": "best_sellers",
"categories": [
{
"name": "Electronics",
"department": "electronics",
"link": "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics/ref=zg_bs_unv_electronics_0_1"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/amazon.chartCategoriesResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | amazon.ChartCategoriesResponse | No | ||||
| data.categories | array | No | ||||
| data.categories[].department | string | No | electronics | |||
| data.categories[].link | string | No | https://www.amazon.com/gp/bestsellers/electronics/172541 | |||
| data.categories[].name | string | No | Headphones & Earbuds | |||
| data.categories[].node | string | No | 172541 | |||
| data.category | amazon.ChartCategory | No | ||||
| data.category.department | string | No | electronics | |||
| data.category.link | string | No | https://www.amazon.com/gp/bestsellers/electronics/172541 | |||
| data.category.name | string | No | Headphones & Earbuds | |||
| data.category.node | string | No | 172541 | |||
| data.chart | string | No | best_sellers | |||
| data.department | string | No | electronics | |||
| data.node | string | No | 172541 | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/amazon/charts/categories?chart=best_sellers" \
-H "x-api-key: $CRAWLORA_API_KEY"