Skip to content

relatedQueries category key does nothing #163

@cbaucom

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?

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