---
title: "Image Search"
description: "사진으로 여러 Shopify 스토어의 상품을 찾으며, 키워드로 좁힐 수도 있습니다."
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/marketplace/llms.txt)

```http
POST /v1/shopify/image-search
```

`POST` 전용이며 JSON 본문으로 보냅니다.

## 요청

```bash tab="cURL"
curl -X POST "https://gateway.apinoa.com/v1/shopify/image-search" \
  -H "x-api-key: $APINOA_API_KEY" \
  -H "content-type: application/json" \
  -d "{\"image\": {\"contentType\": \"image/jpeg\", \"data\": \"$(base64 < photo.jpg | tr -d '\n')\"}}"
```

```js tab="JavaScript"
import { readFile } from "node:fs/promises";

const data = (await readFile("photo.jpg")).toString("base64");
const res = await fetch("https://gateway.apinoa.com/v1/shopify/image-search", {
  method: "POST",
  headers: { "x-api-key": process.env.APINOA_API_KEY, "content-type": "application/json" },
  body: JSON.stringify({ image: { contentType: "image/jpeg", data } }),
});
const { success, data: result, error } = await res.json();
```

```python tab="Python"
import base64
import os

import requests

with open("photo.jpg", "rb") as f:
    data = base64.b64encode(f.read()).decode()

res = requests.post(
    "https://gateway.apinoa.com/v1/shopify/image-search",
    json={"image": {"contentType": "image/jpeg", "data": data}},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 파라미터

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `image` | object | yes | Base64 image input for visual search; the image is the anchor and `query` narrows it — the reverse of `search`. Up to ~6MB of base64; supported types are jpeg, png, webp, gif and avif. |
| `categoryId` | string |  | Narrow 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`. |
| `condition` | enum |  | Item 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` |
| `cursor` | string |  | Opaque; 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. |
| `inStock` | boolean \| enum |  | Only listings the marketplace reports as purchasable now. |
| `priceMax` | number ≥ 0 |  | Highest price to return, in decimal major units. |
| `priceMin` | number ≥ 0 |  | Lowest price to return, in decimal major units. |
| `query` | string |  | Optional text that refines the image — the reverse of `search`, where the query anchors the result. For example, a sneaker photo with `query=wool` returns wool sneakers rather than any sneaker of that shape. |
| `ratingMin` | number 0–5 |  | Lowest average star rating to return, on the marketplace's own 0-5 scale. |
| `region` | string |  | Buyer country as ISO 3166-1 alpha-2; sets availability, shipping and price. |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## 응답

`data`에 [`SearchResult`](/docs/api-reference/marketplaces/response-schema#searchresult)를 돌려줍니다. 실제 응답을 줄인 것입니다. 배열은 앞쪽 항목만 남기고 긴 텍스트는 잘랐습니다.

```json
{
  "success": true,
  "data": {
    "marketplace": "shopify",
    "page": {
      "index": 1,
      "size": 50,
      "total": 403
    },
    "items": [
      {
        "marketplace": "shopify",
        "id": "killcrew.co/flame-high-socks-black-orange",
        "attributes": [
          {
            "name": "Material",
            "value": "Cotton blend"
          },
          {
            "name": "Length",
            "value": "Crew high"
          }
        ],
        "title": "FLAME HIGH SOCKS - BLACK / ORANGE",
        "url": "https://killcrew.co/products/flame-high-socks-black-orange?variant=40760148623458",
        "price": {
          "currency": "USD",
          "amount": 15
        },
        "rating": {
          "average": 4.8
        },
        "seller": {
          "id": "killcrew.co",
          "name": "Kill Crew",
          "url": "https://killcrew.co"
        },
        "inStock": true,
        "imageUrl": "https://cdn.shopify.com/s/files/1/1955/8565/files/FLAMEHIGHSOCKS-BLACK_ORANGE.jpg",
        "badges": [],
        "promotions": []
      }
    ],
    "cursor": "eyJjIjoiZXlKdlptWnpaWFFpT2pVd0xDSjBiM1JoYkY5amIzVnVkQ0k2TkRBekxDSnlaWFIxY201bFpDSTZOVEI5IiwiaSI6MiwiaCI6IjdOa2tvb1l6bjV…",
    "facets": []
  }
}
```

## 에러

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

모든 코드는 [Errors](/docs/errors)에 있습니다. 실패한 호출은 과금되지 않습니다.

## 가격

**Price** $0.001 per call. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.

## 참고

- **POST 전용입니다.** 이미지는 JSON 본문에 base64로 보냅니다.
- **이미지가 기준이고 `query`가 이를 좁힙니다.** 울 스니커즈 사진만으로는 그런 모양의 무엇이든, "wool"이라는 단어만으로는 울로 만든 무엇이든 돌아오고, 둘을 함께 넘기면 울 스니커즈가 돌아옵니다.
- **이미지는 base64로 약 6 MB까지,** JPEG, PNG, WebP, GIF 또는 AVIF입니다.
- 필터와 페이지네이션은 [Search](/docs/api-reference/shopify/search)와 같습니다.
