Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

dataforseo_labs_google_page_intersection

Identify keywords multiple webpages rank for in Google search results, analyze competitor gaps, and get SEO metrics like search volume and traffic estimates.

Instructions

This endpoint will provide you with the keywords for which specified pages rank within the same SERP. You will get search volume, competition, cost-per-click and impressions data on each intersecting keyword. Along with that, you will get data on SERP elements that specified pages rank for in search results, as well as the estimated traffic volume and cost of ad traffic. Page Intersection endpoint supports organic, paid, local pack and featured snippet results.

Find keywords several webpages rank for: If you would like to get the keywords several pages rank for, you need to specify webpages only in the pages object. This way, you will receive intersected ranked keywords for the specified URLs.

Find keywords your competitors rank for but you do not: If you would like to receive all keywords several pages rank for, but particular pages do not, you need to use the exclude_pages array as well. This way you will receive the keywords for which the URLs from the pages object rank for, but the URLs from the exclude_pages array do not

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYespages array required field you can set up to 20 pages in this object the pages should be specified with absolute URLs (including http:// or https://) if you specify a single page here, we will return results only for this page; you can also use a wildcard ('*') character to specify the search pattern example: "example.com" search for the exact URL "example.com/eng/*" search for the example.com page and all its related URLs which start with '/eng/', such as "example.com/eng/index.html" and "example.com/eng/help/", etc. note: a wilcard should be placed after the slash ('/') character in the end of the URL, it is not possible to place it after the domain in the following way: https://dataforseo.com* use https://dataforseo.com/* instead
exclude_pagesNoURLs of pages you want to exclude optional field you can set up to 10 pages in this array if you use this array, results will contain the keywords for which URLs from the pages object rank, but URLs from exclude_pages array do not; note that if you specify this field, the results will be based on the keywords any URL from pages ranks for regardless of intersections between them. However, you can set intersection_mode to intersect and results will contain the keywords all URLs from pages rank for in the same SERP and URLs from exclude_pages do not. use a wildcard (‘*’) character to specify the search pattern example: "exclude_pages": [ "https://www.apple.com/iphone/*", "https://dataforseo.com/apis/*", "https://www.microsoft.com/en-us/industry/services/" ]
intersection_modeNoindicates whether to intersect keywords optional field use this field to intersect or merge results for the specified URLs possible values: union, intersect union – results are based on all keywords any URL from pages rank for; intersect – results are based on the keywords all URLs from pages rank for in the same SERP: by default, results are based on the intersect mode if you specify only pages array. If you specify exclude_pages as well, results are based on the union mode
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
ignore_synonymsNoignore highly similar keywords, if set to true, results will be more accurate
limitNoMaximum number of keywords to return
offsetNooffset in the results array of returned keywords optional field default value: 0 if you specify the 10 value, the first ten keywords in the results array will be omitted and the data will be provided for the successive keywords
filtersNoyou can add several filters at once (8 filters maximum) you should set a logical operator and, or between the conditions the following operators are supported: regex, not_regex, <, <=, >, >=, =, <>, in, not_in, match, not_match, ilike, not_ilike, like, not_like you can use the % operator with like and not_like, as well as ilike and not_ilike to match any string of zero or more characters merge operator must be a string and connect two other arrays, availible values: or, and. example: ["keyword_data.keyword_info.search_volume","in",[100,1000]] [["intersection_result.1.etv",">",0],"and",["intersection_result.2.description","like","%goat%"]] [["keyword_data.keyword_info.search_volume",">",100],"and",[["intersection_result.1.description","like","%goat%"],"or",["intersection_result.2.type","=","organic"]]]
order_byNoresults sorting rules optional field you can use the same values as in the filters array to sort the results possible sorting types: asc – results will be sorted in the ascending order desc – results will be sorted in the descending order you should use a comma to set up a sorting parameter example: ["keyword_data.keyword_info.competition,desc"] default rule: ["keyword_data.keyword_info.search_volume,desc"] note that you can set no more than three sorting rules in a single request you should use a comma to separate several sorting rules example: ["intersection_result.1.rank_group,asc","intersection_result.2.rank_absolute,asc"]
include_clickstream_dataNoInclude or exclude data from clickstream-based metrics in the result
item_typesNodisplay results by item type indicates the type of search results included in the response

Implementation Reference

  • The `handle` method in `GooglePageIntersectionsTool` class that executes the POST request to DataForSEO Labs Google Page Intersection API and handles the response.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.client.makeRequest('/v3/dataforseo_labs/google/page_intersection/live', 'POST', [{
          pages: mapArrayToNumberedKeys(params.pages),
          location_name: params.location_name,
          language_code: params.language_code,
          ignore_synonyms: params.ignore_synonyms,
          filters: this.formatFilters(params.filters),
          order_by: this.formatOrderBy(params.order_by),
          exclude_top_domains: params.exclude_top_domains,
          item_types: ['organic'],
          exclude_pages: params.exclude_pages,
          intersection_mode: params.intersection_mode,
          limit: params.limit,
          offset: params.offset,
          include_clickstream_data: params.include_clickstream_data
        }]);
        return this.validateAndFormatResponse(response);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • The `getParams` method defining the Zod input schema for the tool parameters.
      getParams(): z.ZodRawShape {
        return {
          pages: z.array(z.string()).describe(`pages array
    required field
    you can set up to 20 pages in this object
    the pages should be specified with absolute URLs (including http:// or https://)
    if you specify a single page here, we will return results only for this page;
    you can also use a wildcard ('*') character to specify the search pattern
    example:
    "example.com"
    search for the exact URL
    "example.com/eng/*"
    search for the example.com page and all its related URLs which start with '/eng/', such as "example.com/eng/index.html" and "example.com/eng/help/", etc.
    note: a wilcard should be placed after the slash ('/') character in the end of the URL, it is not possible to place it after the domain in the following way:
    https://dataforseo.com*
    use https://dataforseo.com/* instead`),
          exclude_pages: z.array(z.string()).optional().describe(`URLs of pages you want to exclude
    optional field
    you can set up to 10 pages in this array
    if you use this array, results will contain the keywords for which URLs from the pages object rank, but URLs from exclude_pages array do not;
    note that if you specify this field, the results will be based on the keywords any URL from pages ranks for regardless of intersections between them. However, you can set intersection_mode to intersect and results will contain the keywords all URLs from pages rank for in the same SERP and URLs from exclude_pages do not.
    use a wildcard (‘*’) character to specify the search pattern
    example:
    "exclude_pages": [
    "https://www.apple.com/iphone/*",
    "https://dataforseo.com/apis/*",
    "https://www.microsoft.com/en-us/industry/services/"
    ]`),
           intersection_mode: z.enum(['union', 'intersect']).optional().describe(`indicates whether to intersect keywords
    optional field
    use this field to intersect or merge results for the specified URLs
    possible values: union, intersect
    
    union – results are based on all keywords any URL from pages rank for;
    
    intersect – results are based on the keywords all URLs from pages rank for in the same SERP:
    
    by default, results are based on the intersect mode if you specify only pages array. If you specify exclude_pages as well, results are based on the union mode`),
          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`),
          ignore_synonyms: z.boolean().default(true).describe(
              `ignore highly similar keywords, if set to true, results will be more accurate`),
          limit: z.number().min(1).max(1000).default(10).optional().describe("Maximum number of keywords to return"),
          offset: z.number().min(0).optional().describe(
            `offset in the results array of returned keywords
            optional field
            default value: 0
            if you specify the 10 value, the first ten keywords in the results array will be omitted and the data will be provided for the successive keywords`
          ),
          filters: z.array(
            z.union([
              z.array(z.union([z.string(), z.number(), z.boolean()])).length(3),
              z.enum(["and", "or"])
            ])
          ).max(8).optional().describe(
            `you can add several filters at once (8 filters maximum)
            you should set a logical operator and, or between the conditions
            the following operators are supported:
            regex, not_regex, <, <=, >, >=, =, <>, in, not_in, match, not_match, ilike, not_ilike, like, not_like
            you can use the % operator with like and not_like, as well as ilike and not_ilike to match any string of zero or more characters
            merge operator must be a string and connect two other arrays, availible values: or, and.
            example:
            ["keyword_data.keyword_info.search_volume","in",[100,1000]]
            [["intersection_result.1.etv",">",0],"and",["intersection_result.2.description","like","%goat%"]]
            [["keyword_data.keyword_info.search_volume",">",100],"and",[["intersection_result.1.description","like","%goat%"],"or",["intersection_result.2.type","=","organic"]]]`
          ),
          order_by: z.array(z.string()).optional().describe(
            `results sorting rules
    optional field
    you can use the same values as in the filters array to sort the results
    possible sorting types:
    asc – results will be sorted in the ascending order
    desc – results will be sorted in the descending order
    you should use a comma to set up a sorting parameter
    example:
    ["keyword_data.keyword_info.competition,desc"]
    default rule:
    ["keyword_data.keyword_info.search_volume,desc"]
    note that you can set no more than three sorting rules in a single request
    you should use a comma to separate several sorting rules
    example:
    ["intersection_result.1.rank_group,asc","intersection_result.2.rank_absolute,asc"]`
          ),      
          include_clickstream_data: z.boolean().optional().default(false).describe(
            `Include or exclude data from clickstream-based metrics in the result`)
        };
      }
  • Instantiation of `GooglePageIntersectionsTool` in the `getTools()` method of `DataForSEOLabsApi` module, registering it as 'dataforseo_labs_google_page_intersection'.
    new GooglePageIntersectionsTool(this.dataForSEOClient),
Behavior4/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 effectively describes what the tool does (returns keyword intersection data with metrics), its scope (supports multiple SERP result types), and usage patterns (two main use cases). However, it lacks details on rate limits, authentication needs, or error handling, which are important for a complex tool with 12 parameters.

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

Conciseness3/5

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

The description is structured into two clear use-case paragraphs, but it could be more front-loaded with a concise summary. Some sentences are verbose (e.g., 'Along with that, you will get data on SERP elements...'), and the text could be tightened without losing clarity. It earns its place by explaining usage but isn't optimally efficient.

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

Completeness3/5

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

Given the tool's complexity (12 parameters, no annotations, no output schema), the description is moderately complete. It covers purpose and usage well but lacks details on output format, error conditions, or performance considerations. For a tool with rich input schema but no output schema, more information on what to expect in results would improve completeness.

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?

The input schema has 100% description coverage, providing detailed documentation for all 12 parameters. The description adds minimal parameter-specific semantics, only briefly mentioning 'pages' and 'exclude_pages' in the context of use cases. Since the schema already does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding beyond what's in the schema.

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

Purpose5/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: to find keywords for which specified pages rank within the same SERP, providing detailed metrics like search volume, competition, CPC, and impressions. It distinguishes itself from sibling tools by focusing on page intersection analysis rather than individual keyword research or backlink analysis, as seen in tools like 'dataforseo_labs_google_keywords_for_site' or 'backlinks_page_intersection'.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use the tool, including two distinct use cases: finding keywords several webpages rank for (using the 'pages' array) and finding keywords competitors rank for but you do not (using 'exclude_pages'). It also mentions support for organic, paid, local pack, and featured snippet results, helping users understand its scope compared to 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