YouTube: How to search for the channels with given exact channel name? - youtube

I want to search for the YouTube channels with the given channel name.
Exact match with double quotation doesn't satisfy my need.
For example, when the given channel name is "ABC", I only want to retrieve channels with the name "ABC", and I don't want to retrieve channels with names such as "ABCD" or "ABCReadyGo" or "HiABC" or etc.
How can I do it?
Thanks for your help!

Related

Google Cloud Speech - Last Names from Speech Context Phrases Lowercased

I'm passing in a list of names to the Google Cloud Speech API like this:
speech_contexts: [{ phrases: [ "Bob Smith" ] }]
Google correctly identifies the names (like "Bob Smith") and inserts them into the text. However, they all appear in the transcription with the last name lowercased: "Bob smith". Why isn't the name appearing in the transcription in the format it was passed into the API ?
The phrase hints parameter is used by Speech API to perform and boost the recognizing and transcribing tasks, improving the probability that such words or phrases will be recognized; However, it can't guarantee that the text will match exactly.
I think you should try by sending these words separately in order to validate if the service can perform the transcription as specified in the prase hints as well as implement the maxAlternatives property that will retrieve multiple alternative results that you can filter based on the confidence value.
In case none of these options are helpful, you can use the Issue Tracker tool to raise and/or track a Speech API feature request in order to improve this service functionality.

Search in Youtube API by videoCategoryId

I am trying to run the following call of the Youtube search API:
GET https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=10&order=relevance&relatedToVideoId=_CgRVkydY6Q&type=video&videoCategoryId=2&key={YOUR_API_KEY}
It returns 10 results, but some of them are not in category 2. For example, it gave me a result (ID: TG5e9Px3h-M) with videoCategoryId 22. I assume it does the search in the category ID with LIKE, not exact match.
How can I make this search with exact match for videoCategoryId?
I think you cannot use relatedToVideoId and videoCategoryId at same time. Related videos list for a particular video is fixed in youtube. I have tried with 1,10,22,33,32 and 44 category id. But I got same result has I do not give videoCategoryId parameter. videoCategoryId is works when you search keyword and just give type parameter in api url.

Youtube data API, query within channel lead to unexcpected results

I'm trying to use Youtube Data API for a project, the goal is seeking for a keyword in a channel and show the response to the user. I used the Search for "snippet" part and launched it querying for a specific keyword and specifing the channel id but the response didn't include all the videos that I was expecting. For instance, let's say that the channel has 10 videos with "c" charachter in the title, setting the q field with "c" value will return only one video.
On the other side, if I search for a whole word it returns some videos with that word on title and some other videos that doesn't have it, neither in description. The order criteria in this case seems to be ok (from the strongest match to the most weak), but I don't know if all of this is working fine.
Is this a normal behaviour or am I doing something wrong?
Setting an order on the search, the issue seems to be solved.

Top 100 youtube videos

Is there any way to have updated lists of top 100 videos of youtube by genre and/or by country!
Any kind of resources like json files or xml.
You'll want to use the chart parameter of the videos.list endpoint. Set the chart to mostPopular, and then include a regionCode parameter and videoCategoryId parameter for further narrowing down. For example,
GET https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&regionCode=UA&key={YOUR_API_KEY}
Will retrieve the 5 most popular videos in the Ukraine.
GET https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&maxResults=25&regionCode=DE&videoCategoryId=1&key={YOUR_API_KEY}
Will retrieve the 25 most popular videos in Germany that relate to Film/Animation. And so on.
Note that if you don't include a videoCategoryId parameter, it will return results from all categories. If you don't include a regionCode, it returns the most popular videos across all regions. You can only set videoCategoryId to a value that's valid in the region you're searching in (you can use the videoCategories.list endpoint to find valid categories for regions, languages, etc.)

Youtube API automatically filters out "alphabet/number-added to search string"?

Let's say I search Youtube API for "Metric"
But I don't want search results like "econometrics" "metrics"
So I mean NO alphabet or number should be added to the left or right to the search string.
A space can be put to the left or right to the search string, like "Fun Metric course".
I was thinking about this.
But interestingly, when I search Youtube website (not API), if I search for "Metric", then only search results with "Metric" but no "econometrics" are displayed.
Another example: If I search for "microecon", then no search results with "microeconomics" are displayed.
Does Youtube website automatically filters out such words (like econometrics which have alphabets added to original search string "metric") even if I don't ask it to do so?
Similarly, does Youtube API (NOT website) automatically filters out such words (like econometrics which have alphabets added to original search string "metric") even if I don't ask it to do so??
It may be different for api version 3, but the documentation only refers to "The q parameter specifies the query term to search for".
But there is some brief documentation for this q paramter in api version 2.
See:https://developers.google.com/youtube/2.0/reference#qsp
Since it's very brief, here it is also:
The q parameter specifies a search query term. YouTube will search all video metadata for videos matching the term. Video metadata includes titles, keywords, descriptions, authors' usernames, and categories.
Note that any spaces, quotes or other punctuation in the parameter value must be URL-escaped.
To search for an exact phrase, enclose the phrase in quotation marks. For example, to search for videos matching the phrase "spy plane", set the q parameter to %22spy+plane%22.
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 to boating%7Csailing. (Note that the pipe character must be URL-escaped.)
Similarly, to search for videos matching either "boating" or "sailing" but not "fishing", set the q parameter to boating&7Csailing+-fishing.

Resources