pat310 / google-trends-api

An API layer on top of google trends
https://www.npmjs.com/package/google-trends-api
MIT License
877 stars 175 forks source link

Reason for removal of hotTrendsDetail()? #81

Closed jamalcwoods closed 6 years ago

jamalcwoods commented 6 years ago

Hi, I was just wondering as to why the hotTrendsDetail method was removed and if there is a replacement. Is there a way to get the most popular google searches in the new version of the module?

Thanks

pat310 commented 6 years ago

Hello @Darkspine77! I removed it because some of the API methods had severe quota restrictions and the library was more of a random mix of url calls that returned various data (for example, rather than returning JSON, some of the calls returned XML like hotTrendsDetail). You can use the old code for the hotTrendsDetail method if you want. Essentially you will want to use this url: http://www.${obj.countryDomain}/trends/hottrends/atom/feed where ${obj.countryDomain} is from the mapToDomain object. Here is an example for the US: https://trends.google.com/trends/hottrends/atom/feed.

I don't think there is a way to get the most popular google searches with the current implementation of the library, but I could definitely look into it. Are you looking for something similar to the information provided at top charts?

pat310 commented 6 years ago

I'm going to close this for now as there doesn't seem to be much interest