Closed aonurbilgin closed 6 years ago
@aonurbilgin I'm not seeing the daily data when I do this for the interestByRegion
method. Could you post the results you are getting when you do this with the flag set to false
versus set to true
?
@pat310 Actualy I'm talking about interestOverTime method. Could get results per DAY. Just like that; https://trends.google.com.tr/trends/explore?date=2017-10-01%202017-10-04&geo=TR&q=ios,android
My sample usage;
const googleTrends = require('google-trends-api');
googleTrends.interestOverTime({
keyword: ['ios', 'android'],
startTime: new Date('2017-10-01'),
endTime: new Date('2017-10-04'),
geo:'TR',
hl:'tr',
resolution: 'DAY',
property: 'backend',
category: 0
}, function(err, results) {
if (err) {
res.status(400).send('oh no error!', err);
} else {
let data = JSON.parse(results);
for(key in data) {
console.log(data[key]);
}
}
});
I'm just want to get results as daily not hourly. If my date range less than 7 days isLessThan7Days function converts date range as a hourly. So in that case i cant get daily data if the date range less than 7 days.
@aonurbilgin Gotcha, no problem I will get that in there
@aonurbilgin Added an optional boolean granularTimeResolution
to the input object. Will be available in the next release (version 4.3.0)
@pat310 Thank you
Hey,
Can we add shouldIncludeTime optional just like that;
Sample usage;
In that way we can get only daily data from google trends. Even less than 7 days.