pytrends icon indicating copy to clipboard operation
pytrends copied to clipboard

interest_over_time()

Open jiangcheng1999 opened this issue 3 years ago • 8 comments

The collected numbers by using interest_over_time() differ dramatically from the google trends website, how is that possible? either for 12 months or for other time intervals, none of this works properly, why???

jiangcheng1999 avatar Aug 11 '22 09:08 jiangcheng1999

I have the same problem,Have you solved the problem

veronica001 avatar Aug 29 '22 09:08 veronica001

same here

Izem0 avatar Sep 12 '22 15:09 Izem0

I am experiencing the same problem today. I think sometimes google blacklists your IP and shows values that has no meaning. The result sometimes is the same for any keyword, so I think my theory is correct.

I tried the same code in two environments and had different results.

fabiorangel avatar Sep 12 '22 16:09 fabiorangel

I am experiencing the same problem today. I think sometimes google blacklists your IP and shows values that has no meaning. The result sometimes is the same for any keyword, so I think my theory is correct.

I tried the same code in two environments and had different results.

Just found out something: if the geo is set, e.g. US, the result is correct. Maybe there is something in google trends invalidating the request when geo=""; and not getting the worldwide info.

fabiorangel avatar Sep 12 '22 18:09 fabiorangel

Hey guys, if you are still experiencing this issue, please have a try of the following. it works for me.: First set the pytrend just the default without addind any geo or languages

pytrend = TrendReq() Then : kw_list = ['here your wished name' ] pytrend.build_payload(kw_list, timeframe="today 12-m", geo='NL') ####example of my case pytrend.interest_over_time() this way your problem should be solved.

jiangcheng197 avatar Sep 14 '22 17:09 jiangcheng197

Hey guys, if you are still experiencing this issue, please have a try of the following. it works for me.: First set the pytrend just the default without addind any geo or languages

pytrend = TrendReq() Then : kw_list = ['here your wished name' ] pytrend.build_payload(kw_list, timeframe="today 12-m", geo='NL') ####example of my case pytrend.interest_over_time() this way your problem should be solved.

Strangely, this did not happened today or yesterday. I think this might be an inconsistency on google trends json building. Anyway, the case that I was reporting was not giving any strange result when geo was set.

fabiorangel avatar Sep 14 '22 22:09 fabiorangel

The collected numbers by using interest_over_time() differ dramatically from the google trends website, how is that possible? either for 12 months or for other time intervals, none of this works properly, why???

I've run into this issue today and after various attempts at resolving it I eventually found the reason was down to me and wanted to post here in case it affects others in the same way. This may not be the exact solution to the raised issue but it does have the same symptoms so is worth checking if anyone else runs into it.

The reason for me was because I wasn't setting the timeframe when building the payload, therefore it defaulted to 5 years, however the Google Trends web page defaults to 12 months. Trying to compare a slice of that 5 year data vs the numbers in Google Trends will likely never match up or even be close if you have a trend that spiked at some point.

Double check you're setting the correct timeframe. Hope this helps

iamMeshi avatar Oct 25 '22 14:10 iamMeshi

This is probably related to #534.

TL;DR: Looks like Google returns different values when it detects you're not an user in their site.

Terseus avatar Oct 27 '22 13:10 Terseus