Apinoa Docs

Search

按关键词搜索 Amazon,支持价格、评分、品牌和类目过滤,覆盖全部十六个 Amazon 站点。

查看原始 .mdx
GET | POST /v1/amazon/search

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

请求

curl "https://gateway.apinoa.com/v1/amazon/search?query=wool+socks&priceMax=30" \
  -H "x-api-key: $APINOA_API_KEY"

参数

参数类型必填说明
querystring是Keywords to search for. Required here; to search by picture use image-search.
brandsstring listBrand names as Amazon spells them, e.g. brands=Nike,Adidas. A call that uses brands costs 2 units instead of 1. Not available on amazon.fr (region=FR).
categoryIdstringNarrow to one category, by the marketplace's own id. Opaque and per-marketplace; take it from Product.category[].id or from a result's facets.
facetsstring | object listNarrowings taken from a result's facets, e.g. facets=Color:Black. A call that uses facets costs 2 units instead of 1. Not available on amazon.fr (region=FR).
includestring listExpansions that cost more than the default answer, e.g. include=facets.
pageinteger1-based page number; each page is charged separately. There is no pageSize (Amazon fixes the count per page by keyword, 13-47 in practice) and no cursor — paging is by number.
priceMaxnumber ≥ 0Highest price to return, in decimal major units.
priceMinnumber ≥ 0Lowest price to return, in decimal major units.
ratingMinnumber4 only. Amazon's rating filter offers exactly one threshold, "4 Stars & Up"; any other value is a 400 rather than a silently different search. Not available on amazon.fr (region=FR).
regionenumWhich Amazon marketplace to query, by buyer country: US, CA, MX, BR, FR, IT, ES, NL, SE, TR, AE, SA, IN, JP, SG, AU. Defaults to US. Prices come back in that marketplace's own currency (JP in JPY, FR in EUR). US CA MX BR FR IT ES NL SE TR AE SA IN JP SG AU
sortenumResult ordering: best_match, price_asc, price_desc, newly_listed or avg_review. Defaults to best_match, Amazon's own relevance ordering. best_match price_asc price_desc newly_listed avg_review

这些参数及所有响应类型也写在OpenAPI 文档中。

响应

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

{
  "success": true,
  "data": {
    "marketplace": "amazon",
    "query": "wool socks",
    "page": {
      "index": 1,
      "size": 48,
      "total": 13179
    },
    "items": [
      {
        "marketplace": "amazon",
        "id": "B07F3FFTMK",
        "title": "Alvada Mens Merino Wool Crew Socks Thermal and Warm Socks for Winter Work Hiking Running 3 Pairs",
        "attributes": [],
        "price": {
          "currency": "USD",
          "amount": 13.49
        },
        "url": "https://www.amazon.com/dp/B07F3FFTMK",
        "imageUrl": "https://m.media-amazon.com/images/I/91aOC3G1W6L.jpg",
        "variantCount": 24,
        "listPrice": {
          "currency": "USD",
          "amount": 14.99
        },
        "unitPrice": {
          "price": {
            "currency": "USD",
            "amount": 4.5
          },
          "unit": "count"
        },
        "rating": {
          "average": 4.5,
          "count": 37581
        },
        "salesLabel": "10K+ bought in past month",
        "salesCount": 10000,
        "delivery": {
          "estimate": "Non-members get FREE delivery Thu, Oct 29 on $35 of items shipped by Amazon",
          "free": true,
          "minimumOrder": {
            "currency": "USD",
            "amount": 35
          },
          "minDays": 5,
          "maxDays": 5
        },
        "shippingOptions": [
          {
            "estimate": "Non-members get FREE delivery Thu, Oct 29 on $35 of items shipped by Amazon",
            "free": true,
            "minimumOrder": {
              "currency": "USD",
              "amount": 35
            },
            "minDays": 5,
            "maxDays": 5
          },
          {
            "estimate": "Join Prime to get FREE delivery Tomorrow, Oct 25",
            "free": true,
            "minDays": 1,
            "maxDays": 1,
            "ext": {
              "membership": "Prime"
            }
          }
        ],
        "badges": [
          "Overall Pick",
          "Amazon's Choice"
        ],
        "promotions": []
      }
    ]
  }
}

错误

状态代码含义
400INVALID_PARAMS参数缺失、未知或超出范围。消息中会指出是哪一个。
401UNAUTHORIZED缺少 x-api-key 请求头,或密钥已吊销或未知。
402INSUFFICIENT_BALANCE余额不足以支付本次调用。请在控制台充值。
429MARKETPLACE_SATURATED并发调用过多。请等待 Retry-After 秒后重试。
502UPSTREAM_ERROR平台返回了无法使用的内容。请退避后重试。

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

价格

价格 每次调用 $0.001,每多一次调用加 $0.001——最多再加 1 次,合计最多 $0.002。只有 brands 和筛选栏 facet 会增加一次:使用任一个即为 2 个单位。其他筛选不额外计费。标价;单日调用超过 1,000 次后单价下调。

说明

  • region 选择站点。 region=JP 搜索 amazon.co.jp,并以日元计价。十六个国家列在 Amazon 页面上。省略时为 amazon.com。
  • 按 page 分页。 Amazon 按关键词固定每页条数(实际为 13 到 47),因此没有 pageSize,也没有 cursor。
  • ratingMin 只能是 4,否则返回 400。 Amazon 只提供一个评分阈值——"4 Stars & Up"。其他任何值都会被拒绝,而不是换成另一种搜索来应答。
  • brands 和 facets 计 2 个单位。 其他过滤器均不额外计费。参见 Filters。
  • 不支持: condition、freeShipping、inStock。

本页内容