Open jdeverdun opened 1 year ago
Hello jdeverdun,
You are not the only one. I gather Google Trends data automatically on a daily basis for a project and since today I got the same Error code for all my request. Though until yesterday it still seemed to work out for me.
And also when the range is specified it does still work.
I hope this problem is solvable.
Kind regards.
I am also getting the error, but only for the "past day" search. I will investigate this.
Just to let you know I tried various tools, like pytrends and even serpAPI but same, I guess google is doing some work
same happening with me since 3 days
Same issue for me. Started yesterday.
I am also getting the error, but only for the "past day" search. I will investigate this.
Hi! Do you have any update on the issue? I am still getting the same error when I use "now" time formats like "now 1-H" or "now 1-d" etc. The other time formats like 'today 1-m' seem to work fine. So it looks like an issue that affects only the "Last" n hours /days and not the "Past" queries. Please let me know if you have any updates on the problem.
Hello, I'm experiencing the same issue. I get the status code 500.
This is what we are sending:
{
"userConfig": {
"userType": "USER_TYPE_SCRAPER"
},
"locale": "en-US",
"comparisonItem": [
{
"geo": {
"country": "FR"
},
"complexKeywordsRestriction": {
"keyword": [
{
"type": "BROAD",
"value": "bike"
}
]
}
}
],
"resolution": "EIGHT_MINUTE",
"requestOptions": {
"category": 0,
"backend": "CM",
"property": ""
},
"time": "2023-07-04T12\\:03\\:43 2023-07-05T12\\:03\\:43"
}
This is what Google Trends (website) is sending:
{
"time": "2023-07-04T11\\:36\\:47 2023-07-05T11\\:36\\:47",
"resolution": "EIGHT_MINUTE",
"locale": "en-US",
"comparisonItem": [
{
"geo": {
"country": "FR"
},
"complexKeywordsRestriction": {
"keyword": [
{
"type": "BROAD",
"value": "bike"
}
]
}
}
],
"requestOptions": {
"property": "",
"backend": "CM",
"category": 0
},
"userConfig": {
"userType": "USER_TYPE_LEGIT_USER"
}
}
Besides userType
, this is the same. So I do not know what is going on at the moment. Note that userType
is also set to USER_TYPE_SCRAPER
when we use other time ranges such as date=today 5-y
so this is not obvious that this is the cause of the problem.
Thanks for this information, I also checked on the google trends website and in fact we can see that if you try to access the embed code for the interest by city map, we also have a 505 error for this kind of request (still working fine for specific date request).
So again, google should be working on it.
Best
I will keep an eye open for this.
I will keep an eye open for this.
Thank you.
Hi, does anyone have any updates on this? It seems to be a Google Trends issue, but does anyone know if it's transient or we need to find another way to fetch the weekly and daily data?
I tried to enhance the request by adding the part:
"userConfig": { "userType": "USER_TYPE_LEGIT_USER" }
However, then I get a HTML-401 error. I guess one needs to send a cookie or something with the request for the widget to the get the status USER_TYPE_LEGIT_USER.
I do not see an easy fix at the moment. Any ideas are welcome :)
I'm not a technician but could it be due to these errors on the google trends website?
I just noticed that the response changed from 500 (Internal Server Error) to 429 (Too many requests) .
yeah in node.js lib I have the same problem. 500 http is replaced by 429 even if I use residential proxies.
Long time {gtrendsR}
user here, now encountering this same problem for the first time :(
Same here, it has been going on for three weeks
EDIT: We have a scheduler running to gather google trends data automatically on a daily basis, using now 1-d
. This has not worked for the last 3 weeks, but since July 22, 5 am in the morning, it produced datasets again. But now when I run the script manually, it returns the "Status code was not 200. Returned status code:429" error code.
@barbara1998 You are able to use now 1-d
?
@PMassicotte sorry, maybe a false alarm, I made an edit to my comment.
Tx for reporting.
I'm having the same issue.
Hello all!! It seems it works now!!
I confirm, the API is functional!
Oh good to know! Anyone has information on what happened?
Hey everyone,
as I also mentioned in #452 I run several gtrendsR request automatically on a daily basis. Since the 16.08.2023 the problem from the 04.07. seems to repeat itself. Since then there is no new data.
Encountering this issue today for the first time:
gtrends("Biden", gprop = 'web', geo = 'US',time = "2023-02-15 2023-04-14" ) Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. Returned status code:429
Tried various time ranges, got same result, except for on the second try, which worked:
gtrends("Biden", gprop = 'web',geo = 'US', time = "now 1-d" )
The first attempt with the above code resulted in:
Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. Returned status code:500
Not sure what is going on, working on my side:
library(gtrendsR)
plot(gtrends("Biden", gprop = 'web', geo = 'US',time = "2023-02-15 2023-04-14" ))
Created on 2023-10-13 with reprex v2.0.2
thank you. not sure what is going on. this works: plot(gtrends("Biden", gprop = 'web', geo = 'US',time = "2023-02-15 2023-04-14" ))
but this does not:
plot(gtrends("Biden", gprop = 'web', geo = 'US',time = "all" )) Error in FUN(X[[i]], ...) : Status code was not 200. Returned status code:429
Nor does this:
plot(gtrends("Biden", gprop = 'web', geo = 'US',time = "today 3-m" )) Error in FUN(X[[i]], ...) : Status code was not 200. Returned status code:429
Nor does this, my real interest:
place2 <- gtrends(keyword = c("/m/0c3kw5"), geo = "", time="all", low_search_volume = F) Error in FUN(X[[i]], ...) : Status code was not 200. Returned status code:429
I also encountered this issue:
gtrends("nuclear war", geo = "US", gprop = "web")
Error in FUN(X[[i]], ...) :
Status code was not 200. Returned status code:429
I encounter the same problem since today.
gtrends(keyword = "svp",time = "now 1-d", geo = "CH",cookie_url = "http://trends.google.com/Cookies/NID", tz=Sys.timezone()) Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. Returned status code:429Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. Returned status code:429
yep same here, on few request are accepted.
Same here
It is failing for me too, on two machines including one with a rebuilt-from-git installation, and as an additional check also in a fresh Docker run (i.e. no possible stale cookie).
Anyone has any updates ?
the widget now contains the line:
"userConfig":{"userType":"USER_TYPE_SCRAPER"}
the google request sends:
"userConfig":{"userType":"USER_TYPE_LEGIT_USER"}
This might be what is causing the problem...
Just saw that embed trends were working again. I was hoping something was unlocked ðŸ˜
Just tried to force using
payload2$userConfig$userType <- "USER_TYPE_LEGIT_USER"
No success, this will require more investigation.
Still not working in 2024:
Error in interest_over_time(widget, comparison_item, tz) :
Status code was not 200. Returned status code:429
Anyone find a solution?
In fact it was working back a few days ago, but the issue came back yesterday for everyone
Same issue for me this week -- does not work no matter the keyword or delay.
Is there any way to refresh the cookies? It seemed like a package reinstall fixed the issue, at least temporarily for a few test runs
EDIT: not working again even after reinstall.
Same issue for me, tried to run K0 <- gtrends(keyword = term, geo = country, time = period, onlyInterest = TRUE)
and received the same error:
Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. Returned status code:429
Please make a reproducible example. This gtrends("nhl")
is working on my side.
term = c("Mediterranean diet", "Veganism", "Vegetarianism", "Gluten-free diet", "Low-carbohydrate diet")
country = ""
period = "2010-01-01 2023-12-31"
K0 <- gtrends(keyword = term, geo = country, time = period, onlyInterest = TRUE)
Works fine on my side.
library(gtrendsR)
term <- c("Mediterranean diet", "Veganism", "Vegetarianism", "Gluten-free diet", "Low-carbohydrate diet")
country <- ""
period <- "2010-01-01 2023-12-31"
K0 <- gtrends(keyword = term, geo = country, time = period, onlyInterest = TRUE)
plot(K0)
Created on 2024-03-15 with reprex v2.1.0
Works fine on my side.
library(gtrendsR) term <- c("Mediterranean diet", "Veganism", "Vegetarianism", "Gluten-free diet", "Low-carbohydrate diet") country <- "" period <- "2010-01-01 2023-12-31" K0 <- gtrends(keyword = term, geo = country, time = period, onlyInterest = TRUE) plot(K0)
Created on 2024-03-15 with reprex v2.1.0
Your specific example also produces the error for me:
term <- c("Mediterranean diet", "Veganism", "Vegetarianism", "Gluten-free diet", "Low-carbohydrate diet") country <- "" period <- "2010-01-01 2023-12-31" K0 <- gtrends(keyword = term, geo = country, time = period, onlyInterest = TRUE) Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. Returned status code:429
Now my previous example works oddly enough, but I am having trouble with the exact next line of code:
K1 <- gtrends(keyword = term[1], geo = country, time = period, onlyInterest = TRUE)
It again returns the same error
Edit: I just re-tried it, now it works
Hello everyone,
Since a few day I've got the error (on any request): Error in interest_over_time(widget, comparison_item, tz) : Status code was not 200. Returned status code:500
I first though it was a daily limit, yet I still havethis issue on other computer. Am I the only one ?
EDIT : the issue seems to be related to the time range, it fails when I give for example
a=gtrends( 'bike' , geo = 'FR' ,time= 'now 1-d' , low_search_volume = TRUE)
but it "does not fail" when date range is specified.
I guess it is related to google trends itself, but wanted to make sure !
Thanks for your help.
Best regards