Reddit Comments by link API

POST

API 상태

24시간 상태
정상
  • 양호 / 정상
  • 사용 가능
정상

최근 24시간

최근 30일

comment_urls에서 Reddit 댓글을 한 번에 최대 20개까지 조회합니다. 각 항목은 댓글 하나의 링크이며, 예를 들어 comments가 반환한 댓글의 url입니다. 이미 댓글 링크가 있고 스레드를 다시 넘겨 보지 않고 현재 텍스트와 점수를 확인하거나 아직 존재하는지 알고 싶을 때 사용합니다. 읽은 댓글은 각각 한 행이며, comments 행과 같은 필드에 해당 게시물의 post_title과 post_url, 전달한 항목인 input이 추가됩니다. 게시물에 대한 댓글과 중첩 답글 모두 사용할 수 있습니다. 댓글 ID만으로는 충분하지 않습니다. 댓글 단위가 아니라 요청 단위로 과금됩니다. 사라진 댓글은 행이 생기지 않고 missed 목록도 없으므로 input으로 행을 대조하세요. 하나도 읽지 못한 요청은 과금되지 않습니다. 잘못된 배열은 과금 전에 422로 거부됩니다.

POST https://api.everyinfra.com/api/v1/social을 보내고 platform은 reddit, action은 comments_lookup로 설정합니다. 요금은 요청 1,000개당 $0.79(호출당 $0.000792)입니다. 실패한 호출과 빈 결과에는 과금하지 않습니다. 동기 방식입니다. 오래 걸리는 작업은 요청 본문에 "mode": "async"를 추가하고 job_id를 받아 폴링하세요.

AI 프롬프트

#
EveryInfra Reddit Comments by link 엔드포인트(reddit/comments_lookup)를 사용하는 데이터 수집 스크립트 작성을 도와주세요.

엔드포인트 사용 방법:
- 요청: Authorization: Bearer <API 키> 헤더와 함께 POST https://api.everyinfra.com/api/v1/social로 보냅니다. 키는 EVERYINFRA_API_KEY 환경 변수에서 읽고, 절대 하드코딩하지 마세요.
- 요청 본문에서 platform은 reddit, action은 comments_lookup로 설정하고, 파라미터는 params 안에 넣습니다.
- 필수 파라미터:
  - comment_urls: Reddit comment links for comments_lookup, as an array of up to 20 entries; a comma-separated string is not accepted.
- 선택 파라미터:
  - limit: 이 호출에서 반환할 최대 행 수로, 1 이상의 정수입니다. 생략하면 기본값이 적용되며, 실제 반환되는 행은 이보다 적을 수 있습니다.
- 레코드 목록을 반환합니다. 각 레코드의 주요 필드: id, text, author_username, like_count, community, url, posted_at, post_title (댓글이 달린 게시물의 제목(user_comments, comments_…), post_url (Link to the post the comment was left o…), input (The entry that this row answers, return…).
- 요청 본문 예시:
{
  "platform": "reddit",
  "action": "comments_lookup",
  "params": {
    "comment_urls": [
      "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만큼 기다린 뒤 다시 시도합니다.

코드를 작성하기 전에 필요한 대상과 수량, 필드, 원하는 출력 형식을 먼저 물어봐 주세요. 그런 다음 계획과 대략적인 비용을 저와 확인해 주세요.

요청 파라미터

#
이름위치타입필수기본값설명
Authorizationheaderstring예-Bearer 뒤에 API 키를 붙여 입력합니다. API 키는 콘솔에서 생성하며, URL이나 코드 저장소에 절대 넣지 마세요.
platformbodystring예reddit플랫폼 식별자이며 고정값입니다.
actionbodystring예comments_lookup기능 식별자이며 고정값입니다.
comment_urlsbody.paramsarray예-Reddit comment links for comments_lookup, as an array of up to 20 entries; a comma-separated string is not accepted. Each entry is the link to one comment itself, such as the url of a comment returned by comments: https://www.reddit.com/r/<subreddit>/comments/<post_id>/comment/<comment_id>/. The older /comments/<post_id>/<title>/<comment_id>/ form, old.reddit.com links and links with a query string such as ?context=3 also work. A comment ID alone is not enough, because Reddit finds a comment by post ID plus comment ID, and a post link is not a comment link. The url that user_comments returns points to the post, so it cannot be used here. List each comment once. A request with an unrecognized entry, a duplicate or more than 20 entries is rejected with a 422 before any charge, and so is a limit smaller than the number of entries. Billed per request, not per comment; comments not read (deleted, or not under that post) produce no row, so match the rows to your entries with input. A request that reads none is not charged.
limitbody.paramsinteger (1–)아니요-이 호출에서 반환할 최대 행 수로, 1 이상의 정수입니다. 생략하면 기본값이 적용되며, 실제 반환되는 행은 이보다 적을 수 있습니다.

코드 샘플

#
bash
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": "comments_lookup",
  "params": {
    "comment_urls": [
      "https://www.reddit.com/r/pics/comments/1xwxo1e/comment/19sogasefdc5g/"
    ]
  }
}'

OpenAPI 정의(JSON)샘플 코드는 EVERYINFRA_API_KEY 환경 변수에서 키를 읽으므로, 복사한 코드에는 API 키가 포함되지 않습니다.

응답 예시

#
이 파라미터에 대한 샘플 응답이 아직 없습니다. 이 미리보기는 API 정의에 따른 응답 형태와 필드를 보여 주며, …는 자리표시자입니다. 실제 호출 결과가 아닙니다.
json
{  "id": "req_…",  "platform": "reddit",  "action": "comments_lookup",  "results": [    {      "id": …,      "text": …,      "author_username": …,      "like_count": …,      "community": …,      "url": …,      "posted_at": …,      "platform": …,      "post_title": …,      "post_url": …,      "input": …    }  ],  "count": …,  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

응답 필드

#

비즈니스 데이터는 results에 담깁니다. 아래 표는 레코드에 포함될 수 있는 필드를 나열하며, 플랫폼에 표시되지 않는 값을 임의로 만들어 넣지 않습니다.

필드의미
id플랫폼에서 레코드의 고유 ID입니다. 한 플랫폼 안에서만 고유하며, 플랫폼이 다르면 ID가 중복될 수 있습니다.
textHTML을 제거한 본문으로, 잘리지 않고 전체가 반환됩니다(일부 플랫폼은 목록 결과 자체에 발췌문만 포함되며, 이 경우 해당 플랫폼의 필드 설명에 명시되어 있습니다).
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).
post_title댓글이 달린 게시물의 제목(user_comments, comments_lookup, painpoint의 pain_comment 행)입니다.
post_urlLink to the post the comment was left on (comments_lookup).
inputThe entry that this row answers, returned exactly as you passed it: for posts_batch an entry of urls, for comments_lookup an entry of comment_urls. Use it to match rows to your entries; the returned url can be written differently, for example a full post link where you passed a redd.it short link.

오류 및 과금

#
401
키가 없거나 유효하지 않습니다.
402
잔액이 부족합니다. 먼저 충전하세요.
422
파라미터 이름 또는 값이 올바르지 않습니다. 오류에 제시된 제안을 참고해 수정하세요. 과금되지 않습니다.
429
분당 요청 속도 제한에 도달했습니다. Retry-After만큼 기다린 뒤 다시 시도하세요.
503
처리를 완료하지 못했습니다. 보류된 금액은 잔액으로 반환됩니다. 결과가 불확실하면 재시도하기 전에 먼저 확인하세요.
200 빈 결과
데이터가 없습니다. 과금되지 않습니다.

오류

Google Analytics는 동의 필요. 개인정보