Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

keywords_data_dataforseo_trends_demography

Analyze demographic breakdown by age and gender for keyword popularity trends to understand audience targeting and content strategy.

Instructions

This endpoint will provide you with the demographic breakdown (by age and gender) of keyword popularity per each specified term based on DataForSEO Trends data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
location_nameNofull name of the location optional field in format "Country" example: United Kingdom
keywordsYeskeywords the maximum number of keywords you can specify: 5
typeNodataforseo 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

Implementation Reference

  • The handler method that executes the core logic: makes a POST request to the DataForSEO Keywords Data Trends Demography endpoint with the provided parameters and formats the response.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.dataForSEOClient.makeRequest('/v3/keywords_data/dataforseo_trends/demography/live', 'POST', [{
          location_name: params.location_name,
          keywords: params.keywords,
          type: params.type,
          date_from: params.date_from,
          date_to: params.date_to,
          time_range: params.time_range,
        }]);
        return this.validateAndFormatResponse(response);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • Zod schema defining the input parameters for the tool, including location_name, keywords, type, date_from, date_to, and time_range.
    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`),
        keywords: z.array(z.string()).describe(`keywords
          the maximum number of keywords you can specify: 5`),
        type: z.enum(['web', 'news', 'ecommerce']).default('web').describe(`dataforseo 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_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`),
      };
    }
  • Registers the DataForSeoTrendsDemographyTool by instantiating it and adding to the module's tools map using its name, 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),
        },
      }), {});
  • Returns the canonical name of the tool used for registration.
    getName(): string {
      return 'keywords_data_dataforseo_trends_demography';
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the output ('demographic breakdown by age and gender') but doesn't mention critical behaviors like rate limits, authentication needs, data freshness, or error handling. For a data query tool with no annotations, this leaves significant gaps in understanding how the tool behaves in practice.

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 a single, efficient sentence that front-loads the core purpose. It avoids unnecessary words and directly states what the tool does. However, it could be slightly more structured by separating key constraints (e.g., data source limitations) into additional sentences for clarity.

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 the complexity (6 parameters, no output schema, no annotations), the description is incomplete. It lacks details on output format, data interpretation, limitations (e.g., keyword count constraints implied by schema but not highlighted), and how it fits among sibling tools. For a tool with rich parameters and no structured behavioral hints, more context is needed for effective use.

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 6 parameters thoroughly. The description adds no parameter-specific information beyond implying keywords are analyzed for demographic trends. It doesn't explain parameter interactions or provide additional context, meeting the baseline for high schema coverage.

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 demographic breakdown (by age and gender) of keyword popularity per each specified term based on DataForSEO Trends data.' It specifies the verb ('provide'), resource ('demographic breakdown'), and data source ('DataForSEO Trends data'). However, it doesn't explicitly differentiate from sibling tools like 'keywords_data_dataforseo_trends_explore' or 'keywords_data_dataforseo_trends_subregion_interests,' which appear related but have different focuses.

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 doesn't mention sibling tools or contexts where this demographic breakdown is preferred over other keyword analysis tools. Usage is implied by the purpose but lacks explicit when/when-not instructions or prerequisites.

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