PMassicotte/gtrendsR

will gtrendsR support topic in google trends?

Closed this issue · 7 comments

Thank you for your fantastic package!
I wonder whether gtrendsR will support topic in google trends. The topic aggregate a group of terms that share the same concept in any language. That is super useful for global research across multiple languages.

Do you have an example from the web site we can use?

I think this is already supported. The currently featured example on Google Trends is about Kim Kardeshian and Taylor Swift, which results in a request to the URL:

https://trends.google.com/trends/explore?q=%2Fm%2F0dl567,%2Fm%2F0261x8t&date=now 7-d&geo=US

From that you can get the search terms "/m/0dl567" for Kim Kardeshian and "/m/0261x8t" for Taylor Swift. If you use these strings, in gtrends you should get the topics. So you would need to find the topic identifier used by Google (here: "/m/0dl567" and "/m/0261x8t") and you can then use gtrends to download the search volume index...

@sahmoli Is it working as wanted?

I got it. That works.
But do you know how to detect whether many terms have been collected as topics in batch?

I don't understand the question. I think, unless you specify the topic identifier, with gtrendsR you are never using topics. Does that answer the question?

I got it. I need to get the topic identifier first. Thank you so much.

It seems like we cannot retreive data when using both mid (eg.: "/m/0dl567") and a search term.

This works:

gtrendsR::gtrends("/m/0dl567")

This also works:

gtrendsR::gtrends("kitchenaid")

But this does not:

gtrendsR::gtrends(c("/m/0dl567", "kitchenaid"))

It gives back:

Error in interest_over_time(widget, comparison_item, tz) : 
  Status code was not 200. Returned status code:401

Can you help with this please?