Shopify
Shopify 店铺商品
Shopify 独立站的全部商品,含变体、SKU、价格、折扣、库存和上架时间,可按标题、类型、品牌、价格和上新天数筛选。
API 数据样例
直接查看该接口实际使用的请求体和完整响应结构。
{
"store": "allbirds.com",
"size": 10
}{
"request_id": "90a140e3-2b30-4bdd-992c-d4c83d8efa9b",
"data": {
"products": [
{
"url": "https://allbirds.com/products/womens-recycled-tee-logo",
"tags": [
"allbirds::carbon-score => 5.9",
"allbirds::cfId => color-womens-allgd-ctn-script-tee-heathered-grey"
],
"image": "https://cdn.shopify.com/s/files/1/1104/4168/products/A10700W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Heathered_Grey.png?v=1698185497",
"price": 12,
"title": "Women's Recycled Tee - Logo - Heathered Grey",
"handle": "womens-recycled-tee-logo",
"images": [
"https://cdn.shopify.com/s/files/1/1104/4168/products/A10700W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Heathered_Grey.png?v=1698185497"
],
"on_sale": true,
"vendor": "Allbirds",
"in_stock": true,
"options": [
{
"name": "Size",
"values": [
"XS",
"S"
]
}
],
"currency": "USD",
"price_max": 12,
"variants": [
{
"sku": "A10700W000",
"price": 12,
"title": "XS",
"in_stock": true,
"options": [
"XS"
],
"list_price": 25,
"variant_id": "40260395532368"
},
{
"sku": "A10700W001",
"price": 12,
"title": "S",
"in_stock": false,
"options": [
"S"
],
"list_price": 25,
"variant_id": "40260395565136"
}
],
"list_price": 25,
"product_id": "6864321642576",
"created_at": "2023-08-09T10:02:52.000Z",
"updated_at": "2026-12-01T04:54:10.000Z",
"description": "A soft, easygoing tee that’s all about repping the Allbirds flock. Keeps you comfy in 100% recycled materials blend and graphics printed with water-based ink...",
"product_type": "Apparel",
"published_at": "2026-11-28T00:08:50.000Z"
},
{
"url": "https://allbirds.com/products/womens-recycled-tee-logo-natural-white",
"tags": [
"allbirds::carbon-score => 5.9",
"allbirds::cfId => color-womens-allgd-ctn-script-tee-natural-white"
],
"image": "https://cdn.shopify.com/s/files/1/1104/4168/products/A10709W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Natural_White.png?v=1698185517",
"price": 12,
"title": "Women's Recycled Tee - Logo - Natural White",
"handle": "womens-recycled-tee-logo-natural-white",
"images": [
"https://cdn.shopify.com/s/files/1/1104/4168/products/A10709W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Natural_White.png?v=1698185517"
],
"on_sale": true,
"vendor": "Allbirds",
"in_stock": true,
"options": [
{
"name": "Size",
"values": [
"XS",
"S"
]
}
],
"currency": "USD",
"price_max": 12,
"variants": [
{
"sku": "A10709W000",
"price": 12,
"title": "XS",
"in_stock": true,
"options": [
"XS"
],
"list_price": 25,
"variant_id": "40259210543184"
},
{
"sku": "A10709W001",
"price": 12,
"title": "S",
"in_stock": true,
"options": [
"S"
],
"list_price": 25,
"variant_id": "40259210575952"
}
],
"list_price": 25,
"product_id": "6864244310096",
"created_at": "2023-08-09T01:58:57.000Z",
"updated_at": "2026-12-01T04:54:10.000Z",
"description": "A soft, easygoing tee that’s all about repping the Allbirds flock. Keeps you comfy in 100% recycled materials blend and graphics printed with water-based ink...",
"product_type": "Apparel",
"published_at": "2026-11-28T00:08:45.000Z"
}
],
"has_more": true
}
}可用状态:已开放
该接口已进入 v1 网关、OpenAPI 和订阅权限目录,每次调用消耗 1 个计费单位,查不到数据(
RESULT_NOT_FOUND)也照常计费。
POST /v1/shopify/stores/products
下方请求和响应字段已与当前公开契约核对。
MCP 调用
| 项目 | 内容 |
|---|---|
| MCP Code | shopify_stores_products |
快速调用
先创建 API 密钥,再将密钥写入服务端环境变量:
export ECOMMERCE_DATA_API_KEY="your_api_key"curl --request POST \
--url https://ecommercedataapi.com/v1/shopify/stores/products \
--header "Content-Type: application/json" \
--header "X-API-Key: ${ECOMMERCE_DATA_API_KEY}" \
--data '{
"store": "allbirds.com",
"size": 10
}'使用 AI CLI 接入
复制给 AI CLI
粘贴到 Codex、Claude Code、Gemini CLI 或其他编程智能体中直接完成接入。
请直接在当前代码库中接入 Ecommerce Data API 的「Shopify 店铺商品」接口,不要只给示例代码。
接口文档:https://ecommercedataapi.com/zh/docs/shopify/store-products
请求接口:POST https://ecommercedataapi.com/v1/shopify/stores/products
API 密钥环境变量:ECOMMERCE_DATA_API_KEY
请求示例:
{
"store": "allbirds.com",
"size": 10
}
请按以下要求执行:
1. 先阅读接口文档,并检查当前项目使用的语言、框架、HTTP 客户端、目录结构和环境变量约定。
2. 优先复用项目现有的 API 客户端和错误处理方式;如果没有,再创建最小可复用的 Ecommerce Data API 客户端与该接口调用封装。
3. 从服务端环境变量 ECOMMERCE_DATA_API_KEY 读取密钥,发送 Content-Type: application/json 和 X-API-Key 请求头。绝不能把真实密钥写入源码、前端代码、日志、测试快照或 Git。
4. 如果环境变量不存在,提示我自行设置 ECOMMERCE_DATA_API_KEY;不要索取、输出或猜测真实密钥,并继续完成不依赖真实请求的代码与测试。
5. 根据接口文档实现请求与响应类型,处理非 2xx 响应、request_id、error.code、error.message 和 429 限流。
6. 添加一个符合当前项目习惯的最小调用示例或测试。如果密钥已配置且当前环境允许外部请求,再执行一次最小真实调用;否则使用 mock 或静态验证。
7. 运行相关格式化、类型检查和测试,最后汇报修改文件、调用方法、验证结果以及仍需我配置的环境变量。还没有 API 密钥?创建 API 密钥
在 Postman 中打开当前请求
下载当前接口的预配置 Collection,再通过 Postman Import 导入。
导入后在 Collection Variables 中填写 apiKey。创建 API 密钥
Node.js 示例
const response = await fetch(
'https://ecommercedataapi.com/v1/shopify/stores/products',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.ECOMMERCE_DATA_API_KEY,
},
body: JSON.stringify({
store: 'allbirds.com',
size: 10,
}),
}
);
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error?.code}: ${result.error?.message}`);
}
console.log(result.data);Python 示例
import os
import requests
response = requests.post(
"https://ecommercedataapi.com/v1/shopify/stores/products",
headers={
"Content-Type": "application/json",
"X-API-Key": os.environ["ECOMMERCE_DATA_API_KEY"],
},
json={
"store": "allbirds.com",
"size": 10,
},
timeout=30,
)
response.raise_for_status()
print(response.json()["data"])请求参数
请求体直接发送下表字段,不要再包裹额外对象;未定义字段会被拒绝。
| 字段 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
store | 字符串 | 是 | Shopify 店铺域名或链接,如 allbirds.com。 | allbirds.com |
titleContains | 字符串 | 否 | 只看标题包含该文字的商品。 | runner |
productType | 字符串 | 否 | 只看类型包含该文字的商品,如 Shoes。 | Shoes |
vendor | 字符串 | 否 | 只看品牌(vendor)包含该文字的商品。 | Allbirds |
minPrice | 数字 | 否 | 最低价格,按结果币种。 | 10 |
maxPrice | 数字 | 否 | 最高价格,按结果币种。 | 100 |
onlyOnSale | 布尔值 | 否 | 只看有折扣的商品。 | true |
onlyInStock | 布尔值 | 否 | 只看有货的商品。 | true |
publishedWithinDays | 整数 | 否 | 只看最近若干天内上架的商品(上新)。 | 30 |
page | 整数 | 否 | 店铺商品列表页码,从 1 开始。 | 1 |
size | 整数 | 否 | 每页向店铺请求的商品数,1–250,默认 50;筛选在该页内进行,结果可能更少甚至为空而 has_more 仍为 true。 | 50 |
返回结构
| 字段 | 类型 | 说明 |
|---|---|---|
request_id | 字符串 | 本次请求的唯一标识。 |
data | 对象 | 接口业务数据。 |
下表字段位于 data 内。数组接口描述的是单个数组元素,分页接口描述的是 items[] 中的单条记录。
返回字段
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
products | 数组 | 本页商品列表 | - |
products.url | 字符串 | 页面链接 | - |
products.tags | 数组 | 商品标签 | - |
products.image | 字符串 | 主图 | - |
products.price | 整数 | 价格 | 12 |
products.title | 字符串 | 标题 | Women's Recycled Tee - Logo - Heathered Grey |
products.handle | 字符串 | 商品链接标识 | womens-recycled-tee-logo |
products.images | 数组 | 图片链接 | - |
products.on_sale | 布尔值 | 是否有折扣变体 | true |
products.vendor | 字符串 | 品牌(vendor) | Allbirds |
products.in_stock | 布尔值 | 是否有货 | true |
products.options | 数组 | 可选项及其取值 | - |
products.options.name | 字符串 | 选项名 | Size |
products.options.values | 数组 | 选项值 | - |
products.currency | 字符串 | 币种 | USD |
products.price_max | 整数 | 最高变体价格 | 12 |
products.variants | 数组 | 变体(SKU) | - |
products.variants.sku | 字符串 | 变体 SKU 编码 | A10700W000 |
products.variants.price | 整数 | 变体价格 | 12 |
products.variants.title | 字符串 | 变体名称 | XS |
products.variants.in_stock | 布尔值 | 变体是否有货 | true |
products.variants.options | 数组 | 变体选项值 | - |
products.variants.list_price | 整数 | 变体折前价 | 25 |
products.variants.variant_id | 字符串 | 变体 ID | 40260395532368 |
products.list_price | 整数 | 折前价 | 25 |
products.product_id | 字符串 | 商品 ID | 6864321642576 |
products.created_at | 字符串 | 创建时间,ISO 8601 | 2023-08-09T10:02:52.000Z |
products.updated_at | 字符串 | 最近更新时间,ISO 8601 | 2026-12-01T04:54:10.000Z |
products.description | 字符串 | 描述 | - |
products.product_type | 字符串 | 商品类型 | Apparel |
products.published_at | 字符串 | 发布时间,ISO 8601 | 2026-11-28T00:08:50.000Z |
has_more | 布尔值 | 是否还有下一页,page 加 1 获取 | true |
返回示例
{
"request_id": "90a140e3-2b30-4bdd-992c-d4c83d8efa9b",
"data": {
"products": [
{
"url": "https://allbirds.com/products/womens-recycled-tee-logo",
"tags": [
"allbirds::carbon-score => 5.9",
"allbirds::cfId => color-womens-allgd-ctn-script-tee-heathered-grey"
],
"image": "https://cdn.shopify.com/s/files/1/1104/4168/products/A10700W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Heathered_Grey.png?v=1698185497",
"price": 12,
"title": "Women's Recycled Tee - Logo - Heathered Grey",
"handle": "womens-recycled-tee-logo",
"images": [
"https://cdn.shopify.com/s/files/1/1104/4168/products/A10700W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Heathered_Grey.png?v=1698185497"
],
"on_sale": true,
"vendor": "Allbirds",
"in_stock": true,
"options": [
{
"name": "Size",
"values": ["XS", "S"]
}
],
"currency": "USD",
"price_max": 12,
"variants": [
{
"sku": "A10700W000",
"price": 12,
"title": "XS",
"in_stock": true,
"options": ["XS"],
"list_price": 25,
"variant_id": "40260395532368"
},
{
"sku": "A10700W001",
"price": 12,
"title": "S",
"in_stock": false,
"options": ["S"],
"list_price": 25,
"variant_id": "40260395565136"
}
],
"list_price": 25,
"product_id": "6864321642576",
"created_at": "2023-08-09T10:02:52.000Z",
"updated_at": "2026-12-01T04:54:10.000Z",
"description": "A soft, easygoing tee that’s all about repping the Allbirds flock. Keeps you comfy in 100% recycled materials blend and graphics printed with water-based ink...",
"product_type": "Apparel",
"published_at": "2026-11-28T00:08:50.000Z"
},
{
"url": "https://allbirds.com/products/womens-recycled-tee-logo-natural-white",
"tags": [
"allbirds::carbon-score => 5.9",
"allbirds::cfId => color-womens-allgd-ctn-script-tee-natural-white"
],
"image": "https://cdn.shopify.com/s/files/1/1104/4168/products/A10709W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Natural_White.png?v=1698185517",
"price": 12,
"title": "Women's Recycled Tee - Logo - Natural White",
"handle": "womens-recycled-tee-logo-natural-white",
"images": [
"https://cdn.shopify.com/s/files/1/1104/4168/products/A10709W001-Graphic_SS-Logo-Tee-Front-Global-Womens-Natural_White.png?v=1698185517"
],
"on_sale": true,
"vendor": "Allbirds",
"in_stock": true,
"options": [
{
"name": "Size",
"values": ["XS", "S"]
}
],
"currency": "USD",
"price_max": 12,
"variants": [
{
"sku": "A10709W000",
"price": 12,
"title": "XS",
"in_stock": true,
"options": ["XS"],
"list_price": 25,
"variant_id": "40259210543184"
},
{
"sku": "A10709W001",
"price": 12,
"title": "S",
"in_stock": true,
"options": ["S"],
"list_price": 25,
"variant_id": "40259210575952"
}
],
"list_price": 25,
"product_id": "6864244310096",
"created_at": "2023-08-09T01:58:57.000Z",
"updated_at": "2026-12-01T04:54:10.000Z",
"description": "A soft, easygoing tee that’s all about repping the Allbirds flock. Keeps you comfy in 100% recycled materials blend and graphics printed with water-based ink...",
"product_type": "Apparel",
"published_at": "2026-11-28T00:08:45.000Z"
}
],
"has_more": true
}
}错误响应、请求追踪和限流头说明见错误与限流。