Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relatedQueries category key does nothing #163

Open
cbaucom opened this issue Aug 15, 2022 · 0 comments
Open

relatedQueries category key does nothing #163

cbaucom opened this issue Aug 15, 2022 · 0 comments

Comments

@cbaucom
Copy link

cbaucom commented Aug 15, 2022

According to the README, the relatedQueries api takes an optional category param. However, upon testing this out with different category numbers, the data never changes.

Sample code:

const googleTrends = require('google-trends-api');

googleTrends.relatedQueries({
   keyword: 'javascript', 
   startTime: new Date('2021-01-01'),
   endTime: new Date('2022-01-01'),
   geo:'US',
   category: 0 
})
.then((res) => {
  console.log(res);
})
.catch((err) => {
  console.log(err);
})

When changing the number 0 above, which references "All Categories", to another acceptable category ID like 16 (News) or 67 (Travel), the data never changes. Full category wiki here.

Am I missing something here on how to properly query by category as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant