google-trends-api
google-trends-api copied to clipboard
realtimeTrends sends "Error 400 (Bad Request)!!1" when queried with certain country code
I have a problem that give me "Error 400 (Bad Request)!!1" when I use my country code in geo option, Indonesia (ID). Other message from the error is
</span></a><p><b>400.</b> <ins>That’s an
error.</ins><p>The server cannot process the request because it is
malformed. It should not be retried. <ins>That’s all we know.</ins></div>
my code :
googleTrends.realTimeTrends({
geo: 'ID',
category: 'all',
}, function(err, results) {
if (err) {
res.send(err);
} else {
res.send(results);
}
});
anyone has the same issue?
Not all country codes have daily trends available to them. For example check the web page: https://trends.google.com/trends/trendingsearches/daily?geo=id.
I was having same issue with my app where you click a country on the map and it shows daily trends, clicking a lot of countries in Africa returned the same error. I tested Indonesia and had the same error.