Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

keywords_data_google_trends_explore

Analyze keyword popularity trends from Google Trends Explore for Search, News, Images, Shopping, and YouTube to inform content and marketing strategies.

Instructions

This endpoint will provide you with the keyword popularity data from the ‘Explore’ feature of Google Trends. You can check keyword trends for Google Search, Google News, Google Images, Google Shopping, and YouTube

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
location_nameNofull name of the location optional field in format "Country" example: United Kingdom
language_codeNoLanguage two-letter ISO code (e.g., 'en'). optional field
keywordsYeskeywords the maximum number of keywords you can specify: 5 the maximum number of characters you can specify in a keyword: 100 the minimum number of characters must be greater than 1 comma characters (,) in the specified keywords will be unset and ignored Note: keywords cannot consist of a combination of the following characters: < > | " - + = ~ ! : * ( ) [ ] { } Note: to obtain google_trends_topics_list and google_trends_queries_list items, specify no more than 1 keyword
typeNogoogle trends typeweb
date_fromNostarting date of the time range if you don’t specify this field, the current day and month of the preceding year will be used by default minimal value for the web type: 2004-01-01 minimal value for other types: 2008-01-01 date format: "yyyy-mm-dd" example: "2019-01-15"
date_toNoending date of the time range if you don’t specify this field, the today’s date will be used by default date format: "yyyy-mm-dd" example: "2019-01-15"
time_rangeNopreset time ranges if you specify date_from or date_to parameters, this field will be ignored when setting a taskpast_7_days
item_typesNotypes of items returned to speed up the execution of the request, specify one item at a time
category_codeNogoogle trends search category you can receive the list of available categories with their category_code by making a separate request to the keywords_data_google_trends_categories tool

Implementation Reference

  • The main handler function that executes the tool logic by making a POST request to DataForSEO's Google Trends Explore API endpoint and handling the response.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.dataForSEOClient.makeRequest('/v3/keywords_data/google_trends/explore/live', 'POST', [{
          location_name: params.location_name,
          language_code: params.language_code,
          keywords: params.keywords,
          type: params.type,
          date_from: params.date_from,
          date_to: params.date_to,
          time_range: params.time_range,
          item_types: params.item_types,
          category_code: params.category_code
        }]);
        return this.validateAndFormatResponse(response);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • Zod schema defining the input parameters for the tool, including location, keywords, date ranges, and other Google Trends specific options.
    getParams(): z.ZodRawShape {
      return {
        location_name: z.string().nullable().default(null).describe(`full name of the location
          optional field
          in format "Country"
          example:
          United Kingdom`),
        language_code: z.string().nullable().default(null).describe(`Language two-letter ISO code (e.g., 'en').
          optional field`), 
        keywords: z.array(z.string()).describe(`keywords
          the maximum number of keywords you can specify: 5
          the maximum number of characters you can specify in a keyword: 100
          the minimum number of characters must be greater than 1
          comma characters (,) in the specified keywords will be unset and ignored
          Note: keywords cannot consist of a combination of the following characters: < > | \ " - + = ~ ! : * ( ) [ ] { }
    
          Note: to obtain google_trends_topics_list and google_trends_queries_list items, specify no more than 1 keyword`),
        type: z.enum(['web', 'news', 'youtube','images','froogle']).default('web').describe(`google trends type`),
        date_from: z.string().optional().describe(`starting date of the time range
            if you don’t specify this field, the current day and month of the preceding year will be used by default
            minimal value for the web type: 2004-01-01
            minimal value for other types: 2008-01-01
            date format: "yyyy-mm-dd"
            example:
            "2019-01-15"`),
        date_to: z.string().optional()
            .describe(
              `ending date of the time range
              if you don’t specify this field, the today’s date will be used by default
              date format: "yyyy-mm-dd"
              example:
              "2019-01-15"`),
        time_range: z.enum(['past_hour', 'past_4_hours', 'past_day', 'past_7_days', 'past_30_days', 'past_90_days', 'past_12_months', 'past_5_years'])
            .default('past_7_days')
            .describe(
              `preset time ranges
              if you specify date_from or date_to parameters, this field will be ignored when setting a task`),
        item_types: z.array(z.enum(['google_trends_graph', 'google_trends_map', 'google_trends_topics_list', 'google_trends_queries_list']))
            .default(['google_trends_graph'])
            .describe(
              `types of items returned
              to speed up the execution of the request, specify one item at a time`),
        category_code: z.nullable(z.number()).default(null)
            .describe(
              `google trends search category
              you can receive the list of available categories with their category_code by making a separate request to the keywords_data_google_trends_categories tool`)
      };
    }
  • Tool registration within KeywordsDataApiModule's getTools method, instantiating GoogleTrendsExploreTool and mapping it to its name with description, params, and handler.
    getTools(): Record<string, ToolDefinition> {
      const tools = [
        new GoogleAdsSearchVolumeTool(this.dataForSEOClient),
    
        new DataForSeoTrendsDemographyTool(this.dataForSEOClient),
        new DataForSeoTrendsSubregionInterestsTool(this.dataForSEOClient),
        new DataForSeoTrendsExploreTool(this.dataForSEOClient),
    
        new GoogleTrendsCategoriesTool(this.dataForSEOClient),
        new GoogleTrendsExploreTool(this.dataForSEOClient),
        // Add more tools here
      ];
    
      return tools.reduce((acc, tool) => ({
        ...acc,
        [tool.getName()]: {
          description: tool.getDescription(),
          params: tool.getParams(),
          handler: (params: any) => tool.handle(params),
        },
      }), {});
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions what data is provided but lacks critical behavioral details: it doesn't specify whether this is a read-only operation, rate limits, authentication requirements, error conditions, or what the output format looks like (especially important since there's no output schema). The description is insufficient for a tool with 9 parameters and complex functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two clear sentences that efficiently state the tool's purpose and scope. It's front-loaded with the main functionality and avoids unnecessary elaboration. However, it could be slightly more structured by explicitly mentioning the tool's core use case before listing data sources.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 9 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns (critical without output schema), doesn't mention performance characteristics, and provides no context about how this fits with sibling tools. The description fails to compensate for the lack of structured metadata that would help an agent understand this tool's behavior and output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema - it doesn't explain how parameters interact (e.g., date_from/date_to vs. time_range), provide usage examples, or clarify parameter relationships. The baseline score of 3 reflects adequate coverage through the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'provide you with the keyword popularity data from the ‘Explore’ feature of Google Trends' and specifies the data sources (Google Search, News, Images, Shopping, YouTube). It uses specific verbs ('provide', 'check') and identifies the resource ('keyword popularity data'), but doesn't explicitly differentiate from sibling tools like 'keywords_data_dataforseo_trends_explore' or 'keywords_data_google_trends_categories'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions the data sources but doesn't indicate scenarios where this tool is preferred over sibling tools like 'keywords_data_google_ads_search_volume' or 'keywords_data_dataforseo_trends_explore'. There's no mention of prerequisites, limitations, or typical use cases beyond the broad statement about checking keyword trends.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ravinwebsurgeon/seo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server