Reddit 댓글 답글 API
API 상태
- 24시간 상태
- 정상
- 양호 / 정상
- 사용 가능
최근 24시간
최근 30일
Read the replies under one Reddit comment from its link in url (the url of a comments or comments_lookup row). One call returns one batch of about 10 replies, including replies to replies, as a flat list with the same fields as comments plus reply_to_id and depth. There is no paging: when a row's has_more_replies is true, call again with that row's url. A comment with no replies returns an empty result and is not charged.
POST https://api.everyinfra.com/api/v1/social을 보내고 platform은 reddit, action은 comment_replies로 설정합니다. 요금은 요청 1,000개당 $0.79(호출당 $0.000792)입니다. 실패한 호출과 빈 결과에는 과금하지 않습니다. 동기 방식입니다. 오래 걸리는 작업은 요청 본문에 "mode": "async"를 추가하고 job_id를 받아 폴링하세요.
AI 프롬프트
#EveryInfra Reddit 댓글 답글 엔드포인트(reddit/comment_replies)를 사용하는 데이터 수집 스크립트 작성을 도와주세요.
엔드포인트 사용 방법:
- 요청: Authorization: Bearer <API 키> 헤더와 함께 POST https://api.everyinfra.com/api/v1/social로 보냅니다. 키는 EVERYINFRA_API_KEY 환경 변수에서 읽고, 절대 하드코딩하지 마세요.
- 요청 본문에서 platform은 reddit, action은 comment_replies로 설정하고, 파라미터는 params 안에 넣습니다.
- 필수 파라미터:
- url: One Reddit comment link, such as the url of a row from comments or comments_lookup (…/comments/<post ID>/comment/<comment ID>/). A bare comment ID is not enough.
- 선택 파라미터:
- limit: 이 호출에서 반환할 최대 행 수로, 1 이상의 정수입니다. 생략하면 기본값이 적용되며, 실제 반환되는 행은 이보다 적을 수 있습니다.
- 레코드 목록을 반환합니다. 각 레코드의 주요 필드: id, text, author_username, like_count, community, url, posted_at, reply_to_id (ID of the comment this reply answers (c…), depth (Level under the post (comment_replies):…), has_more_replies (Whether this reply has more replies not…).
- 요청 본문 예시:
{
"platform": "reddit",
"action": "comment_replies",
"params": {
"url": "https://www.reddit.com/r/pics/comments/1xwxo1e/comment/19sogasefdc5g/"
}
}
- 요금: 요청 1,000개당 $0.79. 실패하거나 빈 결과에는 과금하지 않습니다.
- 대상이 수십~수백 개라면 요청 본문에 "mode": "async"를 추가하세요. job_id를 즉시 받은 뒤 GET https://api.everyinfra.com/api/v1/jobs/{job_id}를 폴링해 결과를 가져옵니다.
- 422가 반환되면 오류에 제시된 파라미터 이름과 허용 값을 참고해 요청을 수정하고, 429 또는 503이 반환되면 Retry-After만큼 기다린 뒤 다시 시도합니다.
코드를 작성하기 전에 필요한 대상과 수량, 필드, 원하는 출력 형식을 먼저 물어봐 주세요. 그런 다음 계획과 대략적인 비용을 저와 확인해 주세요.요청 파라미터
#| 이름 | 위치 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|---|
Authorization | header | string | 예 | - | Bearer 뒤에 API 키를 붙여 입력합니다. API 키는 콘솔에서 생성하며, URL이나 코드 저장소에 절대 넣지 마세요. |
platform | body | string | 예 | reddit | 플랫폼 식별자이며 고정값입니다. |
action | body | string | 예 | comment_replies | 기능 식별자이며 고정값입니다. |
url | body.params | string | 예 | - | One Reddit comment link, such as the url of a row from comments or comments_lookup (…/comments/<post ID>/comment/<comment ID>/). A bare comment ID is not enough. |
limit | body.params | integer (1–) | 아니요 | - | 이 호출에서 반환할 최대 행 수로, 1 이상의 정수입니다. 생략하면 기본값이 적용되며, 실제 반환되는 행은 이보다 적을 수 있습니다. |
코드 샘플
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "reddit",
"action": "comment_replies",
"params": {
"url": "https://www.reddit.com/r/pics/comments/1xwxo1e/comment/19sogasefdc5g/"
}
}'OpenAPI 정의(JSON)샘플 코드는 EVERYINFRA_API_KEY 환경 변수에서 키를 읽으므로, 복사한 코드에는 API 키가 포함되지 않습니다.
응답 예시
#{ "id": "req_…", "platform": "reddit", "action": "comment_replies", "results": [ { "id": "19soioec1l0ar", "text": "He stretch", "author_username": "E•••t", "like_count": 21, "community": "pics", "url": "https://www.reddit.com/r/pics/comments/1xwxo1e/comment/19soioec1l0ar/", "posted_at": "2026-11-15T16:14:37.802000+00:00", "platform": "reddit", "reply_to_id": "19sogasefdc5g", "depth": 1, "has_more_replies": true }, { "id": "19sol335umo5e", "text": "stremtch", "author_username": "S•••h", "like_count": 5, "community": "pics", "url": "https://www.reddit.com/r/pics/comments/1xwxo1e/comment/19sol335umo5e/", "posted_at": "2026-11-15T17:08:37.130000+00:00", "platform": "reddit", "reply_to_id": "19soioec1l0ar", "depth": 2, "has_more_replies": false } ], "count": 4, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
응답 필드
#비즈니스 데이터는 results에 담깁니다. 아래 표는 레코드에 포함될 수 있는 필드를 나열하며, 플랫폼에 표시되지 않는 값을 임의로 만들어 넣지 않습니다.
| 필드 | 의미 |
|---|---|
id | 플랫폼에서 레코드의 고유 ID입니다. 한 플랫폼 안에서만 고유하며, 플랫폼이 다르면 ID가 중복될 수 있습니다. |
text | HTML을 제거한 본문으로, 잘리지 않고 전체가 반환됩니다(일부 플랫폼은 목록 결과 자체에 발췌문만 포함되며, 이 경우 해당 플랫폼의 필드 설명에 명시되어 있습니다). |
author_username | 작성자의 사용자 이름(@handle)으로, 보통 URL에 사용할 수 있습니다. |
like_count | 좋아요 수입니다. null은 플랫폼 또는 이 기능에서 공개하지 않는다는 뜻이며, 0이 아닙니다. |
community | 플랫폼 자체의 의미를 따름 |
url | 플랫폼에서 해당 레코드로 연결되는 링크입니다. |
posted_at | 게시 시각으로, ISO 8601 UTC 형식입니다(예: 2026-08-07T12:34:56+00:00). 플랫폼에서 받은 비표준 문자열은 그대로 전달되므로 방어적으로 파싱하세요. null이면 플랫폼이 공개하지 않은 것입니다. |
platform | 출처 플랫폼 식별자로, 요청의 platform과 같습니다(예: xiaohongshu, tiktok). |
reply_to_id | ID of the comment this reply answers (comment_replies); for direct replies it is the comment you asked about. |
depth | Level under the post (comment_replies): 0 is a comment on the post, 1 a reply to it, and so on. |
has_more_replies | Whether this reply has more replies not included (comment_replies); if true, call comment_replies with this row's url. |
오류 및 과금
#- 401
- 키가 없거나 유효하지 않습니다.
- 402
- 잔액이 부족합니다. 먼저 충전하세요.
- 422
- 파라미터 이름 또는 값이 올바르지 않습니다. 오류에 제시된 제안을 참고해 수정하세요. 과금되지 않습니다.
- 429
- 분당 요청 속도 제한에 도달했습니다. Retry-After만큼 기다린 뒤 다시 시도하세요.
- 503
- 처리를 완료하지 못했습니다. 보류된 금액은 잔액으로 반환됩니다. 결과가 불확실하면 재시도하기 전에 먼저 확인하세요.
- 200 빈 결과
- 데이터가 없습니다. 과금되지 않습니다.