-1

I am trying to make use of the google trends api for a project and today it started acting up. I'm using netbeans as IDE and not even this piece of code works:

const googleTrends = require('google-trends-api');
googleTrends.relatedTopics({keyword: 'Chipotle', startTime: new Date('2015-01-01'), endTime: new Date('2017-02-10')})
.then((res) => {
  console.log(res);
})
.catch((err) => {
  console.log(err);
});

I've done a little bit of research about this error and from I understand (I should probably state that I'm new to JS) it has something to do with parsing objects into strings, but I just don't understand how this is the case with my code. Moreover, I can't possibly imagine why it worked before but now it doesn't any more.

nedsteven
  • 23
  • 3

1 Answers1

0

Ok I found out what the problem was. Apparently, Google's trends API is no longer open source.

nedsteven
  • 23
  • 3