bernorieder / YouTube-Data-Tools

YTDT is a collection of simple tools for extracting data from the YouTube platform via the YouTube API v3.
GNU General Public License v3.0
121 stars 49 forks source link

Search query #14

Open bkotras13 opened 5 months ago

bkotras13 commented 5 months ago

Hello Bernhard & all,

I have several questions about the querying mode of Channel List and Video List modules.

1) How is represented the boolean operator OR? I tried with comma and | and results vary 2) Against which fields are search terms matched in YouTube data? I thought it was title, description and tags but I sometimes get relevant results while my search terms aren't matched in any of these fields. 3) How does the search engine deal with quotes for multi-word keywords (i.e. 'farm equipment')? I get different results with "farm equipment", 'farm equipment' and farm equipment. 4) Why does the search engine gives me English-speaking results from Pakistan when I set language and country to French and France?

I understand that all of this has to see with Google's API and not really with YTDT but I could not find the information in Google's guidelines.

Thank you so much in advance for your help, Baptiste

bernorieder commented 5 months ago

This is indeed a YouTube API question, and your best chances to get qualified answers is to ask it here: https://stackoverflow.com/questions/tagged/youtube-api (the YT doc says the API team follows the tag).

That said, I'll try to answer as best as I can:

  1. This is documented here (https://developers.google.com/youtube/v3/docs/search/list) in the passage on the "q" parameter.
  2. I do not know. In my experience, "relevance" ranking searches over more fields and throws a wider semantic net than "date" or "views" ranking. When using the latter two, most videos found will have the search query in the title or description.
  3. I do not know, but 2 applies.
  4. From my experience, the language and country parameters do very little. Your best bet is to use a more restrictive ranking mode and language-specific search terms.

Overall, YT's API is not a research tool, but made for developers. It's there to produce engagement, not insights. We are currently preparing a paper that looks into some of these questions, but it's going to take some time.