-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error widget$status_code == 200 is not TRUE #166
Comments
Maybe wait a bit and try again. It is known that Google Trends has a limit. I just dont know the magic number. Can you try in few minutes and let us know. |
Hello Devs, I am looking for your help as I have encountered the same issue. For research purposes I was mass-downloading data using the following codes: for(n in 1:49){ posieconrestrends[1:length(temp1),(i2-1):(i2)] <- t(rbind(temp1, temp2)) where I stored the query word and dates as vectors to help with looping. As I had to download daily data, my time span has to be for every three month. After download around 30 of the 134 words, the error message Is there a way to solve for this search volume quota issue? I would be appreciated if you can advise me on this. Thank you! |
Good question. I have read that the limit if 500 queries per day. Have you try to debug and see what is the error message returned by curl? |
I just began to program with R a few month ago, so basically I am a noob in debugging... It seems to me that how Google blocks searches is extremely strange- when I use my phone's hotspot instead of wifi, the quota seemed to be renewed. However, if I use VPN on the computer instead, the quota limit will not be refreshed. Don't know how the mechanism works. |
hi all, @yidedereksong did u fix your Problem? |
@yidedereksong could you tell me how to use loop for google trends . mine codes are : getSeries <- function(a){ getSeries(out) a is vector of keywords and got error message of Error: widget$status_code == 200 is not TRUE |
Hi Philippe, I have the "res$status_code == 200 is not TRUE" error with your package since 5 days. Every search that I make return me that. Did you notice a problem with your package ? Many thanks for your answer ! Sami Benjelloun |
@sbenjelloun look at issue #252, there is a temporary solution. Note that this temporary solution does not give you the related topics and related queries lists. devtools::install_github('diplodata/gtrendsR') |
Hi @PMassicotte I am getting the same issue. I am working via a VM and am getting the Widget Status ==200 not true error. Below is the code: check <- gtrends(keyword = "dry", geo = c("CA", "US"), time = "now 7-d", What is interesting is that when I run the same code on my local machine, it works fine. The only difference is that on the VM, I had run a loop multiple times to pull data by each week before I ran the above code. Even that code is also showing same error now. I feel that due to multiple pulls with in a few minutes, Google has blocked the ip of the virtual machine. Do you have any knowledge of any such case? If yes, any help on how to resolve it would be much appreciated. Thanks |
@harelhan I am not really sure how Google sets the limits to the number of queries. Maybe others have better experience with batch queries. |
@PMassicotte |
Same error here - might be related to what google says on their website: "We are excited to announce a fresh new redesign of Google Trends! We have added new features and simplified our navigation to make [...]" |
Experiencing the same problem since Saturday |
Error: widget$status_code == 200 is not TRUE I am experiencing the same Problem since yesterday. Script worked totally fine before that... Any help is highly appreciated. |
Having the same problem: Error: widget$status_code == 200 is not TRUE after being able to run things smoothly a few days ago. Tried reinstalling curl and then the dev version but still not working. |
I am also experiencing the same problem for 4 days now. I have tried reinstalling curl and then the dev version, but still getting the Error: widget$status_code == 200. Any suggestions? |
Dear all, pull_orig <- gtrends("casa", time=date_range, geo="ES-MD") I get the error I have checked then in R the gtrends, what are the codes using It seems that the code for madrid is "ES-M". However, when I use that, I get the error More interestingly, if I do the search directly in google trends, the URL uses "ES-MD" as the code for MAdrid, and it works fine. Try Any suggestions? Much appreciate the help! |
It must be because ES-M is the entry we have in the data source we used to validate the country codes. |
Thanks @PMassicotte , is there a way to fix the error? and retrieve the data for Madrid through gtrends? |
Ideally, we should have a list of all Google country codes. If we can find that, we can use it as a source to populate the "countries" data.frame of the package. |
Sounds good @PMassicotte . I have downloaded below all the codes for the "regions" of Spain (the only subnational level allowed for trends for Spain). These were obtained from the wikipedia page for Spain (https://en.wikipedia.org/wiki/ISO_3166-2:ES). I have tested them using the googletrends site and they all work well. There's only 7 regions with the wrong code right now, the rest are ok. name,geo |
I found a way to get more codes programmatically. I will work on that this week when I have few minutes. |
Add some missing country codes (#166).
Dear @PMassicotte , did you have any luck with updating the country codes? I still have problems with the Spanish provinces. Can I help with that somehow? thanks again! |
Install the dev version. |
@PMassicotte awesome! works great, thanks! |
Hi all ! Did have the same problem : "error-widgetstatus-code-200-is-not-true" -> it said too many request at a time when using RCurl on a link. I added Sys.sleep(15) between each request, but it wasn't sufficient. Then, I downloaded a VPN and it seems to work now.. I guess I will have to change the VPN connection every 200 demands.. |
Dear @PMassicotte, I ran into the same problem with regions in Mexico. Only states appear to be available options now from what I can see here. Therefore, only a subset of the sub_codes in Mexico will work. The code below does work for me. regions <-gtrendsR::countries%>% for (j in 1:length(regions$sub_code)){ naptime(1) rk<-gtrends(c("term1", "term2"), I used the devtools version of the package to run this test. |
Do not use |
Hello, @PMassicotte . I'm starting my data research career in medical school here in Brazil and would really like to use the features of the "gtrends" function in some time series models. However, I cannot extract the data by city, which would be very valuable for my future research. I saw that it is possible to use this feature for cities in the United States, but I cannot do the same for cities in my country. Is there any way to do this? Thank you in advance for your attention and your great contribution to science. |
Can you do it on the Googe Trens website? |
Not. On the Google trends website, I can only do this search by state, but not by cities. However, city data appears in the "Interests by City" tab, but I don't know how to extract this time-distributed data. |
Please show an example from the Google website. #437 |
When searching for the term "world cup" on google trends, I can filter the search by state (ceará), but not by city. However, I can see some city names where the term is most searched in the "Interests by city" section. See the link: https://trends.google.com.br/trends/explore?date=all&geo=BR-CE&q=copa%20do%20mundo Is there a way to get temporal data from searches by city using the "gtrends" function? |
The link is not working. |
This works fine: r$> gtrends("Brazil", geo = "BR-CE")$interest_by_city
location hits keyword geo gprop
1 Jericoacoara Beach 100 Brazil BR-CE web
2 Aquiraz 26 Brazil BR-CE web
3 Sobral 24 Brazil BR-CE web
4 Maranguape 23 Brazil BR-CE web
5 Aracati 23 Brazil BR-CE web
6 Paracuru 23 Brazil BR-CE web
7 Russas 22 Brazil BR-CE web
8 Fortaleza 22 Brazil BR-CE web
9 Caucaia 22 Brazil BR-CE web
10 Eusébio 22 Brazil BR-CE web
11 Acaraú 21 Brazil BR-CE web
12 Pacatuba 21 Brazil BR-CE web
13 São Benedito 20 Brazil BR-CE web
14 Pacajus 20 Brazil BR-CE web
15 Cascavel 19 Brazil BR-CE web
16 Quixadá 18 Brazil BR-CE web
17 Barbalha 17 Brazil BR-CE web
18 Tianguá 17 Brazil BR-CE web
19 Horizonte 16 Brazil BR-CE web
20 Maracanaú 16 Brazil BR-CE web
21 Juazeiro do Norte 15 Brazil BR-CE web
22 Crato 15 Brazil BR-CE web
23 Limoeiro do Norte 15 Brazil BR-CE web
24 Icó 15 Brazil BR-CE web
25 Camocim 15 Brazil BR-CE web
26 Canindé 14 Brazil BR-CE web
27 Crateús 14 Brazil BR-CE web
28 Quixeramobim NA Brazil BR-CE web
29 Iguatu NA Brazil BR-CE web
30 Deserto NA Brazil BR-CE web
31 Aprazível NA Brazil BR-CE web
32 Port of Pecem NA Brazil BR-CE web
33 Trairi NA Brazil BR-CE web
34 Barro NA Brazil BR-CE web
35 Tapuio NA Brazil BR-CE web
36 Aurora NA Brazil BR-CE web
37 Sítio Alegre NA Brazil BR-CE web
38 Jaguaruana NA Brazil BR-CE web
39 Independência NA Brazil BR-CE web
40 Baturité NA Brazil BR-CE web
41 São Gonçalo do Amarante NA Brazil BR-CE web
42 Itaitinga NA Brazil BR-CE web
43 Missão Velha NA Brazil BR-CE web
44 Currais NA Brazil BR-CE web
45 Tauá NA Brazil BR-CE web
46 Viçosa do Ceará NA Brazil BR-CE web
47 Guaraciaba do Norte NA Brazil BR-CE web
48 Mauriti NA Brazil BR-CE web
49 Majorlândia NA Brazil BR-CE web
50 Beberibe NA Brazil BR-CE web
51 Ibiapina NA Brazil BR-CE web
52 Pedra Branca NA Brazil BR-CE web
53 Itapipoca NA Brazil BR-CE web
54 Campos Sales NA Brazil BR-CE web
55 Ipu NA Brazil BR-CE web
56 Brejinho NA Brazil BR-CE web
57 Santa Quitéria NA Brazil BR-CE web
58 Pentecoste NA Brazil BR-CE web
59 Milagres NA Brazil BR-CE web
60 Itapagé NA Brazil BR-CE web
61 Icapuí NA Brazil BR-CE web
62 Irauçuba NA Brazil BR-CE web
63 Jaguaribe NA Brazil BR-CE web
64 Boa Viagem NA Brazil BR-CE web
65 Guajiru NA Brazil BR-CE web
66 Quitaiús NA Brazil BR-CE web
67 Vila Passagem Florida NA Brazil BR-CE web
`` |
Thanks! But what I liked was getting the search data for the term “Brazil” in a period from 2011 to 2022 for a specific city in the country like the city of "Barbalha", for example. Is it possible to do that? |
Is it possible to do it on Google Trends website? |
I think not |
If it is not possible on the official web site, you can not do it in gtrendsR |
I tried new version and face this problem after querying like 100 times by for loop
Does this error means I reach the limit quota ?
The text was updated successfully, but these errors were encountered: