1
votes

As the title states, I can't get any way to filter all CommentThreads using the "?" searchTerm, this returns an empty list of CommentThreads.

Tried \? , \?, plain %03F, unicode \u0003F. Nothing seems to work. Is there a way to filter by the questionmark ? I'm trying to retrieve all the questions from a video and if I can't filter this way it means I have to pull down everything and filter locally, which is really expensive (quota-wise).

Here is the api explorer url :

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.commentThreads.list?part=id%252Csnippet&maxResults=10&order=time&searchTerms=%253F&textFormat=html&videoId=o4lMYiwKYRs&fields=items(replies%252Csnippet)%252CnextPageToken&_h=18&

1

1 Answers

1
votes

I don't know if this is a bug or not, but it seems that the searchTerms parameter has its own rules to make itself works or filter the results.

Let us use this videoId=2ecT9zf1QZU that has a comments of:

24

kobe bryant?

24kobe

?kobe

kobe? bryant

IDOL24

If we use searchTerms=?, we will get 0 result like the one you experienced, because I think it does not work with special character alone or words that have this special character. (eg. ?)

If we use searchTerms=kobe, we will get 3 results, (kobe bryant?, ?kobe and kobe? bryant) so it work with a word without special character.

Now, we use searchTerms=?kobe and searchTerms=kobe?, we will get 0 result because of the special character ?.

What if we use searchTerms=yant (from the word bryant), the result is 0, because there is no word in the result that have a word yant.

So meaning there are some rules or limitation in using this searhTerms.

I hope this information helps you.