Google Trends

Fetch data from Google Trends API

Overview

This node fetches data from the Google Trends API based on user-specified keywords and parameters. It supports operations to retrieve interest over time, related queries, and related topics for given keywords. This node is useful for analyzing trends and gaining insights into keyword popularity and related search topics over specified time periods and geographic locations. For example, marketers can track the popularity of cryptocurrencies or identify related topics to optimize content strategies.

Use Case Examples

  1. Tracking the interest over time for keywords like 'bitcoin' and 'ethereum' to analyze market trends.
  2. Fetching related topics for 'cryptocurrency' to discover emerging areas of interest.
  3. Getting related queries for 'blockchain' to understand user search behavior.

Properties

Name Meaning
Keyword(s) Keywords to get trends for, separated by commas.
Start Time Start date for the trends data; defaults to 5 years ago if empty.
End Time End date for the trends data; defaults to current time if empty.
Geography Geographic location specified by ISO 3166-1 alpha-2 country code; empty for worldwide.
Category Category ID for trends; 0 means all categories.

Output

JSON

  • operation - The operation performed (interestOverTime, relatedQueries, or relatedTopics).
  • keywords - Array of keywords used for the trends query.
  • options
    • keyword - Keyword(s) parameter formatted for the API call.
    • startTime - Start time parameter used in the API call.
    • endTime - End time parameter used in the API call.
    • geo - Geographic location parameter used in the API call.
    • category - Category ID parameter used in the API call.
  • data - The JSON-parsed response data from the Google Trends API.

Dependencies

  • google-trends-api npm package

Troubleshooting

  • Ensure the 'Keyword(s)' field is not empty; the node throws an error if keywords are missing.
  • Check date formats for 'Start Time' and 'End Time' to ensure they are valid dates.
  • If the Google Trends API returns an error, verify network connectivity and API usage limits.
  • Use the 'Continue On Fail' option to handle errors gracefully and continue processing other items.

Links

Discussion