0

I recently (since a few months) have an issue regarding the number of requests sent by my javascript page to the YouTube's search list API. When I check Google's metrics page, it shows hundreds and even thousands of request per day, while i'm only doing a few.

On the image, you can see that the day before, my maximum limit was almost reached (10000), and today it's at about a few hundreds...

enter image description here

I thought at first that my script had a bug, sending 100 times more requests than it should... But when debugging, I found out that only 1 request was sent at a time. And even looking at a tcpdump using port 443 on TCP (and now UDP for QUIC's HTTP/3), it is far from 100 packets (only a few)...

So I thought it was an HTTP3 (new) issue, and fired up an old gnome browser, and tcpdump showed TCP flows, so it effectively uses HTTP/1.1 or /2, and got the same results ! Over a hundred queries seen on Google's service page.

I investigated even further, and even sending a single bash command with wget, I get the exact same results !! 102 queries more...

wget "https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=1&q=h&type=video&videoDuration=any&fields=items(id(videoId)%2Csnippet(description%2Ct
itle))%2CnextPageToken%2CpageInfo%2CprevPageToken%2CregionCode&key=MYKEY..."

Anybody have an explanation ?

1 Answer 1

0

It seems that the word "queries" is a bit misleading in Google's webpage...

What is shown in the graph is actually the number of "tokens" used. And since 1 real search query equals to about 100 tokens, this is why the numbers rose so rapidly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.