SparkFun API endpoint
Searches public SparkFun product data with pagination and dynamic facet filters. Each filter must be `attribute:value`; use values from the response's filters array.
/sparkfun/searchSearches public SparkFun products and returns dynamic filters that can narrow subsequent searches.
Query parameters:
q (required) — product search text, 2 to 200 characters, for example arduino.page (optional) — 1-indexed result page. Defaults to 1; allowed values are 1 through 100.per_page (optional) — products per page. Defaults to 24; allowed values are 1 through 24.filter (optional, repeatable) — a dynamic facet in attribute:value form, for example sf_qwiic_dev_board_type:8417. Use attribute and value pairs returned in filters[]; they are not a fixed enum.Notable response behavior: total: 0 is a valid no-results response. filters[] contains the currently available attributes and values for the search.
| Field | Filled in, of 24 checked | Values in the sample |
|---|---|---|
| sku | 24 | |
| name | 24 | “Arduino Uno - R3” and 23 other values |
| url | 24 | sparkfun.com |
| stock_status | 24 | IN_STOCK in all 24 |
| price | 24 | |
| image | 24 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Product search query | arduino | |
| page | integer | No | One-based result page (1-100) Minimum: 1. Maximum: 100. | ||
| per_page | integer | No | Products per page (1-24) Minimum: 1. Maximum: 24. | ||
| filter | array<string> | No | Repeatable dynamic facet in attribute:value form Repeat this query parameter for multiple values. | sf_qwiic_dev_board_type:8417 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sparkfun/search?q=arduino&page=1" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "arduino",
"page": 1,
"per_page": 24,
"total": 470,
"total_pages": 20,
"products": [
{
"sku": "DEV-10116",
"name": "Arduino Fio",
"stock_status": "IN_STOCK"
}
],
"filters": [
{
"attribute": "price",
"label": "Price",
"options": [
{
"label": "0-5",
"value": "0_5",
"count": 56
}
]
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sparkfun.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sparkfun.SearchResponse | No | ||||
| data.filters | array | No | ||||
| data.filters[].attribute | string | No | ||||
| data.filters[].label | string | No | ||||
| data.filters[].options | array | No | ||||
| data.filters[].options[].count | integer | No | ||||
| data.filters[].options[].label | string | No | ||||
| data.filters[].options[].value | string | No | ||||
| data.page | integer | No | ||||
| data.per_page | integer | No | ||||
| data.products | array | No | Product record, 22 fields: categories, description, image, media, name, price, recommendations, sku, stock_status, url. Described under SparkFun Product API. | |||
| data.query | string | No | ||||
| data.total | integer | No | ||||
| data.total_pages | integer | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 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/search?q=arduino&page=1" \
-H "x-api-key: $CRAWLORA_API_KEY"