Costco API endpoint
Returns Costco category slugs and product counts relevant to an optional search term, each slug usable directly with GET /costco/search's category filter. Public data sourced from Costco's own search backend.
/costco/categoriesQuery parameters:
query (optional) — search text to scope the returned categories to,
e.g. refrigerator surfaces refrigerator-related subcategories. Omit
for Costco's broadest available category breakdown.Notable response behavior:
name is derived by title-casing each category slug's
hyphen-separated words (e.g. compact-refrigerators ->
"Compact Refrigerators"), confirmed to reproduce Costco's own
category display text.| Field | Filled in, of 50 checked | Values in the sample |
|---|---|---|
| slug | 50 | |
| name | 50 | “Appliances” and 49 other values |
| count | 50 | 4 to 408, median 13 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| query | string | No | Search text to scope the returned categories to, e.g. \ | refrigerator | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/costco/categories?query=coffee" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "refrigerator",
"categories": [
{
"slug": "compact-refrigerators",
"name": "Compact Refrigerators",
"count": 8
},
{
"slug": "french-door-refrigerators",
"name": "French Door Refrigerators",
"count": 54
}
]
}
}Request schema
No body schema
Response schema
#/definitions/costco.categoriesResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | costco.CategoriesResponse | No | ||||
| data.categories | array | No | ||||
| data.categories[].count | integer | No | ||||
| data.categories[].name | string | No | ||||
| data.categories[].slug | string | No | ||||
| data.query | string | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 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/costco/categories?query=coffee" \
-H "x-api-key: $CRAWLORA_API_KEY"