YouTube Search in channel API
POST
API 상태
- 24시간 상태
- 정상
- 양호 / 정상
- 사용 가능
정상
최근 24시간
최근 30일
Search inside one YouTube channel by keyword, from the channel link or @handle. Rows are videos, Shorts and playlists (see type) with title, view count, duration, the time YouTube shows and badges. About 30 per page; pass next_page_token back as page_token for more.
POST https://api.everyinfra.com/api/v1/social을 보내고 platform은 youtube, action은 search_in_channel로 설정합니다. 요금은 요청 1,000개당 $0.56(호출당 $0.000556)입니다. 실패한 호출과 빈 결과에는 과금하지 않습니다. 동기 방식입니다. 오래 걸리는 작업은 요청 본문에 "mode": "async"를 추가하고 job_id를 받아 폴링하세요.
AI 프롬프트
#EveryInfra YouTube Search in channel 엔드포인트(youtube/search_in_channel)를 사용하는 데이터 수집 스크립트 작성을 도와주세요.
엔드포인트 사용 방법:
- 요청: Authorization: Bearer <API 키> 헤더와 함께 POST https://api.everyinfra.com/api/v1/social로 보냅니다. 키는 EVERYINFRA_API_KEY 환경 변수에서 읽고, 절대 하드코딩하지 마세요.
- 요청 본문에서 platform은 youtube, action은 search_in_channel로 설정하고, 파라미터는 params 안에 넣습니다.
- 필수 파라미터:
- url: A YouTube channel link (https://www.youtube.com/@NASA or https://www.youtube.com/channel/UC…), an @handle, or a channel ID that starts with UC. Only this channel is searched.
- keyword: Search words, up to 200 characters. Results mix videos, Shorts and playlists; check each row's type.
- 선택 파라미터:
- page_token: Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged. About 30 rows per page, as YouTube sends them.
- 레코드 목록을 반환합니다. 각 레코드의 주요 필드: type, id, url, title, text, author_name, author_username, author_id, author_url, author_avatar_url, author_is_verified (Whether the channel has a verified badg…), view_count; 전체 필드 20개, 전체 목록은 https://api.everyinfra.com/api/v1/social/catalog?platform=youtube.
- 요청 본문 예시:
{
"platform": "youtube",
"action": "search_in_channel",
"params": {
"url": "https://www.youtube.com/@NASA",
"keyword": "moon"
}
}
- 요금: 요청 1,000개당 $0.56. 실패하거나 빈 결과에는 과금하지 않습니다.
- 대상이 수십~수백 개라면 요청 본문에 "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 | 예 | youtube | 플랫폼 식별자이며 고정값입니다. |
action | body | string | 예 | search_in_channel | 기능 식별자이며 고정값입니다. |
url | body.params | string | 예 | - | A YouTube channel link (https://www.youtube.com/@NASA or https://www.youtube.com/channel/UC…), an @handle, or a channel ID that starts with UC. Only this channel is searched. |
keyword | body.params | string | 예 | - | Search words, up to 200 characters. Results mix videos, Shorts and playlists; check each row's type. |
page_token | body.params | string | 아니요 | - | Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged. About 30 rows per page, as YouTube sends them; each page is one call and limit has no effect. Tokens last 24 hours, and the last page has no next_page_token. |
코드 샘플
#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": "youtube",
"action": "search_in_channel",
"params": {
"url": "https://www.youtube.com/@NASA",
"keyword": "moon"
}
}'OpenAPI 정의(JSON)샘플 코드는 EVERYINFRA_API_KEY 환경 변수에서 키를 읽으므로, 복사한 코드에는 API 키가 포함되지 않습니다.
응답 예시
#November 21, 2026 at 07:24(UTC)에 위 코드 샘플의 파라미터로 이 API를 호출해 수집한 응답입니다. results와 count는 해당 호출의 실제 응답이며, 개인정보(이름, 핸들, 아바타, 프로필 링크, 연락처)는 제거했습니다(목록은 처음 2개만 표시). id, billing, quota는 호출할 때마다 달라지므로 형태만 표시합니다.
json
{ "id": "req_…", "platform": "youtube", "action": "search_in_channel", "results": [ { "type": "video", "id": "IfRqrrBbT-Y", "url": "https://www.youtube.com/watch?v=IfRqrrBbT-Y", "title": "Artemis II Moon Mission Complete!", "text": "Our Artemis II Moon mission is complete!\nSpace Launch System rocket launched crew into space\nOrion spacecraft provided a safe “home away from home” for astronauts\nFlew around the Moon,...", "author_name": "NASA", "author_username": "NASA", "author_id": "•••", "author_url": "https://www.youtube.com/@NASA", "author_avatar_url": "https://yt3.googleusercontent.com/•••", "author_is_verified": true, "view_count": 987902, "duration": "00:03:33", "published_text": "7 months ago", "thumbnail_url": "https://i.ytimg.com/vi/IfRqrrBbT-Y/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLB1B1sNNE_AOGy5LPLeaDP38ZN80A", "badges": [ "CC" ], "platform": "youtube" }, { "type": "video", "id": "Vg-EQ7MOu6I", "url": "https://www.youtube.com/watch?v=Vg-EQ7MOu6I", "title": "Around the Moon for All Humanity: Artemis II (Official Launch Trailer)", "text": "Action. Wonder. Adventure. Artemis II has got it all. Don't miss the moment. Our crewed Moon mission will launch as early as April 1.\n\nUnder Artemis, NASA will send astronauts on increasingly...", "author_name": "NASA", "author_username": "NASA", "author_id": "•••", "author_url": "https://www.youtube.com/@NASA", "author_avatar_url": "https://yt3.googleusercontent.com/•••", "author_is_verified": true, "view_count": 1650126, "duration": "00:01:16", "published_text": "7 months ago", "thumbnail_url": "https://i.ytimg.com/vi/Vg-EQ7MOu6I/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAwlAQUzbi1WhsHnEROLKj3nvYryA", "badges": [ "CC" ], "platform": "youtube" } ], "next_page_token": …, "pagination": { … }, "count": 30, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
응답 필드
#비즈니스 데이터는 results에 담깁니다. 아래 표는 레코드에 포함될 수 있는 필드를 나열하며, 플랫폼에 표시되지 않는 값을 임의로 만들어 넣지 않습니다.
| 필드 | 의미 |
|---|---|
type | 레코드 유형입니다. 값은 기능에 따라 다릅니다(예: video / image / text). |
id | 플랫폼에서 레코드의 고유 ID입니다. 한 플랫폼 안에서만 고유하며, 플랫폼이 다르면 ID가 중복될 수 있습니다. |
url | 플랫폼에서 해당 레코드로 연결되는 링크입니다. |
title | 제목입니다. 플랫폼에 제목이 없으면 null입니다(예: 텍스트 전용 게시물). |
text | HTML을 제거한 본문으로, 잘리지 않고 전체가 반환됩니다(일부 플랫폼은 목록 결과 자체에 발췌문만 포함되며, 이 경우 해당 플랫폼의 필드 설명에 명시되어 있습니다). |
author_name | 작성자의 표시 이름입니다. |
author_username | 작성자의 사용자 이름(@handle)으로, 보통 URL에 사용할 수 있습니다. |
author_id | 플랫폼에서 작성자의 고유 ID입니다. |
author_url | 플랫폼의 작성자 프로필 링크입니다. |
author_avatar_url | 플랫폼 자체의 의미를 따름 |
author_is_verified | Whether the channel has a verified badge. |
view_count | 조회수 또는 재생 수입니다. null은 비공개라는 뜻이며, 0이 아닙니다. |
duration | 플랫폼 자체의 의미를 따름 |
published_text | Publish time as written on the YouTube page, in relative form (e.g. 2 years ago), returned as is; null when the page shows none. |
thumbnail_url | 썸네일 링크로, image_url보다 해상도가 낮습니다. |
badges | Badges shown on the video, as an array of strings (e.g. 4K, CC, New); an empty array when there are none. |
is_live | Whether the video is live now. |
is_upcoming | Whether it is a premiere or scheduled live stream that has not started yet. |
playlist_id | ID of the playlist or mix when the row is one; otherwise null. |
video_count | 플랫폼 자체의 의미를 따름 |
platform | 출처 플랫폼 식별자로, 요청의 platform과 같습니다(예: xiaohongshu, tiktok). |
오류 및 과금
#- 401
- 키가 없거나 유효하지 않습니다.
- 402
- 잔액이 부족합니다. 먼저 충전하세요.
- 422
- 파라미터 이름 또는 값이 올바르지 않습니다. 오류에 제시된 제안을 참고해 수정하세요. 과금되지 않습니다.
- 429
- 분당 요청 속도 제한에 도달했습니다. Retry-After만큼 기다린 뒤 다시 시도하세요.
- 503
- 처리를 완료하지 못했습니다. 보류된 금액은 잔액으로 반환됩니다. 결과가 불확실하면 재시도하기 전에 먼저 확인하세요.
- 200 빈 결과
- 데이터가 없습니다. 과금되지 않습니다.