Apinoa Docs

Comments

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

원본 .mdx 보기
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도 받습니다.

파라미터

파라미터타입필수설명
commentstringWith post: the comment whose replies to load (base36 id or t1_ fullname) — e.g. one whose moreReplies says replies were held back.
cursorstringOpaque cursor from the previous page's cursor. Pass it alone for the next page.
limitinteger 1–100Items per page, 1–100.
periodenumTime window for sort top or controversial: hour, day, week, month, year or all. hour day week month year all
poststringA post's comments: post id, fullname (t3_…) or URL.
sortenumOrder. post: confidence (Reddit's 'best'), top, new, controversial, old, qa · username: new, hot, top, controversial. confidence top new controversial old qa hot
usernamestringA user's comments: username or profile URL.

요청

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

응답

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

{
  "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"
          }
        }
      }
    }
  }
}

에러

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

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

가격

가격 호출당 $0.001, 추가 호출마다 $0.001 — 최대 2번 더, 합계 최대 $0.003. 정가 기준이며, 하루 1,000회를 넘으면 단가가 내려갑니다.

참고

  • 게시물의 댓글은 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은 사용자의 댓글에만 쓸 수 있습니다.

이 페이지 내용