SparkFun API endpoint
Lists SparkFun's top-level browse categories. Each has an id, name, `url_key` and `url_path`. Pass a category's `url_key` to `sparkfun-category` to browse it. Takes no parameters, and the set follows the live storefront catalogue.
/sparkfun/categoriesLists public SparkFun top-level browse categories. Use a category's url_key with sparkfun-category.
Query parameters: none.
Notable response behavior: categories are returned with their public URL key and URL path; availability can change with the storefront catalog.
| Field | Filled in, of 17 checked | Values in the sample |
|---|---|---|
| id | 17 | |
| name | 17 | “All Categories” and 16 other values |
| url_key | 17 | |
| url_path | 17 | “all-categories” and 16 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sparkfun/categories" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"categories": [
{
"id": "MTAwMw==",
"name": "Development Boards",
"url_key": "development-boards",
"url_path": "development-boards"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sparkfun.categoriesResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sparkfun.CategoriesResponse | No | ||||
| data.categories | array | No | Category record, 4 fields: id, name, url_key, url_path. Described under SparkFun Product API. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 429 | Too Many Requests | #/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/sparkfun/categories" \
-H "x-api-key: $CRAWLORA_API_KEY"