Shopify API endpoint
Returns one product from any Shopify storefront, given the store URL and the product handle: title, description, product type, tags, price and compare-at price, availability, options, images, and each variant with its own price, availability and barcode. Prices are in decimal currency units; an unknown handle returns `404`.
/shopify/products/{handle}Path parameters:
handle: required. Product handle, such as mens-tree-runner-nz-natural-white.Query parameters:
url: required. Full Shopify storefront URL, using http or https. Localhost, private network, link-local, and credentialed URLs are rejected.Notable response behavior:
404 when Shopify returns not found.transport_mode: "ssr_embedded", and the product may include additive fields only available from this source: colour, canonical_colour, discount_percentage, rating, rating_count, collection_tags, labels, and per-variant inventory_quantity. transport_mode is omitted entirely for other stores. A product for which no detail data is available returns an upstream error.transport_mode allowed values: ssr_embedded (only ever present, never any other value; omitted for the classic transport).
| Field | Filled in, of 14 checked | Values in the sample |
|---|---|---|
| id | 14 | |
| title | 14 | 8 to 15, median 11 |
| sku | 14 | |
| price | 14 | 100 |
| available | 14 | true in 5 of 14 |
| option1 | 14 | 8 to 15, median 11 |
| requires_shipping | 14 | true in 14 of 14 |
| taxable | 14 | true in 14 of 14 |
| barcode | 14 | 196,942,228,609 to 196,942,257,326, median 196,942,228,661 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| handle (path) | string | Yes | Product handle | mens-wool-runners | |
| url | string | Yes | Shopify storefront URL | https://www.allbirds.com | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/shopify/products/mens-wool-runners?url=https%3A%2F%2Fwww.allbirds.com" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"store_url": "https://www.allbirds.com",
"source_url": "https://www.allbirds.com",
"product": {
"id": "7188363542608",
"handle": "mens-tree-runner-nz-natural-white",
"title": "Men's Tree Runner NZ - Natural White (Natural White Sole)",
"price": 100,
"images": [
{
"url": "https://cdn.shopify.com/example.jpg"
}
]
}
}
}Request schema
No body schema
Response schema
#/definitions/shopify.productResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | shopify.ProductResponse | No | ||||
| data.product | object | No | The requested product with its variants, options and images. | |||
| data.product.available | boolean | No | Whether at least one variant is available to buy. | |||
| data.product.canonical_colour | string | No | black | Main colour name the storefront groups the product under, for example `black`. | ||
| data.product.collection_tags | array | No | Collections the product is listed in, as the storefront labels them. | |||
| data.product.colour | string | No | black | The fields below are only populated when the product was resolved via the embedded-SSR-JSON fallback transport (see ssr_fallback.go) and the source page exposed this data; they are additive and never populated for classic-store responses. | ||
| data.product.compare_at_price | number | No | 120 | Original price before discount, in the store's currency. The highest compare-at price across variants. | ||
| data.product.condition | string | No | Excellent | Condition is only populated for resale-marketplace search results (Fashionphile's AlgoliaSearch, Rebag's StorefrontSearch -- see search.go) whose catalog data exposes a condition grade. Never populated for any other brand or endpoint in this family. | ||
| data.product.created_at | string | No | Time the record was created, as Shopify returns it. | |||
| data.product.description | string | No | Product description as plain text. | |||
| data.product.discount_percentage | number | No | 20 | Discount currently applied to the product, as a percentage. | ||
| data.product.featured_image | string | No | URL of the product's main image. | |||
| data.product.handle | string | No | mens-wool-runners | URL slug of the product, for example `mens-wool-runners`. | ||
| data.product.id | string | No | 6616124981328 | Shopify product id. | ||
| data.product.images | array | No | Images of the product, in the storefront's order. | |||
| data.product.images[].alt | string | No | Product image | Alternative text of the image. | ||
| data.product.images[].created_at | string | No | Time the record was created, as Shopify returns it. | |||
| data.product.images[].height | integer | No | 1600 | Image height in pixels. | ||
| data.product.images[].id | string | No | 36411373027408 | Shopify image id. | ||
| data.product.images[].position | integer | No | 1 | Position of the image in the product's image list, starting at 1. | ||
| data.product.images[].updated_at | string | No | Time the record was last updated, as Shopify returns it. | |||
| data.product.images[].url | string | No | https://cdn.shopify.com/s/files/1/example.jpg | URL of the image file. | ||
| data.product.images[].variant_ids | array | No | Ids of the variants this image is attached to. | |||
| data.product.images[].width | integer | No | 1600 | Image width in pixels. | ||
| data.product.labels | array | No | new | Badges the storefront shows on the product, for example `new`. | ||
| data.product.options | array | No | Options the product varies by, such as size or colour. | |||
| data.product.options[].name | string | No | Size | Option name, for example `Size`. | ||
| data.product.options[].position | integer | No | 1 | Position of the option on the product, starting at 1. | ||
| data.product.options[].values | array | No | Values the option can take, for example `S` or `M`. | |||
| data.product.price | number | No | 98 | Current price in the store's currency. The lowest variant price when variants are listed. | ||
| data.product.product_type | string | No | Shoes | Product type set by the merchant, for example `Shoes`. | ||
| data.product.published_at | string | No | Time the record was published, as Shopify returns it. | |||
| data.product.rating | number | No | 4.2 | Average customer rating shown by the storefront. | ||
| data.product.rating_count | integer | No | 1549 | Number of customer ratings behind `rating`. | ||
| data.product.tags | array | No | Tags the merchant attached to the product. | |||
| data.product.title | string | No | Men's Wool Runners | Product name as shown on the storefront. | ||
| data.product.updated_at | string | No | Time the record was last updated, as Shopify returns it. | |||
| data.product.url | string | No | https://www.allbirds.com/products/mens-wool-runners | Storefront page URL of the product. | ||
| data.product.variants | array | No | Purchasable variants of the product, such as each size and colour. | |||
| data.product.variants[].available | boolean | No | Whether this variant is currently available to buy. | |||
| data.product.variants[].barcode | string | No | Barcode of the variant, such as a UPC or EAN. | |||
| data.product.variants[].compare_at_price | number | No | 120 | Original price before discount, in the store's currency. | ||
| data.product.variants[].created_at | string | No | Time the record was created, as Shopify returns it. | |||
| data.product.variants[].featured_image | string | No | URL of the image shown for this variant. | |||
| data.product.variants[].grams | integer | No | 400 | Weight of the variant in grams. | ||
| data.product.variants[].id | string | No | 34761278160941 | Shopify variant id. | ||
| data.product.variants[].inventory_quantity | integer | No | 24 | InventoryQuantity is only populated via the embedded-SSR-JSON fallback transport (see ssr_fallback.go); classic-store responses never set it. | ||
| data.product.variants[].option1 | string | No | Value of the product's first option for this variant, for example a size. | |||
| data.product.variants[].option2 | string | No | Value of the product's second option for this variant. | |||
| data.product.variants[].option3 | string | No | Value of the product's third option for this variant. | |||
| data.product.variants[].position | integer | No | 1 | Position of the variant in the product's variant list, starting at 1. | ||
| data.product.variants[].price | number | No | 98 | Current price of the variant in the store's currency. | ||
| data.product.variants[].product_id | string | No | 6616124981328 | Shopify id of the product the variant belongs to. | ||
| data.product.variants[].requires_shipping | boolean | No | Whether the variant is a physical item that needs shipping. | |||
| data.product.variants[].sku | string | No | A123 | Merchant stock keeping unit code of the variant. | ||
| data.product.variants[].taxable | boolean | No | Whether tax is charged on the variant. | |||
| data.product.variants[].title | string | No | Natural Black / 10 | Variant name, for example `Natural Black / 10`. | ||
| data.product.variants[].updated_at | string | No | Time the record was last updated, as Shopify returns it. | |||
| data.product.vendor | string | No | Allbirds | Brand or vendor name set by the merchant. | ||
| data.source_url | string | No | https://www.allbirds.com | URL the data was read from. | ||
| data.store_url | string | No | https://www.allbirds.com | Base URL of the Shopify storefront that was queried. | ||
| data.transport_mode | string | No | ssr_embedded | ssr_embedded | Set only for headless storefronts that do not expose Shopify's standard catalogue; the value is `ssr_embedded`. Omitted otherwise. | |
| 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/shopify/products/mens-wool-runners?url=https%3A%2F%2Fwww.allbirds.com" \
-H "x-api-key: $CRAWLORA_API_KEY"