Apinoa Docs

Search

키워드로 여러 Shopify 스토어의 상품을 검색하며, 가격·평점·상태·재고 필터를 지원합니다.

원본 .mdx 보기
GET | POST /v1/shopify/search

파라미터는 GET의 쿼리 문자열로도, POST의 JSON 본문으로도 보낼 수 있습니다. 둘은 같습니다.

요청

curl "https://gateway.apinoa.com/v1/shopify/search?query=running+shoes" \
  -H "x-api-key: $APINOA_API_KEY"

파라미터

파라미터타입필수설명
querystring예Keywords to search for. Required: Shopify search always needs a keyword, which is also why Shopify has no keyword-less browse.
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.
conditionenumItem condition: new or used. refurbished is refused by name rather than folded into used — the catalog sells new and secondhand, and those are different claims. new used
cursorstringOpaque; comes from the previous response and carries the page index. Shopify pages by cursor rather than by number — this is the only paging knob, and page is refused by name.
inStockboolean | enumOnly listings the marketplace reports as purchasable now.
priceMaxnumber ≥ 0Highest price to return, in decimal major units.
priceMinnumber ≥ 0Lowest price to return, in decimal major units.
ratingMinnumber 0–5Lowest average star rating to return, on the marketplace's own 0-5 scale.
regionstringBuyer country as ISO 3166-1 alpha-2; sets availability, shipping and price.

같은 파라미터와 모든 응답 타입은 OpenAPI 문서에도 있습니다.

응답

data에 SearchResult를 돌려줍니다. 실제 응답을 줄인 것입니다. 배열은 앞쪽 항목만 남기고 긴 텍스트는 잘랐습니다.

{
  "success": true,
  "data": {
    "marketplace": "shopify",
    "query": "running shoes",
    "page": {
      "index": 1,
      "size": 50,
      "total": 235
    },
    "items": [
      {
        "marketplace": "shopify",
        "id": "startfitness.co.uk/adidas-adizero-evo-sl-mens-running-shoes-white",
        "attributes": [
          {
            "name": "Weight",
            "value": "224 g ± 9 g (size UK 8.5)"
          },
          {
            "name": "Midsole Drop",
            "value": "6 mm"
          }
        ],
        "title": "adidas Adizero EVO SL Mens Running Shoes - White",
        "url": "https://startfitness.co.uk/products/adidas-adizero-evo-sl-mens-running-shoes-white?variant=44383311691984",
        "price": {
          "currency": "USD",
          "amount": 171
        },
        "rating": {
          "average": 4.8
        },
        "seller": {
          "id": "startfitness.co.uk",
          "name": "Start Fitness",
          "url": "https://startfitness.co.uk"
        },
        "inStock": true,
        "imageUrl": "https://cdn.shopify.com/s/files/1/0564/9521/0704/files/adidas-Adizero-Evo-SL-JH6206.jpg",
        "badges": [],
        "promotions": []
      }
    ],
    "cursor": "eyJjIjoiZXlKdlptWnpaWFFpT2pVd0xDSjBiM1JoYkY5amIzVnVkQ0k2TWpNMUxDSnlaWFIxY201bFpDSTZOVEI5IiwiaSI6MiwiaCI6IkhnMUNENHV3REJ…",
    "facets": []
  }
}

에러

상태코드의미
400INVALID_CURSOR이 오퍼레이션이 돌려준 cursor가 아닙니다. cursor 없이 처음부터 다시 호출하세요.
400INVALID_PARAMS파라미터가 없거나, 알 수 없거나, 범위를 벗어났습니다. 메시지에 이름이 나옵니다.
401UNAUTHORIZEDx-api-key 헤더가 없거나, 폐기되었거나 알 수 없는 키입니다.
402INSUFFICIENT_BALANCE잔액이 이 호출 비용에 모자랍니다. 대시보드에서 충전하세요.
429MARKETPLACE_SATURATED동시 호출이 너무 많습니다. Retry-After 초만큼 기다린 뒤 다시 시도하세요.
502UPSTREAM_ERROR플랫폼이 쓸 수 없는 응답을 보냈습니다. 간격을 두고 다시 시도하세요.

모든 코드는 Errors에 있습니다. 실패한 호출은 과금되지 않습니다.

가격

가격 호출당 $0.001. 정가 기준이며, 하루 1,000회를 넘으면 단가가 내려갑니다.

참고

  • 결과는 서로 독립된 여러 스토어에 걸쳐 있습니다. 각 항목의 id는 shop/handle이며 Product와 Reviews로 이어집니다.
  • 페이지네이션은 cursor로 합니다. 이전 응답의 cursor를 넘기세요. page는 거부됩니다. 페이지마다 최대 50개가 담기므로 pageSize는 없습니다.
  • sort와 brands는 없습니다. Shopify 검색은 둘 다 제공하지 않습니다.
  • currency는 없습니다. 가격은 region을 따릅니다.
  • condition=refurbished는 used로 매핑되지 않고 거부됩니다: 카탈로그는 new와 secondhand만 구분합니다.

이 페이지 내용