Search
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
search
결과에는 API 요청에 지정된 검색 매개변수와 일치하는 YouTube 동영상, 채널 또는 재생목록에 관한 정보가 포함됩니다. 검색 결과는 동영상과 같이 고유하게 식별 가능한 리소스를 가리키지만 자체 영구 데이터는 없습니다.
메서드
API는 검색에 다음 메소드를 지원합니다.
- list
- API 요청에 지정된 쿼리 매개변수와 일치하는 검색 결과 컬렉션을 반환합니다. 기본적으로 검색 결과 세트는 일치하는
video
, channel
, playlist
리소스를 식별하지만 특정 유형의 리소스만 검색하도록 쿼리를 구성할 수도 있습니다.
지금 사용해 보기
리소스 표현
다음 JSON 구조는 검색 결과의 형식을 보여줍니다.
{
"kind": "youtube#searchResult",
"etag": etag,
"id": {
"kind": string,
"videoId": string,
"channelId": string,
"playlistId": string
},
"snippet": {
"publishedAt": datetime,
"channelId": string,
"title": string,
"description": string,
"thumbnails": {
(key): {
"url": string,
"width": unsigned integer,
"height": unsigned integer
}
},
"channelTitle": string,
"liveBroadcastContent": string
}
}
속성
다음 표는 검색결과에 표시되는 속성을 정의합니다.
속성 |
kind |
string
API 리소스의 유형을 식별합니다. 값은 youtube#searchResult 입니다. |
etag |
etag
이 리소스의 Etag입니다. |
id |
object
id 객체에는 검색 요청과 일치하는 리소스를 고유하게 식별하는 데 사용할 수 있는 정보가 포함됩니다. |
id.kind |
string
API 리소스의 유형입니다. |
id.videoId |
string
id.type 속성의 값이 youtube#video 이면 이 속성이 표시되고 값에는 YouTube가 검색어와 일치하는 동영상을 고유하게 식별하는 데 사용하는 ID가 포함됩니다. |
id.channelId |
string
id.type 속성의 값이 youtube#channel 이면 이 속성이 표시되고 값에는 YouTube가 검색어와 일치하는 채널을 고유하게 식별하는 데 사용하는 ID가 포함됩니다. |
id.playlistId |
string
id.type 속성의 값이 youtube#playlist 인 경우 이 속성이 표시되며 값에는 YouTube가 검색어와 일치하는 재생목록을 고유하게 식별하는 데 사용하는 ID가 포함됩니다. |
snippet |
object
snippet 객체에는 검색 결과에 관한 기본 세부정보(예: 제목, 설명)가 포함됩니다. 예를 들어, 검색결과가 동영상인 경우 제목은 동영상의 제목이고 설명은 동영상의 설명입니다. |
snippet.publishedAt |
datetime
검색 결과에서 식별하는 리소스의 생성 날짜 및 시간입니다. 값은 ISO 8601 형식으로 지정됩니다. |
snippet.channelId |
string YouTube에서 검색 결과에서 식별한 리소스를 게시한 채널을 고유하게 식별하는 데 사용하는 값입니다. |
snippet.title |
string
검색 결과의 제목입니다. |
snippet.description |
string
검색 결과에 대한 설명입니다. |
snippet.thumbnails |
object
검색 결과와 연결된 썸네일 이미지의 지도입니다. 맵의 각 개체에 대해, 키는 미리보기 이미지의 이름이고 값은 미리보기 이미지에 대한 기타 정보를 포함하는 개체입니다. |
snippet.thumbnails.(key) |
object
유효한 키 값은 다음과 같습니다.default – 기본 썸네일 이미지입니다. 동영상 또는 동영상을 참조하는 리소스(예: 재생목록 항목, 검색 결과)의 기본 썸네일은 너비 120픽셀, 높이 90픽셀입니다. 채널의 기본 미리보기 이미지는 88x88픽셀입니다.medium – 썸네일 이미지의 고해상도 버전입니다. 동영상 (또는 동영상을 참조하는 리소스)의 경우 이 이미지의 너비는 320px, 높이는 180px입니다. 채널의 경우 이 이미지는 240x240픽셀입니다.high – 썸네일 이미지의 고해상도 버전입니다. 동영상 (또는 동영상을 참조하는 리소스)의 경우 이 이미지는 너비 480px, 높이 360px입니다. 채널의 경우 이 이미지는 800x800픽셀입니다.standard : high 해상도 이미지보다 썸네일 이미지의 해상도가 더 높습니다. 이 이미지는 일부 동영상과 동영상을 참조하는 다른 리소스(예: 재생목록 항목, 검색 결과)에 사용할 수 있습니다. 이 이미지의 너비는 640px, 높이는 480px입니다.maxres – 썸네일 이미지의 최고 해상도 버전입니다. 이 이미지 크기는 일부 동영상과 동영상을 참조하는 다른 리소스(예: 재생목록 항목, 검색 결과)에 사용할 수 있습니다. 이 이미지의 너비는 1280px, 높이는 720px입니다.
|
snippet.thumbnails.(key).url |
string
이미지의 URL입니다. |
snippet.thumbnails.(key).width |
unsigned integer
이미지의 너비입니다. |
snippet.thumbnails.(key).height |
unsigned integer
이미지의 높이입니다. |
snippet.channelTitle |
string 검색 결과에서 식별한 리소스를 게시한 채널의 제목입니다. |
snippet.liveBroadcastContent |
string
video 또는 channel 리소스에 라이브 방송 콘텐츠가 있는지 여부를 나타냅니다. 유효한 속성 값은 upcoming , live , none 입니다.
video 리소스의 경우 값이 upcoming 이면 동영상이 아직 시작되지 않은 라이브 방송이고 값이 live 이면 동영상이 진행 중인 라이브 방송임을 나타냅니다. channel 리소스의 경우 upcoming 값은 채널에 아직 시작되지 않은 예약된 방송이 있음을 나타내고 live 값은 채널에 활성 라이브 방송이 있음을 나타냅니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-15(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-11-15(UTC)"],[[["Search results from the API provide information about YouTube videos, channels, or playlists that match specific search criteria, without containing persistent data themselves."],["The `search/list` method returns a collection of search results and can be configured to retrieve specific resource types like videos, channels, or playlists."],["Each search result contains an `id` object that uniquely identifies the matched resource, and the `kind` property within this object specifies whether it is a video, channel, or playlist."],["The `snippet` object in a search result includes basic details like the title, description, channel information, publishing date, and thumbnail images related to the search result."],["Thumbnail images in a search result are provided in various resolutions (`default`, `medium`, `high`, `standard`, `maxres`), with each having its own URL, width, and height."]]],["The YouTube API's `search/list` method retrieves search results matching specified parameters. These results point to videos, channels, or playlists but don't store their own data. Each result contains an `id` object for identification (video, channel, or playlist ID) and a `snippet` with details like title, description, publication date, channel information, and thumbnails. The results' `kind` is `youtube#searchResult`, and `etag` holds the resource's Etag. You can also filter searches by a specific resource type.\n"]]