2013-08-30 3 views
1

카테고리 ID 및 키워드로 동영상을 검색하려고합니다. 내가 갖는키워드 및 카테고리 ID로 YouTube API 검색

https://www.googleapis.com/youtube/v3/search?part=snippet&key=API_KEYs&videoCategoryId=10&q=bieber 

:

{ 
"error": { 
    "errors": [ 
    { 
    "domain": "youtube.search", 
    "reason": "invalidSearchFilter", 
    "message": "Invalid combination of search filters and/or restrictions.", 
    "locationType": "parameter", 
    "location": "" 
    } 
    ], 
    "code": 400, 
    "message": "Invalid combination of search filters and/or restrictions." 
} 
} 

내가 뭘 내 API 요청에 변경해야합니다 여기

내 링크입니다?

답변

5

데이터 API에는 통합 검색이 있습니다. 즉, 검색은 동영상, 재생 목록 및 채널을 반환합니다. videoCategoryId와 같은 동영상 관련 매개 변수를 기준으로 필터링하려면 "type = video"를 정의해야합니다.

https://www.googleapis.com/youtube/v3/search?part=snippet&q=bieber&type=video&videoCategoryId=10&key={YOUR_API_KEY}