---
title: "Categories"
description: "Amazon 카테고리 트리의 한 단계를 나열합니다: 대분류(department) 목록, 또는 한 카테고리의 하위 카테고리."
---

> 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
GET | POST /v1/amazon/categories
```

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

## 요청

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/amazon/categories" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const res = await fetch("https://gateway.apinoa.com/v1/amazon/categories", {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/amazon/categories",
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 파라미터

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `categoryId` | string |  | Omit for the 40 departments; give a browse node (`172541`) or a department slug (`electronics`) to list that category's children. This is the one endpoint that takes either kind of id. |
| `region` | enum |  | Which 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` |

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

## 응답

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

```json
{
  "success": true,
  "data": {
    "marketplace": "amazon",
    "path": [],
    "categories": [
      {
        "id": "amazon-devices",
        "name": "Amazon Devices & Accessories",
        "browsable": false
      },
      {
        "id": "amazon-renewed",
        "name": "Amazon Renewed",
        "browsable": false
      }
    ]
  }
}
```

## 에러

| 상태 | 코드 | 의미 |
|---|---|---|
| 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.

## 참고

- **대분류 목록은 `categoryId`를 생략합니다.** 하나를 넘기면 그 하위 카테고리를 나열하며, 이렇게 아래로 내려갑니다.
- **id는 두 종류입니다.** 대분류는 스토어 slug(`electronics`)이고, 그 아래는 모두 숫자 browse node(`172541`)입니다. [Browse](/docs/api-reference/amazon/browse)는 node가 필요하므로 대분류는 `"browsable": false`로 돌아옵니다. 한 단계 내려가면 Browse가 받는 id를 얻습니다.
- 대분류 아래에서는 `browsable`이 보고되지 않으며 기본값은 예입니다. 일부 node는 아무것도 나열하지 않습니다(Camera & Photo가 그 예).
- 응답에는 `path`(상위 카테고리들, 마지막이 리프)와 `categories`가 담깁니다.
