---
title: "Comments"
description: "Reddit 게시물의 댓글 트리, 댓글 하나에 달린 답글, 또는 사용자의 댓글을 가져옵니다."
---

```http
GET | POST /v1/reddit/comments
```

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

## 넘길 값

| 넘기는 값 | 읽는 것 | 비고 |
|---|---|---|
| `post` | 게시물의 댓글 트리 | 최상위 댓글과 Reddit이 그 아래에 중첩한 답글. 게시물은 `ext.post`에 있습니다. `sort`: `confidence`(기본값), `top`, `new`, `controversial`, `old`, `qa` |
| `post` + `comment` | 댓글 하나에 달린 답글 | 그 댓글과, 중첩된 답글 |
| `username` | 사용자의 댓글 | `sort`: `new`, `hot`, `top`, `controversial` |

호출마다 소스는 하나만 넘기세요. 모든 식별자는 페이지 URL도 받습니다.

## 파라미터

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `comment` | string |  | With `post`: the comment whose replies to load (base36 id or t1_ fullname) — e.g. one whose `moreReplies` says replies were held back. |
| `cursor` | string |  | Opaque cursor from the previous page's `cursor`. Pass it alone for the next page. |
| `limit` | integer 1–100 |  | Items per page, 1–100. |
| `period` | enum |  | Time window for sort top or controversial: hour, day, week, month, year or all. `hour` `day` `week` `month` `year` `all` |
| `post` | string |  | A post's comments: post id, fullname (t3_…) or URL. |
| `sort` | enum |  | Order. post: confidence (Reddit's 'best'), top, new, controversial, old, qa · username: new, hot, top, controversial. `confidence` `top` `new` `controversial` `old` `qa` `hot` |
| `username` | string |  | A user's comments: username or profile URL. |

## 요청

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/reddit/comments?post=1wtm5mp" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({ post: "1wtm5mp" });
const res = await fetch(`https://gateway.apinoa.com/v1/reddit/comments?${params}`, {
  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/reddit/comments",
    params={"post": "1wtm5mp"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 응답

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

```json
{
  "success": true,
  "data": {
    "platform": "reddit",
    "items": [
      {
        "platform": "reddit",
        "id": "pcvg4r0",
        "url": "https://www.reddit.com/r/technology/comments/1wtm5mp/comment/pcvg4r0/",
        "postId": "1wtm5mp",
        "author": {
          "platform": "reddit",
          "handle": "bryancald",
          "avatarUrl": "https://styles.redditmedia.com/t5_21dyao/styles/profileIcon_snoo96d39f88-0d0d-4954-a766-4738a4900b3a-headshot.png?width…"
        },
        "text": "I truly hope this leads to the demise of McDonalds and any other company that uses this business model.",
        "createdAt": "2026-09-29T21:14:47.455Z",
        "replies": [],
        "moreReplies": {
          "count": 114,
          "cursor": "L4XGv5gQ_FjNqfTT50wyH8HLEFcVKbYmFyUeCUqK7sWTOyfFoRJhjidTb3_j1nbWbQFGMKsNt5HrRLGMOg0FKTXRRGR0E7PbYOr0toK3-hr569AwBmuPKON…"
        },
        "ext": {
          "fullname": "t1_pcvg4r0",
          "parentFullname": "t3_1wtm5mp",
          "depth": 0,
          "score": 2311,
          "awards": 4,
          "community": "technology"
        }
      }
    ],
    "cursor": "uLbhrTSCxojEb5jzOX2Bo3KUoyHedf6jaMv9hj7OlvK_HdPrLWt8_nE12KPBUV3ilwsATxuZi_45UdCtRMCxSMjSdrBmRFU_oHiRvSHt1R3A7S1Qzdg5n-J…",
    "ext": {
      "post": {
        "platform": "reddit",
        "id": "1wtm5mp",
        "url": "https://www.reddit.com/r/technology/comments/1wtm5mp/mcdonalds_is_reportedly_using_ai_to_dynamically/",
        "author": {
          "platform": "reddit",
          "handle": "AdSpecialist6598",
          "id": "cc0n0rs5"
        },
        "title": "McDonald's Is Reportedly Using AI To \"Dynamically\" Price Its Burgers",
        "createdAt": "2026-09-29T21:06:04.000Z",
        "media": [],
        "metrics": {
          "comments": 3406
        },
        "linkPreview": {
          "url": "https://www.engadget.com/2272211/mcdonalds-is-reportedly-using-ai-to-dynamically-price-its-burgers/",
          "domain": "engadget.com",
          "thumbnailUrl": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?auto=webp&s=b396d5d14e8ed04fcfdafd4db…"
        },
        "sensitive": false,
        "ext": {
          "fullname": "t3_1wtm5mp",
          "score": 19516,
          "ups": 19516,
          "upvoteRatio": 0.94,
          "numCrossposts": 6,
          "awards": 0,
          "flair": "Business",
          "flairTextColor": "dark",
          "flairTemplateId": "49cac61c-a816-11e9-be34-0ebbab5890a0",
          "kind": "link",
          "preview": {
            "source": {
              "url": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?auto=webp&s=b396d5d14e8ed04fcfdafd4db…",
              "width": 1600,
              "height": 898
            },
            "resolutions": [
              {
                "url": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?width=108&crop=smart&auto=webp&s=300b…",
                "width": 108,
                "height": 60
              },
              {
                "url": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?width=216&crop=smart&auto=webp&s=74aa…",
                "width": 216,
                "height": 121
              }
            ],
            "enabled": false
          },
          "thumbnailUrl": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?width=320&crop=smart&auto=webp&s=7d75…",
          "spoiler": false,
          "locked": false,
          "archived": false,
          "community": {
            "name": "technology",
            "id": "2qh16",
            "subscribers": 20595712,
            "type": "public"
          }
        }
      }
    }
  }
}
```

## 에러

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

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

## 가격

**Price** $0.001 per call, plus $0.001 for each extra call it makes — at most 2 more, so $0.003 in total. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.

## 참고

- **게시물의 댓글은 Reddit의 페이지 단위로 옵니다.** 첫 페이지에는 Reddit의 상위 댓글 25개와 그 아래에 중첩된 답글이 담기고, `cursor` 페이지마다 Reddit의 "댓글 더 보기"처럼 다음 묶음을 불러옵니다. `ext.more.count`는 아직 불러오지 않은 최상위 댓글 수입니다. 게시물의 댓글에는 `limit`가 적용되지 않습니다.
- **Reddit이 보류한 답글.** 답글이 모두 포함되지 않은 댓글에는 `moreReplies.count`가 있습니다. 같은 `post`와 함께 그 댓글의 `id`를 `comment`로 넘기면 불러옵니다: 응답은 답글이 달린 그 댓글이며, `cursor`로 그 댓글의 직접 답글을 이어서 받습니다.
- `comment`는 base36 id 또는 `t1_` fullname을 받습니다. 게시물에 없는 댓글은 `404 NOT_FOUND`로 답합니다.
- `period` (`hour` … `all`)는 사용자의 댓글에서 `sort=top` 또는 `sort=controversial`일 때 적용되며, `sort=hot`은 사용자의 댓글에만 쓸 수 있습니다.
