I am sending requests to the YouTube v3 API at the following endpoint:
const url = `https://www.googleapis.com/youtube/v3/search?key=${process.env.YOUTUBE_API_KEY}&part=snippet&q=foo`;
I am going to change this to use channelId to specify a channel as foo is the channel name. I want to also use the search:list functionality to search for videos within a specific channel that have titles containing keywords that as I understand can be passed via the q parameter.
Is there a way to provide multiple values for q as I need to search video titles on multiple criteria?
Quoting from the docs
q string: The
qparameter specifies the query term to search for.
Your request can also use the Boolean NOT (
-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either "boating" or "sailing", set the q parameter value to boating|sailing. Similarly, to search for videos matching either "boating" or "sailing" but not "fishing", set the q parameter value toboating|sailing -fishing. Note that the pipe character must be URL-escaped when it is sent in your API request. The URL-escaped value for the pipe character is%7C.
You can also try out the API on that page itself, see the Try it! button on the right navbar.
There you can experiment with all the parameters and it will give out code in js, java, PHP, python directly.