Reddit 검색어 추천 API
API 상태
- 24시간 상태
- 정상
- 양호 / 정상
- 사용 가능
최근 24시간
최근 30일
지금까지 입력한 텍스트에 대해 Reddit 검색창이 제안하는 내용을 가져옵니다. keyword는 필수이며 첫 몇 글자만 넣어도 됩니다. 한 번의 호출로 드롭다운 전체가 반환되며, 자동완성 약 5개와 커뮤니티 약 5개가 row_type으로 구분됩니다. keyword 행에는 keyword와 rank가 있습니다. community 행에는 community, community_id, url, icon_url, weekly_visitor_count, is_nsfw, rank가 있습니다. 여기서 weekly_visitor_count는 드롭다운에 표시되는 반올림된 값(93K는 93000으로 기록)이며 모든 행에 있는 것은 아닙니다. 정확한 값은 subreddit_info를 사용하세요. 성인 콘텐츠(NSFW) 커뮤니티는 포함되지 않습니다.
POST https://api.everyinfra.com/api/v1/social을 보내고 platform은 reddit, action은 search_suggest로 설정합니다. 요금은 요청 1,000개당 $0.79(호출당 $0.000792)입니다. 실패한 호출과 빈 결과에는 과금하지 않습니다. 동기 방식입니다. 오래 걸리는 작업은 요청 본문에 "mode": "async"를 추가하고 job_id를 받아 폴링하세요.
AI 프롬프트
#EveryInfra Reddit 검색어 추천 엔드포인트(reddit/search_suggest)를 사용하는 데이터 수집 스크립트 작성을 도와주세요.
엔드포인트 사용 방법:
- 요청: Authorization: Bearer <API 키> 헤더와 함께 POST https://api.everyinfra.com/api/v1/social로 보냅니다. 키는 EVERYINFRA_API_KEY 환경 변수에서 읽고, 절대 하드코딩하지 마세요.
- 요청 본문에서 platform은 reddit, action은 search_suggest로 설정하고, 파라미터는 params 안에 넣습니다.
- 필수 파라미터:
- keyword: The text already typed in the search box; the first few letters are enough.
- 선택 파라미터:
- limit: 이 호출에서 반환할 최대 행 수로, 1 이상의 정수입니다. 생략하면 기본값이 적용되며, 실제 반환되는 행은 이보다 적을 수 있습니다.
- 레코드 목록을 반환합니다. 각 레코드의 주요 필드: row_type (행 유형입니다), keyword (The suggested completion on search_sugg…), rank, community, community_id (Reddit's ID for the community, starting…), url, icon_url (Image URL of the icon: the community ic…), weekly_visitor_count (Weekly visitors to the community as Red…), is_nsfw (Whether the community (search_suggest)…).
- 요청 본문 예시:
{
"platform": "reddit",
"action": "search_suggest",
"params": {
"keyword": "coffee"
}
}
- 요금: 요청 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 | 예 | search_suggest | 기능 식별자이며 고정값입니다. |
keyword | body.params | string | 예 | - | The text already typed in the search box; the first few letters are 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": "search_suggest",
"params": {
"keyword": "coffee"
}
}'OpenAPI 정의(JSON)샘플 코드는 EVERYINFRA_API_KEY 환경 변수에서 키를 읽으므로, 복사한 코드에는 API 키가 포함되지 않습니다.
응답 예시
#{ "id": "req_…", "platform": "reddit", "action": "search_suggest", "results": [ { "row_type": …, "keyword": …, "rank": …, "community": …, "community_id": …, "url": …, "icon_url": …, "weekly_visitor_count": …, "is_nsfw": …, "platform": … } ], "count": …, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
응답 필드
#비즈니스 데이터는 results에 담깁니다. 아래 표는 레코드에 포함될 수 있는 필드를 나열하며, 플랫폼에 표시되지 않는 값을 임의로 만들어 넣지 않습니다.
| 필드 | 의미 |
|---|---|
row_type | 행 유형입니다. painpoint에서는 summary(호출당 하나), post(분석한 토론), pain_comment(추천을 가장 많이 받은 부정적 댓글 중 하나, 전문) 중 하나입니다. search_suggest에서는 keyword(자동 완성어) 또는 community입니다. explore에서는 topic 또는 community입니다. |
keyword | The suggested completion on search_suggest keyword rows, and the trending term on trending_searches rows. |
rank | 플랫폼 자체의 의미를 따름 |
community | 플랫폼 자체의 의미를 따름 |
community_id | Reddit's ID for the community, starting with t5_ (subreddit_info, subreddit_rules, search_suggest, user_subreddits, explore, topic_subreddits). |
url | 플랫폼에서 해당 레코드로 연결되는 링크입니다. |
icon_url | Image URL of the icon: the community icon (subreddit_info, subreddit_rules, search_suggest, user_subreddits, explore, topic_subreddits) or the achievement icon (user_trophies). |
weekly_visitor_count | Weekly visitors to the community as Reddit shows it (subreddit_info, explore, topic_subreddits). In search_suggest it is the rounded figure from the dropdown, so 93K is recorded as 93000, and not every row has it. |
is_nsfw | Whether the community (search_suggest) or the user (profile) is marked NSFW. |
platform | 출처 플랫폼 식별자로, 요청의 platform과 같습니다(예: xiaohongshu, tiktok). |
오류 및 과금
#- 401
- 키가 없거나 유효하지 않습니다.
- 402
- 잔액이 부족합니다. 먼저 충전하세요.
- 422
- 파라미터 이름 또는 값이 올바르지 않습니다. 오류에 제시된 제안을 참고해 수정하세요. 과금되지 않습니다.
- 429
- 분당 요청 속도 제한에 도달했습니다. Retry-After만큼 기다린 뒤 다시 시도하세요.
- 503
- 처리를 완료하지 못했습니다. 보류된 금액은 잔액으로 반환됩니다. 결과가 불확실하면 재시도하기 전에 먼저 확인하세요.
- 200 빈 결과
- 데이터가 없습니다. 과금되지 않습니다.