pat310 / google-trends-api

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

Not able to get data for most recent 2 days #103

Closed CallMeCreadev closed 6 years ago

joddes commented 6 years ago

Hi how did you solved this? Have the same problem..:)

pat310 commented 5 years ago

@joddes were you able to figure it out? If you check examples.js there is one in there that you might find helpful. For example, this should return results for the last two days:

googleTrends.interestOverTime({
  keyword: 'Valentines Day',
  startTime: new Date(Date.now() - (2 * 24 * 60 * 60 * 1000)),
  granularTimeResolution: true,
}, function(err, results) {
  if (err) console.log('oh no error!', err);
  else console.log(results);
});
bitcoinvsalts commented 4 years ago

any solution how to get the last two days of google trends data?

this issue should be reopened

arashnz commented 4 years ago

Its not working for me too ! I've tested PHP api and those are not working too !

ajporrasm commented 3 years ago

@pat310 the example code doesn't work for me and I have working code for several weeks now when using longer time spans

Do you have a working example of that example code?

ajporrasm commented 3 years ago

this comment did the trick, thanks pat

https://github.com/pat310/google-trends-api/issues/103#issuecomment-443529252