Apinoa Docs

Catalog

列出某个 Shopify 店铺的全部商品,或其中某个集合的全部商品。

查看原始 .mdx
GET | POST /v1/shopify/catalog

参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 请求体发送,两者等价。

参数

参数类型必填说明
idstring是The store: its host (comfrt.com) or any URL on it — a product, collection or home page link.
collectionstringOnly this collection: its handle (best-sellers) or its URL. Omitted means the whole store — unless id is itself a collection page link, which lists that collection.
currencystringPresentment currency, ISO 4217.
cursorstringThe previous page's cursor. Pass it for the next page; it also carries the store's total forward.
pageinteger ≥ 11-based page number.
pageSizeinteger 1–250Products per page, 1–250 (default 50).
regionstringBuyer country as ISO 3166-1 alpha-2; sets availability, shipping and price.

请求

curl "https://gateway.apinoa.com/v1/shopify/catalog?id=thedoodlebot.com" \
  -H "x-api-key: $APINOA_API_KEY"

响应

在 data 中返回 SearchResult。 真实响应的节选:数组只保留前几项,长文本已截断。

{
  "success": true,
  "data": {
    "marketplace": "shopify",
    "page": {
      "index": 1,
      "size": 4,
      "total": 4
    },
    "items": [
      {
        "marketplace": "shopify",
        "id": "thedoodlebot.com/doodle-bot-1",
        "url": "https://thedoodlebot.com/products/doodle-bot-1",
        "title": "Doodle Bot",
        "price": {
          "currency": "USD",
          "amount": 60
        },
        "listPrice": {
          "currency": "USD",
          "amount": 120
        },
        "brand": "Doodle Bot",
        "listedAt": "2025-11-11T21:04:21.000Z",
        "inStock": true,
        "description": "<p><meta charset=\"utf-8\"><strong data-start=\"302\" data-end=\"392\">Doodle Bot is the fun, interactive robot that helps ki…",
        "badges": [],
        "promotions": [],
        "features": [],
        "media": {
          "images": [
            "https://cdn.shopify.com/s/files/1/0785/4070/1921/files/01803622-2C47-4C92-AB09-18AF6FB97168.jpg?v=1762895019",
            "https://cdn.shopify.com/s/files/1/0785/4070/1921/files/530150FC-A189-4EE9-8A39-6775D4EE9A5D.jpg?v=1762895186"
          ],
          "videos": []
        },
        "category": [],
        "attributes": [],
        "options": [
          {
            "id": "1",
            "name": "Color",
            "values": [
              {
                "id": "BLUE",
                "name": "BLUE",
                "imageUrl": "https://cdn.shopify.com/s/files/1/0785/4070/1921/files/530150FC-A189-4EE9-8A39-6775D4EE9A5D.jpg?v=1762895186"
              },
              {
                "id": "PINK",
                "name": "PINK",
                "imageUrl": "https://cdn.shopify.com/s/files/1/0785/4070/1921/files/01803622-2C47-4C92-AB09-18AF6FB97168.jpg?v=1762895019"
              }
            ]
          }
        ],
        "variants": [
          {
            "id": "47433841967329",
            "price": {
              "currency": "USD",
              "amount": 60
            },
            "listPrice": {
              "currency": "USD",
              "amount": 120
            },
            "inStock": true,
            "selections": [
              {
                "optionId": "1",
                "valueId": "BLUE",
                "optionName": "Color",
                "valueName": "BLUE"
              }
            ]
          },
          {
            "id": "47433842000097",
            "price": {
              "currency": "USD",
              "amount": 60
            },
            "listPrice": {
              "currency": "USD",
              "amount": 120
            },
            "inStock": true,
            "selections": [
              {
                "optionId": "1",
                "valueId": "PINK",
                "optionName": "Color",
                "valueName": "PINK"
              }
            ]
          }
        ],
        "offers": [],
        "reviewAspects": [],
        "boxContents": [],
        "reviews": [],
        "seller": {
          "id": "thedoodlebot.com",
          "url": "https://thedoodlebot.com",
          "name": "Doodle Bot",
          "country": "US"
        },
        "imageUrl": "https://cdn.shopify.com/s/files/1/0785/4070/1921/files/01803622-2C47-4C92-AB09-18AF6FB97168.jpg?v=1762895019"
      }
    ]
  }
}

错误

状态代码含义
400INVALID_CURSOR该 cursor 不是本操作返回的。请不带它重新开始。
400INVALID_PARAMS参数缺失、未知或超出范围。消息中会指出是哪一个。
401UNAUTHORIZED缺少 x-api-key 请求头,或密钥已吊销或未知。
402INSUFFICIENT_BALANCE余额不足以支付本次调用。请在控制台充值。
404NOT_FOUND该店铺没有这个集合。
404NOT_SHOPIFY_STORE该网站不是 Shopify 店铺。
404STORE_CLOSED该店铺设有密码保护或已关闭。
429MARKETPLACE_SATURATED并发调用过多。请等待 Retry-After 秒后重试。
502UPSTREAM_ERROR平台返回了无法使用的内容。请退避后重试。

全部错误代码见 Errors。失败的调用不计费。

价格

价格 每次调用 $0.001。标价;单日调用超过 1,000 次后单价下调。

说明

  • id 是店铺的主机名或店内任意链接: 商品页、集合页或首页。集合页链接会列出该集合;对其他任何链接,加上 collection 即可收窄到某个集合。
  • 每个条目都是完整的商品,与 Product 对该 handle 返回的对象相同(所有变体、选项、图片和描述),另加主图 imageUrl。
  • page.total 是店铺的商品总数,每一页都会返回,因此第一页就能告诉你某个店铺是否值得完整遍历。
  • 以 cursor 为准,而不是条目数。 一页的商品可能少于 pageSize,但仍不是最后一页:Shopify 会把店铺不公开列出的商品从页面中剔除,而不补足空缺。同样的原因,完整遍历得到的商品数可能略少于 page.total。

本页内容