Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

dataforseo_labs_google_historical_keyword_data

Access historical Google keyword data including search volume, CPC, competition, and monthly trends since August 2021 for SEO analysis and strategy development.

Instructions

This endpoint provides Google historical keyword data for specified keywords, including search volume, cost-per-click, competition values for paid search, monthly searches, and search volume trends. You can get historical keyword data since August, 2021, depending on keywords along with location and language combination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordsYeskeywords required field The maximum number of keywords you can specify: 700 The maximum number of characters for each keyword: 80 The maximum number of words for each keyword phrase: 10 the specified keywords will be converted to lowercase format, data will be provided in a separate array note that if some of the keywords specified in this array are omitted in the results you receive, then our database doesn't contain such keywords and cannot return data on them you will not be charged for the keywords omitted in the results
location_nameNofull name of the location required field only in format "Country" (not "City" or "Region") example: 'United Kingdom', 'United States', 'Canada'United States
language_codeNolanguage code required field example: enen

Implementation Reference

  • The `handle` method that executes the tool logic: sends a POST request to the DataForSEO Labs Google historical keyword data endpoint with the provided keywords, location, and language, then validates and formats the response or handles errors.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.client.makeRequest('/v3/dataforseo_labs/google/historical_keyword_data/live', 'POST', [{
          keywords: params.keywords,
          location_name: params.location_name,
          language_code: params.language_code
        }]);
        return this.validateAndFormatResponse(response);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • The `getParams` method defines the Zod input schema for the tool, including keywords (array of strings), location_name (string, default 'United States'), and language_code (string, default 'en').
      getParams(): z.ZodRawShape {
        return {
          keywords: z.array(z.string()).describe(`keywords
    required field
    The maximum number of keywords you can specify: 700
    The maximum number of characters for each keyword: 80
    The maximum number of words for each keyword phrase: 10
    the specified keywords will be converted to lowercase format, data will be provided in a separate array
    note that if some of the keywords specified in this array are omitted in the results you receive, then our database doesn't contain such keywords and cannot return data on them
    you will not be charged for the keywords omitted in the results`),
          location_name: z.string().default("United States").describe(`full name of the location
    required field
    in format "Country"
    example:
    United Kingdom`),
          language_code: z.string().default("en").describe(
            `language code
            required field
            example:
            en`)
        };
      }
  • The `getTools` method in DataForSEOLabsApi module instantiates the GoogleHistoricalKeywordDataTool (line 50) and registers it in the tools record by its name, exposing description, params schema, and handler.
    getTools(): Record<string, ToolDefinition> {
      const tools = [
        new GoogleRankedKeywordsTool(this.dataForSEOClient),
        new GoogleDomainCompetitorsTool(this.dataForSEOClient),
        new GoogleDomainRankOverviewTool(this.dataForSEOClient),
        new GoogleKeywordsIdeasTool(this.dataForSEOClient),
        new GoogleRelatedKeywordsTool(this.dataForSEOClient),
        new GoogleKeywordsSuggestionsTool(this.dataForSEOClient),
        new GoogleHistoricalSERP(this.dataForSEOClient),
        new GoogleSERPCompetitorsTool(this.dataForSEOClient),
        new GoogleBulkKeywordDifficultyTool(this.dataForSEOClient),
        new GoogleSubdomainsTool(this.dataForSEOClient),
        new GoogleKeywordOverviewTool(this.dataForSEOClient),
        new GoogleTopSearchesTool(this.dataForSEOClient),
        new GoogleSearchIntentTool(this.dataForSEOClient),
        new GoogleKeywordsForSiteTool(this.dataForSEOClient),
        new GoogleDomainIntersectionsTool(this.dataForSEOClient),
        new GoogleHistoricalDomainRankOverviewTool(this.dataForSEOClient),
        new GooglePageIntersectionsTool(this.dataForSEOClient),
        new GoogleBulkTrafficEstimationTool(this.dataForSEOClient),
        new DataForSeoLabsFilterTool(this.dataForSEOClient),
        new GoogleHistoricalKeywordDataTool(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 full burden but offers limited behavioral insight. It mentions historical data availability constraints and that results may omit keywords not in the database, but doesn't disclose rate limits, authentication requirements, cost implications (though schema hints at charging), error handling, or response format. For a data retrieval tool with no annotation coverage, this leaves significant gaps.

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 efficiently structured in two sentences: first states purpose and data points, second adds temporal scope and context parameters. It avoids redundancy and is appropriately sized, though could be slightly more front-loaded by leading with the core function.

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?

Given no annotations, no output schema, and a data-rich tool with historical constraints, the description is incomplete. It doesn't explain the return structure, data granularity (e.g., monthly/quarterly), how trends are represented, error cases, or usage limits. The schema covers parameters well, but overall context for effective tool use is insufficient.

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%, providing detailed constraints for all three parameters. The description adds minimal value beyond schema: it mentions location and language combination but doesn't explain their interaction with historical data or provide additional context about parameter effects. Baseline 3 is appropriate since the schema does the heavy lifting.

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 provides 'Google historical keyword data for specified keywords' and lists specific data points like search volume, CPC, competition, monthly searches, and trends. It distinguishes from some siblings by focusing on historical data (e.g., vs. 'keyword_ideas' or 'keyword_overview'), but doesn't explicitly differentiate from all similar tools like 'google_historical_rank_overview' or 'google_historical_serp'.

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

Usage Guidelines3/5

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

The description implies usage for historical keyword analysis since August 2021 with location/language context, but provides no explicit guidance on when to use this tool versus alternatives like 'google_keyword_overview' (current data) or 'google_historical_rank_overview' (rank data). It mentions data availability constraints ('depending on keywords'), but lacks clear when/when-not instructions or named alternatives.

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