SparkFun API endpoint
Returns one SparkFun product by `sku`, for example `DEV-18158`: name, URL, stock status, current minimum price and currency, main image and media gallery, categories, and a cleaned short description. `recommendations` lists related, upsell or crosssell products when available. An unknown SKU returns 404.
/sparkfun/productReturns public SparkFun product metadata for one SKU, including stock status, current minimum price, images, categories, a cleaned short description, and related products.
Query parameters:
sku (required) — SparkFun product SKU, for example DEV-18158.Notable response behavior: an unknown SKU returns 404. Product URLs point to the public SparkFun product page. recommendations, when available, contains de-duplicated product summaries; each relation is one of related, upsell, or crosssell.
| Field | Filled in, of 12 checked | Values in the sample |
|---|---|---|
| relation | 12 | related (10), upsell (2) |
| product | 12 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| sku | string | Yes | SparkFun product SKU | DEV-18158 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sparkfun/product?sku=DEV-18158" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"sku": "DEV-18158",
"name": "SparkFun RedBoard Plus",
"url": "https://www.sparkfun.com/sparkfun-redboard-plus.html",
"stock_status": "IN_STOCK",
"price": {
"value": 29.5,
"currency": "USD"
}
}
}Request schema
No body schema
Response schema
#/definitions/sparkfun.productResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sparkfun.Product | No | ||||
| data.categories | array | No | ||||
| data.categories[].id | string | No | ||||
| data.categories[].name | string | No | ||||
| data.categories[].url_key | string | No | ||||
| data.categories[].url_path | string | No | ||||
| data.description | string | No | ||||
| data.image | sparkfun.Image | No | ||||
| data.image.label | string | No | ||||
| data.image.url | string | No | ||||
| data.media | array | No | ||||
| data.media[].label | string | No | ||||
| data.media[].url | string | No | ||||
| data.name | string | No | ||||
| data.price | sparkfun.Price | No | ||||
| data.price.currency | string | No | ||||
| data.price.value | number | No | ||||
| data.recommendations | array | No | ||||
| data.recommendations[].product | sparkfun.Product | No | ||||
| data.recommendations[].relation | string | No | ||||
| data.sku | string | No | ||||
| data.stock_status | string | No | ||||
| data.url | string | No | ||||
| 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 |
| 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/product?sku=DEV-18158" \
-H "x-api-key: $CRAWLORA_API_KEY"