Skip to content

relatedQueries category key does nothing #163

Description

@cbaucom

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions