pat310 / google-trends-api

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

Keywords popularity comparison #113

Closed horoscop closed 5 years ago

horoscop commented 6 years ago

Hi!

Is there a way to compare two or more keywords popularity if one of them is super popular and the other is not so popular? Right now, google trends api returns (as Google Trends web version) whole numbers that are not quite comparable (because one of them might be 0 compared to the other). The ideal would be something like this:

Popularity Keyword1 ( " Barack Obama " ): 45 Keyword2 ( " Darrell Steinberg " ): 0.000478921

If I get what contains that zero, I can compare them, otherwise it's hard. I also tried to compare using a middle person popularity. So, compare Barack Obama with something half as popular as him, and than that keyword will be compared with Darrell Steinberg, but this isn't too practical.

pat310 commented 5 years ago

@horoscop Sorry for the delay, I've been pretty MIA. I'm not sure if this is possible given how the multiline api works: https://trends.google.com/trends/explore?geo=US&q=Barack%20Obama,Darrell%20Steinberg

I was looking to see if it was possible to scale the results at all, but since the results are already scaled when presented to us, I don't think it's possible. If you see any way around this using trends.google.com, let me know and I can try to get it into the library