Search code examples
google-apiyoutube-apiyoutube-data-api

Youtube API, can I query videos filtering out channels?


I am writing queries to the Youtube Data v3 API and I want to see a list of videos that don't include videos by a certain channel. For example, a keyword search "iPhone" but not by Apple's channel. It doesn't work if I just do "-Apple" because that is filtering out the keyword versus the channel. Is there any way to do this?


Solution

  • Using as the query '"iPhone" -Apple"' removes all videos containing Apple (source), so it removes more than what you want but it does the job.

    By the way Apple only uploaded 202 public videos as of today, so you could just exclude their channel id (UCE_M8A5yxnLfW0KghEeajjw) from the results you got with Search: list.