#
tokens: 113111/50000 1/8 files (page 2/2)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 2 of 2. Use http://codebase.md/ahrefs/ahrefs-mcp-server?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .gitignore
├── images
│   ├── claude1.png
│   ├── claude2.png
│   └── claude3.png
├── mcp.json
├── package-lock.json
├── package.json
├── README.md
├── src
│   ├── index.ts
│   ├── server.ts
│   └── transport.ts
└── tsconfig.json
```

# Files

--------------------------------------------------------------------------------
/src/server.ts:
--------------------------------------------------------------------------------

```typescript
   1 | import { Server } from '@modelcontextprotocol/sdk/server/index.js';
   2 | import {
   3 |     ListToolsRequestSchema,
   4 |     CallToolRequestSchema,
   5 |     CallToolResult,
   6 |     McpError,
   7 |     ErrorCode,
   8 |     Tool,
   9 | } from '@modelcontextprotocol/sdk/types.js';
  10 | import axios, { AxiosError, Method } from 'axios';
  11 | import * as console from 'console';
  12 | 
  13 | // Environment variables are loaded by the main index.ts
  14 | const API_BASE_URL = process.env.API_BASE_URL || 'https://api.ahrefs.com/v3';
  15 | const API_KEY = process.env.API_KEY;
  16 | 
  17 | const tools: Tool[] = [
  18 |     {
  19 |         "_original_method": "GET",
  20 |         "_original_parameters": [
  21 |             {
  22 |                 "in": "query",
  23 |                 "name": "timeout",
  24 |                 "required": false
  25 |             },
  26 |             {
  27 |                 "in": "query",
  28 |                 "name": "offset",
  29 |                 "required": false
  30 |             },
  31 |             {
  32 |                 "in": "query",
  33 |                 "name": "limit",
  34 |                 "required": false
  35 |             },
  36 |             {
  37 |                 "in": "query",
  38 |                 "name": "order_by",
  39 |                 "required": false
  40 |             },
  41 |             {
  42 |                 "in": "query",
  43 |                 "name": "where",
  44 |                 "required": false
  45 |             },
  46 |             {
  47 |                 "in": "query",
  48 |                 "name": "select",
  49 |                 "required": true
  50 |             },
  51 |             {
  52 |                 "in": "query",
  53 |                 "name": "date_compared",
  54 |                 "required": false
  55 |             },
  56 |             {
  57 |                 "in": "query",
  58 |                 "name": "date",
  59 |                 "required": true
  60 |             },
  61 |             {
  62 |                 "in": "query",
  63 |                 "name": "device",
  64 |                 "required": true
  65 |             },
  66 |             {
  67 |                 "in": "query",
  68 |                 "name": "project_id",
  69 |                 "required": true
  70 |             },
  71 |             {
  72 |                 "in": "query",
  73 |                 "name": "volume_mode",
  74 |                 "required": false
  75 |             },
  76 |             {
  77 |                 "in": "query",
  78 |                 "name": "output",
  79 |                 "required": false
  80 |             }
  81 |         ],
  82 |         "_original_path": "rank-tracker/overview",
  83 |         "_original_request_body": null,
  84 |         "description": "Provides an overview of tracked keyword rankings and related search metrics for a specified project and date, with support for historical comparison, filtering, column selection, and device type. Use doc tool first to get the real input schema.",
  85 |         "inputSchema": {
  86 |             "properties": {
  87 |                 "timeout": {
  88 |                     "type": "integer"
  89 |                 },
  90 |                 "limit": {
  91 |                     "type": "integer"
  92 |                 },
  93 |                 "order_by": {
  94 |                     "type": "string"
  95 |                 },
  96 |                 "where": {
  97 |                     "type": "string"
  98 |                 },
  99 |                 "select": {
 100 |                     "type": "string"
 101 |                 },
 102 |                 "date_compared": {
 103 |                     "type": "string"
 104 |                 },
 105 |                 "date": {
 106 |                     "type": "string"
 107 |                 },
 108 |                 "device": {
 109 |                     "type": "string"
 110 |                 },
 111 |                 "project_id": {
 112 |                     "type": "integer"
 113 |                 },
 114 |                 "volume_mode": {
 115 |                     "type": "string"
 116 |                 }
 117 |             },
 118 |             "required": [
 119 |                 "select",
 120 |                 "date",
 121 |                 "device",
 122 |                 "project_id"
 123 |             ],
 124 |             "type": "object"
 125 |         },
 126 |         "_inputSchema": {
 127 |             "properties": {
 128 |                 "timeout": {
 129 |                     "description": "A manual timeout duration in seconds.",
 130 |                     "type": "integer"
 131 |                 },
 132 |                 "limit": {
 133 |                     "description": "The number of results to return.",
 134 |                     "type": "integer"
 135 |                 },
 136 |                 "order_by": {
 137 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**best_position_has_thumbnail**: The top position has a thumbnail.  \ntype: boolean nullable  \n\n**best_position_has_thumbnail_previous**: The top position has a thumbnail on the comparison date.  \ntype: boolean nullable  \n\n**best_position_has_video_preview**: The top position has a video preview.  \ntype: boolean nullable  \n\n**best_position_has_video_preview_previous**: The top position has a video preview on the comparison date.  \ntype: boolean nullable  \n\n**best_position_kind**: The kind of the top position: organic, paid, or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**best_position_kind_previous**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**clicks**: Clicks metric refers to the average monthly number of clicks on the search results that people make while searching for the target keyword. Some searches generate clicks on multiple results, while others might not end in any clicks at all.  \ntype: integer nullable  \n\n**clicks_per_search**: Clicks Per Search is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: number<float> nullable  \n\n**cost_per_click**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword.  \ntype: integer nullable  \n\n**country**: The country that a given keyword is being tracked in. A two-letter country code (ISO 3166-1 alpha-2).  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**country_prev**: The country that a given keyword is being tracked in on the comparison date. A two-letter country code (ISO 3166-1 alpha-2).  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**keyword**: The keyword your target ranks for.  \ntype: string  \n\n**keyword_difficulty**: An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable  \n\n**keyword_has_data**: Will return `false` if the keyword is still processing and no SERP has been fetched yet.  \ntype: boolean  \n\n**keyword_is_frozen**: Indicates whether a keyword has exceeded the tracked keywords limit on your plan. Such keywords are \"frozen\", meaning they do not have their rankings updated.  \ntype: boolean  \n\n**keyword_prev**: The keyword your target ranks for on the comparison date.  \ntype: string  \n\n**language**: The SERP language that a given keyword is being tracked for.  \ntype: string  \n\n**language_prev**: The SERP language on the comparison date.  \ntype: string  \n\n**location**: The location (country, state/province, or city) that a given keyword is being tracked in.  \ntype: string  \n\n**location_prev**: The location (country, state/province, or city) that a given keyword is being tracked in on the comparison date.  \ntype: string  \n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead.  To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable  \n\n**position**: The top position your target ranks for in the organic search results for a keyword.  \ntype: integer nullable  \n\n**position_diff**: The change in position between your selected dates.  \ntype: integer nullable  \n\n**position_prev**: The top position on the comparison date.  \ntype: integer nullable  \n\n**search_type_image**: Search type Image shows the percentage of searches for a keyword made for images, highlighting interest in visual content.  \ntype: number<float> nullable  \n\n**search_type_news**: Search type News shows the percentage of searches for a keyword made for news articles.  \ntype: number<float> nullable  \n\n**search_type_video**: Search type Video shows the percentage of searches for a keyword made for video, reflecting interest in video content.  \ntype: number<float> nullable  \n\n**search_type_web**: Search type Web shows the percentage of searches for a keyword made for general web content, indicating interest in a wide range of information.  \ntype: number<float> nullable  \n\n**serp_features**: The SERP features that appear in search results for a keyword.  \ntype: array[string]  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`  \n\n**serp_updated**: The date when we last checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**serp_updated_prev**: The date when we checked search engine results up to the comparison date.  \ntype: string<date-time> nullable  \n\n**tags**: A list of tags assigned to a given keyword.  \ntype: array[string]  \n\n**tags_prev**: A list of tags assigned to a given keyword on the comparison date.  \ntype: array[string]  \n\n**target_positions_count**: The number of target URLs ranking for a keyword.  \ntype: integer  \n\n**traffic**: An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable  \n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer nullable  \n\n**traffic_prev**: An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable  \n\n**url**: The top ranking URL in organic search results for a given keyword.  \ntype: string<url> nullable  \n\n**url_prev**: The top ranking URL in organic search results for a given keyword on the comparison date.  \ntype: string<url> nullable  \n\n**volume**: An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable  \n\n",
 138 |                     "type": "string"
 139 |                 },
 140 |                 "where": {
 141 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**best_position_has_thumbnail**: The top position has a thumbnail.  \ntype: boolean nullable\n\n**best_position_has_thumbnail_previous**: The top position has a thumbnail on the comparison date.  \ntype: boolean nullable\n\n**best_position_has_video_preview**: The top position has a video preview.  \ntype: boolean nullable\n\n**best_position_has_video_preview_previous**: The top position has a video preview on the comparison date.  \ntype: boolean nullable\n\n**best_position_kind**: The kind of the top position: organic, paid, or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**best_position_kind_previous**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**clicks**: Clicks metric refers to the average monthly number of clicks on the search results that people make while searching for the target keyword. Some searches generate clicks on multiple results, while others might not end in any clicks at all.  \ntype: integer nullable\n\n**clicks_per_search**: Clicks Per Search is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: float nullable\n\n**cost_per_click**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword.  \ntype: integer nullable\n\n**country**: The country that a given keyword is being tracked in. A two-letter country code (ISO 3166-1 alpha-2).  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**country_prev**: The country that a given keyword is being tracked in on the comparison date. A two-letter country code (ISO 3166-1 alpha-2).  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**is_main_position**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).  \ntype: boolean\n\n**is_main_position_prev**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.  \ntype: boolean\n\n**keyword**: The keyword your target ranks for.  \ntype: string\n\n**keyword_difficulty**: An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**keyword_has_data**: Will return `false` if the keyword is still processing and no SERP has been fetched yet.  \ntype: boolean\n\n**keyword_is_frozen**: Indicates whether a keyword has exceeded the tracked keywords limit on your plan. Such keywords are \"frozen\", meaning they do not have their rankings updated.  \ntype: boolean\n\n**keyword_prev**: The keyword your target ranks for on the comparison date.  \ntype: string\n\n**keyword_words**: The number of words in a keyword.  \ntype: integer\n\n**keyword_words_prev**: The number of words in a keyword on the comparison date.  \ntype: integer\n\n**language**: The SERP language that a given keyword is being tracked for.  \ntype: string\n\n**language_prev**: The SERP language on the comparison date.  \ntype: string\n\n**location**: The location (country, state/province, or city) that a given keyword is being tracked in.  \ntype: string\n\n**location_prev**: The location (country, state/province, or city) that a given keyword is being tracked in on the comparison date.  \ntype: string\n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead.  To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable\n\n**position**: The top position your target ranks for in the organic search results for a keyword.  \ntype: integer nullable\n\n**position_diff**: The change in position between your selected dates.  \ntype: integer nullable\n\n**position_prev**: The top position on the comparison date.  \ntype: integer nullable\n\n**search_type_image**: Search type Image shows the percentage of searches for a keyword made for images, highlighting interest in visual content.  \ntype: float nullable\n\n**search_type_news**: Search type News shows the percentage of searches for a keyword made for news articles.  \ntype: float nullable\n\n**search_type_video**: Search type Video shows the percentage of searches for a keyword made for video, reflecting interest in video content.  \ntype: float nullable\n\n**search_type_web**: Search type Web shows the percentage of searches for a keyword made for general web content, indicating interest in a wide range of information.  \ntype: float nullable\n\n**serp_features**: The SERP features that appear in search results for a keyword.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_updated**: The date when we last checked search engine results for a keyword.  \ntype: datetime nullable\n\n**serp_updated_prev**: The date when we checked search engine results up to the comparison date.  \ntype: datetime nullable\n\n**tags**: A list of tags assigned to a given keyword.  \ntype: array(string)\n\n**tags_prev**: A list of tags assigned to a given keyword on the comparison date.  \ntype: array(string)\n\n**target_positions_count**: The number of target URLs ranking for a keyword.  \ntype: integer\n\n**traffic**: An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable\n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer nullable\n\n**traffic_prev**: An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable\n\n**url**: The top ranking URL in organic search results for a given keyword.  \ntype: string nullable\n\n**url_prev**: The top ranking URL in organic search results for a given keyword on the comparison date.  \ntype: string nullable\n\n**volume**: An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable",
 142 |                     "type": "string"
 143 |                 },
 144 |                 "select": {
 145 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
 146 |                     "type": "string"
 147 |                 },
 148 |                 "date_compared": {
 149 |                     "description": "A date to compare metrics with in YYYY-MM-DD format.",
 150 |                     "type": "string",
 151 |                     "format": "date"
 152 |                 },
 153 |                 "date": {
 154 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
 155 |                     "type": "string",
 156 |                     "format": "date"
 157 |                 },
 158 |                 "device": {
 159 |                     "description": "Choose between mobile and desktop rankings.",
 160 |                     "type": "string",
 161 |                     "enum": [
 162 |                         "desktop",
 163 |                         "mobile"
 164 |                     ]
 165 |                 },
 166 |                 "project_id": {
 167 |                     "description": "The unique identifier of the project. You can find it in the URL of your Rank Tracker project in Ahrefs: `https://app.ahrefs.com/rank-tracker/overview/#project_id#`",
 168 |                     "type": "integer"
 169 |                 },
 170 |                 "volume_mode": {
 171 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
 172 |                     "type": "string",
 173 |                     "enum": [
 174 |                         "monthly",
 175 |                         "average"
 176 |                     ]
 177 |                 }
 178 |             },
 179 |             "required": [
 180 |                 "select",
 181 |                 "date",
 182 |                 "device",
 183 |                 "project_id"
 184 |             ],
 185 |             "type": "object"
 186 |         },
 187 |         "name": "rank-tracker-overview"
 188 |     },
 189 |     {
 190 |         "_original_method": "GET",
 191 |         "_original_parameters": [
 192 |             {
 193 |                 "in": "query",
 194 |                 "name": "timeout",
 195 |                 "required": false
 196 |             },
 197 |             {
 198 |                 "in": "query",
 199 |                 "name": "offset",
 200 |                 "required": false
 201 |             },
 202 |             {
 203 |                 "in": "query",
 204 |                 "name": "limit",
 205 |                 "required": false
 206 |             },
 207 |             {
 208 |                 "in": "query",
 209 |                 "name": "order_by",
 210 |                 "required": false
 211 |             },
 212 |             {
 213 |                 "in": "query",
 214 |                 "name": "where",
 215 |                 "required": false
 216 |             },
 217 |             {
 218 |                 "in": "query",
 219 |                 "name": "select",
 220 |                 "required": true
 221 |             },
 222 |             {
 223 |                 "in": "query",
 224 |                 "name": "date_compared",
 225 |                 "required": false
 226 |             },
 227 |             {
 228 |                 "in": "query",
 229 |                 "name": "date",
 230 |                 "required": true
 231 |             },
 232 |             {
 233 |                 "in": "query",
 234 |                 "name": "device",
 235 |                 "required": true
 236 |             },
 237 |             {
 238 |                 "in": "query",
 239 |                 "name": "project_id",
 240 |                 "required": true
 241 |             },
 242 |             {
 243 |                 "in": "query",
 244 |                 "name": "volume_mode",
 245 |                 "required": false
 246 |             },
 247 |             {
 248 |                 "in": "query",
 249 |                 "name": "output",
 250 |                 "required": false
 251 |             }
 252 |         ],
 253 |         "_original_path": "rank-tracker/competitors-overview",
 254 |         "_original_request_body": null,
 255 |         "description": "Provides an overview of competitor rankings and keyword metrics for a specified project and date in Ahrefs Rank Tracker, allowing comparison between current and previous data. Use doc tool first to get the real input schema.",
 256 |         "inputSchema": {
 257 |             "properties": {
 258 |                 "timeout": {
 259 |                     "type": "integer"
 260 |                 },
 261 |                 "limit": {
 262 |                     "type": "integer"
 263 |                 },
 264 |                 "order_by": {
 265 |                     "type": "string"
 266 |                 },
 267 |                 "where": {
 268 |                     "type": "string"
 269 |                 },
 270 |                 "select": {
 271 |                     "type": "string"
 272 |                 },
 273 |                 "date_compared": {
 274 |                     "type": "string"
 275 |                 },
 276 |                 "date": {
 277 |                     "type": "string"
 278 |                 },
 279 |                 "device": {
 280 |                     "type": "string"
 281 |                 },
 282 |                 "project_id": {
 283 |                     "type": "integer"
 284 |                 },
 285 |                 "volume_mode": {
 286 |                     "type": "string"
 287 |                 }
 288 |             },
 289 |             "required": [
 290 |                 "select",
 291 |                 "date",
 292 |                 "device",
 293 |                 "project_id"
 294 |             ],
 295 |             "type": "object"
 296 |         },
 297 |         "_inputSchema": {
 298 |             "properties": {
 299 |                 "timeout": {
 300 |                     "description": "A manual timeout duration in seconds.",
 301 |                     "type": "integer"
 302 |                 },
 303 |                 "limit": {
 304 |                     "description": "The number of results to return.",
 305 |                     "type": "integer"
 306 |                 },
 307 |                 "order_by": {
 308 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**competitors_list**: Competitors information for a given keyword. The following fields are included: `url`, `url_prev`, `position`, `position_prev`, `best_position_kind`, `best_position_kind`, `traffic`, `traffic_prev`, `value`, `value_prev`. Fields ending in `prev` are included only in the compared view.  \ntype: array[object]  \n\n**country**: The country that a given keyword is being tracked in. A two-letter country code (ISO 3166-1 alpha-2).  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**keyword**: The keyword your target ranks for.  \ntype: string  \n\n**keyword_difficulty**: An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable  \n\n**keyword_has_data**: Will return `false` if the keyword is still processing and no SERP has been fetched yet.  \ntype: boolean  \n\n**keyword_is_frozen**: Indicates whether a keyword has exceeded the tracked keywords limit on your plan. Such keywords are \"frozen\", meaning they do not have their rankings updated.  \ntype: boolean  \n\n**language**: The SERP language that a given keyword is being tracked for.  \ntype: string  \n\n**location**: The location (country, state/province, or city) that a given keyword is being tracked in.  \ntype: string  \n\n**serp_features**: The SERP features that appear in search results for a keyword.  \ntype: array[string]  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`  \n\n**serp_updated**: The date when we last checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**serp_updated_prev**: The date when we checked search engine results up to the comparison date.  \ntype: string<date-time> nullable  \n\n**tags**: A list of tags assigned to a given keyword.  \ntype: array[string]  \n\n**volume**: An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable  \n\n",
 309 |                     "type": "string"
 310 |                 },
 311 |                 "where": {
 312 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**country**: The country that a given keyword is being tracked in. A two-letter country code (ISO 3166-1 alpha-2).  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**is_main_position**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).  \ntype: boolean\n\n**is_main_position_prev**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.  \ntype: boolean\n\n**keyword**: The keyword your target ranks for.  \ntype: string\n\n**keyword_difficulty**: An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**keyword_has_data**: Will return `false` if the keyword is still processing and no SERP has been fetched yet.  \ntype: boolean\n\n**keyword_is_frozen**: Indicates whether a keyword has exceeded the tracked keywords limit on your plan. Such keywords are \"frozen\", meaning they do not have their rankings updated.  \ntype: boolean\n\n**language**: The SERP language that a given keyword is being tracked for.  \ntype: string\n\n**location**: The location (country, state/province, or city) that a given keyword is being tracked in.  \ntype: string\n\n**serp_features**: The SERP features that appear in search results for a keyword.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_updated**: The date when we last checked search engine results for a keyword.  \ntype: datetime nullable\n\n**serp_updated_prev**: The date when we checked search engine results up to the comparison date.  \ntype: datetime nullable\n\n**tags**: A list of tags assigned to a given keyword.  \ntype: array(string)\n\n**volume**: An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable",
 313 |                     "type": "string"
 314 |                 },
 315 |                 "select": {
 316 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
 317 |                     "type": "string"
 318 |                 },
 319 |                 "date_compared": {
 320 |                     "description": "A date to compare metrics with in YYYY-MM-DD format.",
 321 |                     "type": "string",
 322 |                     "format": "date"
 323 |                 },
 324 |                 "date": {
 325 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
 326 |                     "type": "string",
 327 |                     "format": "date"
 328 |                 },
 329 |                 "device": {
 330 |                     "description": "Choose between mobile and desktop rankings.",
 331 |                     "type": "string",
 332 |                     "enum": [
 333 |                         "desktop",
 334 |                         "mobile"
 335 |                     ]
 336 |                 },
 337 |                 "project_id": {
 338 |                     "description": "The unique identifier of the project. You can find it in the URL of your Rank Tracker project in Ahrefs: `https://app.ahrefs.com/rank-tracker/overview/#project_id#`",
 339 |                     "type": "integer"
 340 |                 },
 341 |                 "volume_mode": {
 342 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
 343 |                     "type": "string",
 344 |                     "enum": [
 345 |                         "monthly",
 346 |                         "average"
 347 |                     ]
 348 |                 }
 349 |             },
 350 |             "required": [
 351 |                 "select",
 352 |                 "date",
 353 |                 "device",
 354 |                 "project_id"
 355 |             ],
 356 |             "type": "object"
 357 |         },
 358 |         "name": "rank-tracker-competitors-overview"
 359 |     },
 360 |     {
 361 |         "_original_method": "POST",
 362 |         "_original_parameters": [
 363 |             {
 364 |                 "in": "body",
 365 |                 "name": "select",
 366 |                 "required": true
 367 |             },
 368 |             {
 369 |                 "in": "body",
 370 |                 "name": "order_by",
 371 |                 "required": false
 372 |             },
 373 |             {
 374 |                 "in": "body",
 375 |                 "name": "country",
 376 |                 "required": false
 377 |             },
 378 |             {
 379 |                 "in": "body",
 380 |                 "name": "volume_mode",
 381 |                 "required": false
 382 |             },
 383 |             {
 384 |                 "in": "body",
 385 |                 "name": "targets",
 386 |                 "required": true
 387 |             },
 388 |             {
 389 |                 "in": "body",
 390 |                 "name": "output",
 391 |                 "required": false
 392 |             }
 393 |         ],
 394 |         "_original_path": "batch-analysis/batch-analysis",
 395 |         "_original_request_body": {
 396 |             "required": true,
 397 |             "content_type": "application/json"
 398 |         },
 399 |         "description": "Performs a batch analysis of multiple URLs, domains, or subdomains to retrieve selected SEO, backlink, organic, and paid traffic metrics. Use doc tool first to get the real input schema.",
 400 |         "inputSchema": {
 401 |             "properties": {
 402 |                 "select": {
 403 |                     "type": "array"
 404 |                 },
 405 |                 "order_by": {
 406 |                     "type": "string"
 407 |                 },
 408 |                 "country": {
 409 |                     "type": "string"
 410 |                 },
 411 |                 "volume_mode": {
 412 |                     "type": "string"
 413 |                 },
 414 |                 "targets": {
 415 |                     "type": "array"
 416 |                 }
 417 |             },
 418 |             "required": [
 419 |                 "select",
 420 |                 "targets"
 421 |             ],
 422 |             "type": "object"
 423 |         },
 424 |         "_inputSchema": {
 425 |             "properties": {
 426 |                 "select": {
 427 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c\n\nResponse schema:**ahrefs_rank**: The strength of your target's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer nullable  \n\n**domain_rating**: The strength of your target's backlink profile compared to the other websites in our database on a 100-point logarithmic scale.  \ntype: number<float> nullable  \n\n**index**: Target index number.  \ntype: integer  \n\n**mode**: The target mode used for the analysis. Depending on the selected mode (Exact URL, Path, Domain, Subdomains), different parts of the website will be analyzed.  \ntype: string  \n\n**org_cost**: (10 units) The estimated value of your target’s monthly organic search traffic.  \ntype: integer nullable  \n\n**org_keywords**: The total number of keywords that your target ranks for in the top 100 organic search results. When ranking for the same keyword across different locations in “All locations” mode, it's still counted as one keyword.  \ntype: integer nullable  \n\n**org_keywords_11_20**: The total number of unique keywords for which your target's top organic ranking position is within the 11th to 20th results. When ranking for the same keyword across different locations in “All locations” mode, it's still counted as one keyword.  \ntype: integer nullable  \n\n**org_keywords_1_3**: The total number of unique keywords for which your target's top organic ranking position is within the top 3 results. When ranking for the same keyword across different locations in “All locations” mode, it's still counted as one keyword.  \ntype: integer nullable  \n\n**org_keywords_21_50**: The total number of unique keywords for which your target's top organic ranking position is within the 21st to 50th results. When ranking for the same keyword across different locations in “All locations” mode, it's still counted as one keyword.  \ntype: integer nullable  \n\n**org_keywords_4_10**: The total number of unique keywords for which your target's top organic ranking position is within the 4th to 10th results. When ranking for the same keyword across different locations in “All locations” mode, it's still counted as one keyword.  \ntype: integer nullable  \n\n**org_keywords_51_plus**: The total number of unique keywords for which your target's top organic ranking position is the 51st result or higher. When ranking for the same keyword across different locations in “All locations” mode, it's still counted as one keyword.  \ntype: integer nullable  \n\n**org_traffic**: (10 units) The estimated number of monthly visits that your target gets from organic search.  \ntype: integer nullable  \n\n**org_traffic_top_by_country**  \ntype: array[array]  \n\n**paid_ads**: The total number of unique ads of a target website or URL in paid search results.  \ntype: integer nullable  \n\n**paid_cost**: (10 units) The estimated cost of your target’s monthly paid search traffic.  \ntype: integer nullable  \n\n**paid_keywords**: The total number of keywords that your target ranks for in paid search results. When ranking for the same keyword across different locations in “All locations” mode, it's still counted as one keyword.  \ntype: integer nullable  \n\n**paid_traffic**: (10 units) The estimated number of monthly visits that your target gets from paid search.  \ntype: integer nullable  \n\n**protocol**: The protocol of the target. Possible values: `both`, `http`, `https`.  \ntype: string  \n\n**url**: The URL of the analyzed target.  \ntype: string<url>  \n\n**url_rating**: URL Rating (UR) shows the strength of your target page's backlink profile on a 100-point logarithmic scale. If you analyze a domain, the homepage's UR is shown.   \ntype: number<float> nullable  \n\n",
 428 |                     "type": "array",
 429 |                     "items": {
 430 |                         "type": "string"
 431 |                     }
 432 |                 },
 433 |                 "order_by": {
 434 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc See response schema for valid column identifiers.",
 435 |                     "type": "string"
 436 |                 },
 437 |                 "country": {
 438 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
 439 |                     "type": "string"
 440 |                 },
 441 |                 "volume_mode": {
 442 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
 443 |                     "type": "string",
 444 |                     "enum": [
 445 |                         "monthly",
 446 |                         "average"
 447 |                     ]
 448 |                 },
 449 |                 "targets": {
 450 |                     "description": "A list of targets to do batch analysis.",
 451 |                     "type": "array",
 452 |                     "items": {
 453 |                         "type": "object",
 454 |                         "required": [
 455 |                             "url",
 456 |                             "mode",
 457 |                             "protocol"
 458 |                         ],
 459 |                         "properties": {
 460 |                             "url": {
 461 |                                 "description": "The URL of the analyzed target.",
 462 |                                 "type": "string"
 463 |                             },
 464 |                             "mode": {
 465 |                                 "description": "The target mode used for the analysis.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
 466 |                                 "type": "string",
 467 |                                 "enum": [
 468 |                                     "exact",
 469 |                                     "prefix",
 470 |                                     "domain",
 471 |                                     "subdomains"
 472 |                                 ]
 473 |                             },
 474 |                             "protocol": {
 475 |                                 "description": "The protocol of the target.",
 476 |                                 "type": "string",
 477 |                                 "enum": [
 478 |                                     "both",
 479 |                                     "http",
 480 |                                     "https"
 481 |                                 ]
 482 |                             }
 483 |                         }
 484 |                     }
 485 |                 }
 486 |             },
 487 |             "required": [
 488 |                 "select",
 489 |                 "targets"
 490 |             ],
 491 |             "type": "object"
 492 |         },
 493 |         "name": "batch-analysis-batch-analysis"
 494 |     },
 495 |     {
 496 |         "_original_method": "GET",
 497 |         "_original_parameters": [
 498 |             {
 499 |                 "in": "query",
 500 |                 "name": "timeout",
 501 |                 "required": false
 502 |             },
 503 |             {
 504 |                 "in": "query",
 505 |                 "name": "offset",
 506 |                 "required": false
 507 |             },
 508 |             {
 509 |                 "in": "query",
 510 |                 "name": "limit",
 511 |                 "required": false
 512 |             },
 513 |             {
 514 |                 "in": "query",
 515 |                 "name": "order_by",
 516 |                 "required": false
 517 |             },
 518 |             {
 519 |                 "in": "query",
 520 |                 "name": "where",
 521 |                 "required": false
 522 |             },
 523 |             {
 524 |                 "in": "query",
 525 |                 "name": "select",
 526 |                 "required": true
 527 |             },
 528 |             {
 529 |                 "in": "query",
 530 |                 "name": "target_mode",
 531 |                 "required": false
 532 |             },
 533 |             {
 534 |                 "in": "query",
 535 |                 "name": "target",
 536 |                 "required": false
 537 |             },
 538 |             {
 539 |                 "in": "query",
 540 |                 "name": "target_position",
 541 |                 "required": false
 542 |             },
 543 |             {
 544 |                 "in": "query",
 545 |                 "name": "country",
 546 |                 "required": true
 547 |             },
 548 |             {
 549 |                 "in": "query",
 550 |                 "name": "search_engine",
 551 |                 "required": false
 552 |             },
 553 |             {
 554 |                 "in": "query",
 555 |                 "name": "keywords",
 556 |                 "required": false
 557 |             },
 558 |             {
 559 |                 "in": "query",
 560 |                 "name": "keyword_list_id",
 561 |                 "required": false
 562 |             },
 563 |             {
 564 |                 "in": "query",
 565 |                 "name": "output",
 566 |                 "required": false
 567 |             }
 568 |         ],
 569 |         "_original_path": "keywords-explorer/overview",
 570 |         "_original_request_body": null,
 571 |         "description": "Provides an overview of keyword metrics—including search volume, CPC, ranking difficulty, traffic potential, and intent—for specified keywords, domains, or URLs within a given country. Use doc tool first to get the real input schema.",
 572 |         "inputSchema": {
 573 |             "properties": {
 574 |                 "timeout": {
 575 |                     "type": "integer"
 576 |                 },
 577 |                 "limit": {
 578 |                     "type": "integer"
 579 |                 },
 580 |                 "order_by": {
 581 |                     "type": "string"
 582 |                 },
 583 |                 "where": {
 584 |                     "type": "string"
 585 |                 },
 586 |                 "select": {
 587 |                     "type": "string"
 588 |                 },
 589 |                 "target_mode": {
 590 |                     "type": "string"
 591 |                 },
 592 |                 "target": {
 593 |                     "type": "string"
 594 |                 },
 595 |                 "target_position": {
 596 |                     "type": "string"
 597 |                 },
 598 |                 "country": {
 599 |                     "type": "string"
 600 |                 },
 601 |                 "keywords": {
 602 |                     "type": "string"
 603 |                 },
 604 |                 "keyword_list_id": {
 605 |                     "type": "integer"
 606 |                 }
 607 |             },
 608 |             "required": [
 609 |                 "select",
 610 |                 "country"
 611 |             ],
 612 |             "type": "object"
 613 |         },
 614 |         "_inputSchema": {
 615 |             "properties": {
 616 |                 "timeout": {
 617 |                     "description": "A manual timeout duration in seconds.",
 618 |                     "type": "integer"
 619 |                 },
 620 |                 "limit": {
 621 |                     "description": "The number of results to return.",
 622 |                     "type": "integer"
 623 |                 },
 624 |                 "order_by": {
 625 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**clicks**: The average monthly number of clicks on the search results that people make while searching for the target keyword.  \ntype: integer nullable  \n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable  \n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: number<float> nullable  \n\n**difficulty**: (10 units) An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable  \n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**global_volume**: (10 units) How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable  \n\n**intents**: (10 units) Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable  \n\n**keyword**  \ntype: string  \n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable  \n\n**parent_volume**: (10 units) The search volume of the parent topic.  \ntype: integer nullable  \n\n**searches_pct_clicks_organic_and_paid**: The average monthly percentage of people who clicked on both organic and paid results while searching for the target keyword.  \ntype: number<float> nullable  \n\n**searches_pct_clicks_organic_only**: The average monthly percentage of people who clicked only on organic results while searching for the target keyword.  \ntype: number<float> nullable  \n\n**searches_pct_clicks_paid_only**: The average monthly percentage of people who clicked only on paid results while searching for the target keyword.  \ntype: number<float> nullable  \n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array[string]  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`  \n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**traffic_potential**: (10 units) The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable  \n\n**volume**: (10 units) An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable  \n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: number<float> nullable  \n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: number<float> nullable  \n\n**volume_monthly**: (10 units) An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable  \n\n",
 626 |                     "type": "string"
 627 |                 },
 628 |                 "where": {
 629 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: Only * as a wildcard operator..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**clicks**: The average monthly number of clicks on the search results that people make while searching for the target keyword.  \ntype: integer nullable\n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable\n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: float nullable\n\n**difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: datetime nullable\n\n**global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable\n\n**intents** (10 units): Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable\n\n**keyword**:   \ntype: string\n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable\n\n**parent_volume** (10 units): The search volume of the parent topic.  \ntype: integer nullable\n\n**serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array(string)  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`\n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: datetime nullable\n\n**traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable\n\n**volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable\n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: float nullable\n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: float nullable\n\n**word_count**:   \ntype: integer",
 630 |                     "type": "string"
 631 |                 },
 632 |                 "select": {
 633 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
 634 |                     "type": "string"
 635 |                 },
 636 |                 "target_mode": {
 637 |                     "description": "The scope of the target URL you specified.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
 638 |                     "type": "string",
 639 |                     "enum": [
 640 |                         "exact",
 641 |                         "prefix",
 642 |                         "domain",
 643 |                         "subdomains"
 644 |                     ]
 645 |                 },
 646 |                 "target": {
 647 |                     "description": "The target of the search: a domain or a URL.",
 648 |                     "type": "string"
 649 |                 },
 650 |                 "target_position": {
 651 |                     "description": "Filters keywords based on the ranking position of the specified `target`.",
 652 |                     "type": "string",
 653 |                     "enum": [
 654 |                         "in_top10",
 655 |                         "in_top100"
 656 |                     ]
 657 |                 },
 658 |                 "country": {
 659 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
 660 |                     "type": "string"
 661 |                 },
 662 |                 "keywords": {
 663 |                     "description": "A comma-separated list of keywords to show metrics for.",
 664 |                     "type": "string"
 665 |                 },
 666 |                 "keyword_list_id": {
 667 |                     "description": "The id of an existing keyword list to show metrics for.",
 668 |                     "type": "integer"
 669 |                 }
 670 |             },
 671 |             "required": [
 672 |                 "select",
 673 |                 "country"
 674 |             ],
 675 |             "type": "object"
 676 |         },
 677 |         "name": "keywords-explorer-overview"
 678 |     },
 679 |     {
 680 |         "_original_method": "GET",
 681 |         "_original_parameters": [
 682 |             {
 683 |                 "in": "query",
 684 |                 "name": "date_to",
 685 |                 "required": false
 686 |             },
 687 |             {
 688 |                 "in": "query",
 689 |                 "name": "date_from",
 690 |                 "required": false
 691 |             },
 692 |             {
 693 |                 "in": "query",
 694 |                 "name": "country",
 695 |                 "required": true
 696 |             },
 697 |             {
 698 |                 "in": "query",
 699 |                 "name": "keyword",
 700 |                 "required": true
 701 |             },
 702 |             {
 703 |                 "in": "query",
 704 |                 "name": "output",
 705 |                 "required": false
 706 |             }
 707 |         ],
 708 |         "_original_path": "keywords-explorer/volume-history",
 709 |         "_original_request_body": null,
 710 |         "description": "Retrieves historical search volume data for a specified keyword within a given country and date range. Use doc tool first to get the real input schema.",
 711 |         "inputSchema": {
 712 |             "properties": {
 713 |                 "date_to": {
 714 |                     "type": "string"
 715 |                 },
 716 |                 "date_from": {
 717 |                     "type": "string"
 718 |                 },
 719 |                 "country": {
 720 |                     "type": "string"
 721 |                 },
 722 |                 "keyword": {
 723 |                     "type": "string"
 724 |                 }
 725 |             },
 726 |             "required": [
 727 |                 "country",
 728 |                 "keyword"
 729 |             ],
 730 |             "type": "object"
 731 |         },
 732 |         "_inputSchema": {
 733 |             "properties": {
 734 |                 "date_to": {
 735 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
 736 |                     "type": "string",
 737 |                     "format": "date"
 738 |                 },
 739 |                 "date_from": {
 740 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
 741 |                     "type": "string",
 742 |                     "format": "date"
 743 |                 },
 744 |                 "country": {
 745 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
 746 |                     "type": "string"
 747 |                 },
 748 |                 "keyword": {
 749 |                     "description": "The keyword to show metrics for.",
 750 |                     "type": "string"
 751 |                 }
 752 |             },
 753 |             "required": [
 754 |                 "country",
 755 |                 "keyword"
 756 |             ],
 757 |             "type": "object"
 758 |         },
 759 |         "name": "keywords-explorer-volume-history"
 760 |     },
 761 |     {
 762 |         "_original_method": "GET",
 763 |         "_original_parameters": [
 764 |             {
 765 |                 "in": "query",
 766 |                 "name": "limit",
 767 |                 "required": false
 768 |             },
 769 |             {
 770 |                 "in": "query",
 771 |                 "name": "search_engine",
 772 |                 "required": false
 773 |             },
 774 |             {
 775 |                 "in": "query",
 776 |                 "name": "keyword",
 777 |                 "required": true
 778 |             },
 779 |             {
 780 |                 "in": "query",
 781 |                 "name": "output",
 782 |                 "required": false
 783 |             }
 784 |         ],
 785 |         "_original_path": "keywords-explorer/volume-by-country",
 786 |         "_original_request_body": null,
 787 |         "description": "Retrieves search volume metrics for a specified keyword broken down by country. Use doc tool first to get the real input schema.",
 788 |         "inputSchema": {
 789 |             "properties": {
 790 |                 "limit": {
 791 |                     "type": "integer"
 792 |                 },
 793 |                 "keyword": {
 794 |                     "type": "string"
 795 |                 }
 796 |             },
 797 |             "required": [
 798 |                 "keyword"
 799 |             ],
 800 |             "type": "object"
 801 |         },
 802 |         "_inputSchema": {
 803 |             "properties": {
 804 |                 "limit": {
 805 |                     "description": "The number of results to return.",
 806 |                     "type": "integer"
 807 |                 },
 808 |                 "keyword": {
 809 |                     "description": "The keyword to show metrics for.",
 810 |                     "type": "string"
 811 |                 }
 812 |             },
 813 |             "required": [
 814 |                 "keyword"
 815 |             ],
 816 |             "type": "object"
 817 |         },
 818 |         "name": "keywords-explorer-volume-by-country"
 819 |     },
 820 |     {
 821 |         "_original_method": "GET",
 822 |         "_original_parameters": [
 823 |             {
 824 |                 "in": "query",
 825 |                 "name": "timeout",
 826 |                 "required": false
 827 |             },
 828 |             {
 829 |                 "in": "query",
 830 |                 "name": "offset",
 831 |                 "required": false
 832 |             },
 833 |             {
 834 |                 "in": "query",
 835 |                 "name": "limit",
 836 |                 "required": false
 837 |             },
 838 |             {
 839 |                 "in": "query",
 840 |                 "name": "order_by",
 841 |                 "required": false
 842 |             },
 843 |             {
 844 |                 "in": "query",
 845 |                 "name": "where",
 846 |                 "required": false
 847 |             },
 848 |             {
 849 |                 "in": "query",
 850 |                 "name": "select",
 851 |                 "required": true
 852 |             },
 853 |             {
 854 |                 "in": "query",
 855 |                 "name": "country",
 856 |                 "required": true
 857 |             },
 858 |             {
 859 |                 "in": "query",
 860 |                 "name": "search_engine",
 861 |                 "required": false
 862 |             },
 863 |             {
 864 |                 "in": "query",
 865 |                 "name": "keywords",
 866 |                 "required": false
 867 |             },
 868 |             {
 869 |                 "in": "query",
 870 |                 "name": "keyword_list_id",
 871 |                 "required": false
 872 |             },
 873 |             {
 874 |                 "in": "query",
 875 |                 "name": "match_mode",
 876 |                 "required": false
 877 |             },
 878 |             {
 879 |                 "in": "query",
 880 |                 "name": "terms",
 881 |                 "required": false
 882 |             },
 883 |             {
 884 |                 "in": "query",
 885 |                 "name": "output",
 886 |                 "required": false
 887 |             }
 888 |         ],
 889 |         "_original_path": "keywords-explorer/matching-terms",
 890 |         "_original_request_body": null,
 891 |         "description": "Retrieves keyword ideas and their associated SEO metrics by matching input terms or phrases in a specified country, with extensive support for filtering, sorting, and metric selection. Use doc tool first to get the real input schema.",
 892 |         "inputSchema": {
 893 |             "properties": {
 894 |                 "timeout": {
 895 |                     "type": "integer"
 896 |                 },
 897 |                 "limit": {
 898 |                     "type": "integer"
 899 |                 },
 900 |                 "order_by": {
 901 |                     "type": "string"
 902 |                 },
 903 |                 "where": {
 904 |                     "type": "string"
 905 |                 },
 906 |                 "select": {
 907 |                     "type": "string"
 908 |                 },
 909 |                 "country": {
 910 |                     "type": "string"
 911 |                 },
 912 |                 "keywords": {
 913 |                     "type": "string"
 914 |                 },
 915 |                 "keyword_list_id": {
 916 |                     "type": "integer"
 917 |                 },
 918 |                 "match_mode": {
 919 |                     "type": "string"
 920 |                 },
 921 |                 "terms": {
 922 |                     "type": "string"
 923 |                 }
 924 |             },
 925 |             "required": [
 926 |                 "select",
 927 |                 "country"
 928 |             ],
 929 |             "type": "object"
 930 |         },
 931 |         "_inputSchema": {
 932 |             "properties": {
 933 |                 "timeout": {
 934 |                     "description": "A manual timeout duration in seconds.",
 935 |                     "type": "integer"
 936 |                 },
 937 |                 "limit": {
 938 |                     "description": "The number of results to return.",
 939 |                     "type": "integer"
 940 |                 },
 941 |                 "order_by": {
 942 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable  \n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: number<float> nullable  \n\n**difficulty**: (10 units) An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable  \n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**global_volume**: (10 units) How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable  \n\n**intents**: (10 units) Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable  \n\n**keyword**  \ntype: string  \n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable  \n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array[string]  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`  \n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**traffic_potential**: (10 units) The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable  \n\n**volume**: (10 units) An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable  \n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: number<float> nullable  \n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: number<float> nullable  \n\n**volume_monthly**: (10 units) An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable  \n\n",
 943 |                     "type": "string"
 944 |                 },
 945 |                 "where": {
 946 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: Only * as a wildcard operator..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable\n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: float nullable\n\n**difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: datetime nullable\n\n**global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable\n\n**intents** (10 units): Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable\n\n**keyword**:   \ntype: string\n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable\n\n**serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array(string)  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`\n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: datetime nullable\n\n**traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable\n\n**volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable\n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: float nullable\n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: float nullable\n\n**word_count**:   \ntype: integer",
 947 |                     "type": "string"
 948 |                 },
 949 |                 "select": {
 950 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
 951 |                     "type": "string"
 952 |                 },
 953 |                 "country": {
 954 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
 955 |                     "type": "string"
 956 |                 },
 957 |                 "keywords": {
 958 |                     "description": "A comma-separated list of keywords to show metrics for.",
 959 |                     "type": "string"
 960 |                 },
 961 |                 "keyword_list_id": {
 962 |                     "description": "The id of an existing keyword list to show metrics for.",
 963 |                     "type": "integer"
 964 |                 },
 965 |                 "match_mode": {
 966 |                     "description": "Keyword ideas contain the words from your query in any order (terms mode) or in the exact order they are written (phrase mode).",
 967 |                     "type": "string",
 968 |                     "enum": [
 969 |                         "terms",
 970 |                         "phrase"
 971 |                     ]
 972 |                 },
 973 |                 "terms": {
 974 |                     "description": "All keywords ideas or keywords ideas phrased as questions.",
 975 |                     "type": "string",
 976 |                     "enum": [
 977 |                         "all",
 978 |                         "questions"
 979 |                     ]
 980 |                 }
 981 |             },
 982 |             "required": [
 983 |                 "select",
 984 |                 "country"
 985 |             ],
 986 |             "type": "object"
 987 |         },
 988 |         "name": "keywords-explorer-matching-terms"
 989 |     },
 990 |     {
 991 |         "_original_method": "GET",
 992 |         "_original_parameters": [
 993 |             {
 994 |                 "in": "query",
 995 |                 "name": "timeout",
 996 |                 "required": false
 997 |             },
 998 |             {
 999 |                 "in": "query",
1000 |                 "name": "offset",
1001 |                 "required": false
1002 |             },
1003 |             {
1004 |                 "in": "query",
1005 |                 "name": "limit",
1006 |                 "required": false
1007 |             },
1008 |             {
1009 |                 "in": "query",
1010 |                 "name": "order_by",
1011 |                 "required": false
1012 |             },
1013 |             {
1014 |                 "in": "query",
1015 |                 "name": "where",
1016 |                 "required": false
1017 |             },
1018 |             {
1019 |                 "in": "query",
1020 |                 "name": "select",
1021 |                 "required": true
1022 |             },
1023 |             {
1024 |                 "in": "query",
1025 |                 "name": "country",
1026 |                 "required": true
1027 |             },
1028 |             {
1029 |                 "in": "query",
1030 |                 "name": "keywords",
1031 |                 "required": false
1032 |             },
1033 |             {
1034 |                 "in": "query",
1035 |                 "name": "keyword_list_id",
1036 |                 "required": false
1037 |             },
1038 |             {
1039 |                 "in": "query",
1040 |                 "name": "view_for",
1041 |                 "required": false
1042 |             },
1043 |             {
1044 |                 "in": "query",
1045 |                 "name": "terms",
1046 |                 "required": false
1047 |             },
1048 |             {
1049 |                 "in": "query",
1050 |                 "name": "output",
1051 |                 "required": false
1052 |             }
1053 |         ],
1054 |         "_original_path": "keywords-explorer/related-terms",
1055 |         "_original_request_body": null,
1056 |         "description": "Returns keyword metrics and related terms—such as \"also rank for\" keywords and \"also talk about\" keywords—for a given keyword or keyword list, with filtering and sorting options. Use doc tool first to get the real input schema.",
1057 |         "inputSchema": {
1058 |             "properties": {
1059 |                 "timeout": {
1060 |                     "type": "integer"
1061 |                 },
1062 |                 "limit": {
1063 |                     "type": "integer"
1064 |                 },
1065 |                 "order_by": {
1066 |                     "type": "string"
1067 |                 },
1068 |                 "where": {
1069 |                     "type": "string"
1070 |                 },
1071 |                 "select": {
1072 |                     "type": "string"
1073 |                 },
1074 |                 "country": {
1075 |                     "type": "string"
1076 |                 },
1077 |                 "keywords": {
1078 |                     "type": "string"
1079 |                 },
1080 |                 "keyword_list_id": {
1081 |                     "type": "integer"
1082 |                 },
1083 |                 "view_for": {
1084 |                     "type": "string"
1085 |                 },
1086 |                 "terms": {
1087 |                     "type": "string"
1088 |                 }
1089 |             },
1090 |             "required": [
1091 |                 "select",
1092 |                 "country"
1093 |             ],
1094 |             "type": "object"
1095 |         },
1096 |         "_inputSchema": {
1097 |             "properties": {
1098 |                 "timeout": {
1099 |                     "description": "A manual timeout duration in seconds.",
1100 |                     "type": "integer"
1101 |                 },
1102 |                 "limit": {
1103 |                     "description": "The number of results to return.",
1104 |                     "type": "integer"
1105 |                 },
1106 |                 "order_by": {
1107 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable  \n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: number<float> nullable  \n\n**difficulty**: (10 units) An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable  \n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**global_volume**: (10 units) How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable  \n\n**intents**: (10 units) Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable  \n\n**keyword**  \ntype: string  \n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable  \n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array[string]  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`  \n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**traffic_potential**: (10 units) The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable  \n\n**volume**: (10 units) An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable  \n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: number<float> nullable  \n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: number<float> nullable  \n\n**volume_monthly**: (10 units) An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable  \n\n",
1108 |                     "type": "string"
1109 |                 },
1110 |                 "where": {
1111 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: Only * as a wildcard operator..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable\n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: float nullable\n\n**difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: datetime nullable\n\n**global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable\n\n**intents** (10 units): Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable\n\n**keyword**:   \ntype: string\n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable\n\n**serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array(string)  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`\n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: datetime nullable\n\n**traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable\n\n**volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable\n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: float nullable\n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: float nullable\n\n**word_count**:   \ntype: integer",
1112 |                     "type": "string"
1113 |                 },
1114 |                 "select": {
1115 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
1116 |                     "type": "string"
1117 |                 },
1118 |                 "country": {
1119 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
1120 |                     "type": "string"
1121 |                 },
1122 |                 "keywords": {
1123 |                     "description": "A comma-separated list of keywords to show metrics for.",
1124 |                     "type": "string"
1125 |                 },
1126 |                 "keyword_list_id": {
1127 |                     "description": "The id of an existing keyword list to show metrics for.",
1128 |                     "type": "integer"
1129 |                 },
1130 |                 "view_for": {
1131 |                     "description": "View keywords for the top 10 or top 100 ranking pages.",
1132 |                     "type": "string",
1133 |                     "enum": [
1134 |                         "top_10",
1135 |                         "top_100"
1136 |                     ]
1137 |                 },
1138 |                 "terms": {
1139 |                     "description": "Related keywords which top-ranking pages also rank for (`also_rank_for`), additional keywords frequently mentioned in top-ranking pages (`also_talk_about`), or combination of both (`all`).",
1140 |                     "type": "string",
1141 |                     "enum": [
1142 |                         "also_rank_for",
1143 |                         "also_talk_about",
1144 |                         "all"
1145 |                     ]
1146 |                 }
1147 |             },
1148 |             "required": [
1149 |                 "select",
1150 |                 "country"
1151 |             ],
1152 |             "type": "object"
1153 |         },
1154 |         "name": "keywords-explorer-related-terms"
1155 |     },
1156 |     {
1157 |         "_original_method": "GET",
1158 |         "_original_parameters": [
1159 |             {
1160 |                 "in": "query",
1161 |                 "name": "timeout",
1162 |                 "required": false
1163 |             },
1164 |             {
1165 |                 "in": "query",
1166 |                 "name": "offset",
1167 |                 "required": false
1168 |             },
1169 |             {
1170 |                 "in": "query",
1171 |                 "name": "limit",
1172 |                 "required": false
1173 |             },
1174 |             {
1175 |                 "in": "query",
1176 |                 "name": "order_by",
1177 |                 "required": false
1178 |             },
1179 |             {
1180 |                 "in": "query",
1181 |                 "name": "where",
1182 |                 "required": false
1183 |             },
1184 |             {
1185 |                 "in": "query",
1186 |                 "name": "select",
1187 |                 "required": true
1188 |             },
1189 |             {
1190 |                 "in": "query",
1191 |                 "name": "country",
1192 |                 "required": true
1193 |             },
1194 |             {
1195 |                 "in": "query",
1196 |                 "name": "search_engine",
1197 |                 "required": false
1198 |             },
1199 |             {
1200 |                 "in": "query",
1201 |                 "name": "keywords",
1202 |                 "required": false
1203 |             },
1204 |             {
1205 |                 "in": "query",
1206 |                 "name": "keyword_list_id",
1207 |                 "required": false
1208 |             },
1209 |             {
1210 |                 "in": "query",
1211 |                 "name": "output",
1212 |                 "required": false
1213 |             }
1214 |         ],
1215 |         "_original_path": "keywords-explorer/search-suggestions",
1216 |         "_original_request_body": null,
1217 |         "description": "Provides keyword search suggestions and related keyword metrics (e.g., search volume, difficulty, CPC) for specified queries or keyword lists, with options to filter, sort, and customize returned fields by country. Use doc tool first to get the real input schema.",
1218 |         "inputSchema": {
1219 |             "properties": {
1220 |                 "timeout": {
1221 |                     "type": "integer"
1222 |                 },
1223 |                 "limit": {
1224 |                     "type": "integer"
1225 |                 },
1226 |                 "order_by": {
1227 |                     "type": "string"
1228 |                 },
1229 |                 "where": {
1230 |                     "type": "string"
1231 |                 },
1232 |                 "select": {
1233 |                     "type": "string"
1234 |                 },
1235 |                 "country": {
1236 |                     "type": "string"
1237 |                 },
1238 |                 "keywords": {
1239 |                     "type": "string"
1240 |                 },
1241 |                 "keyword_list_id": {
1242 |                     "type": "integer"
1243 |                 }
1244 |             },
1245 |             "required": [
1246 |                 "select",
1247 |                 "country"
1248 |             ],
1249 |             "type": "object"
1250 |         },
1251 |         "_inputSchema": {
1252 |             "properties": {
1253 |                 "timeout": {
1254 |                     "description": "A manual timeout duration in seconds.",
1255 |                     "type": "integer"
1256 |                 },
1257 |                 "limit": {
1258 |                     "description": "The number of results to return.",
1259 |                     "type": "integer"
1260 |                 },
1261 |                 "order_by": {
1262 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable  \n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: number<float> nullable  \n\n**difficulty**: (10 units) An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable  \n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**global_volume**: (10 units) How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable  \n\n**intents**: (10 units) Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable  \n\n**keyword**  \ntype: string  \n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable  \n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array[string]  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`  \n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: string<date-time> nullable  \n\n**traffic_potential**: (10 units) The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable  \n\n**volume**: (10 units) An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable  \n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: number<float> nullable  \n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: number<float> nullable  \n\n**volume_monthly**: (10 units) An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable  \n\n",
1263 |                     "type": "string"
1264 |                 },
1265 |                 "where": {
1266 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: Only * as a wildcard operator..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable\n\n**cps**: Clicks Per Search (or CPS) is the ratio of Clicks to Keyword Search volume. It shows how many different search results get clicked, on average, when people search for the target keyword in a given country.  \ntype: float nullable\n\n**difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**first_seen**: The date when we first checked search engine results for a keyword.  \ntype: datetime nullable\n\n**global_volume** (10 units): How many times per month, on average, people search for the target keyword across all countries in our database.  \ntype: integer nullable\n\n**intents** (10 units): Indicates the purpose behind the user's search query. Object fields: `informational`, `navigational`, `commercial`, `transactional`, `branded` or `local`. All the fields are of type `bool`, with posible values `true` or `false`.  \ntype: object nullable\n\n**keyword**:   \ntype: string\n\n**parent_topic**: Parent Topic determines if you can rank for your target keyword while targeting a more general topic on your page instead. To identify the Parent Topic, we take the #1 ranking page for your keyword and find the keyword responsible for sending the most traffic to that page.  \ntype: string nullable\n\n**serp_domain_rating_top10_min**: The keyword must have at least one ranking position in the top 10 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_domain_rating_top5_min**: The keyword must have at least one ranking position in the top 5 results with a DR of up to this value.  \ntype: float nullable\n\n**serp_features**: The enriched results on a search engine results page (SERP) that are not traditional organic results.  \ntype: array(string)  \nenum: `\"ai_overview_sitelink\"` `\"snippet\"` `\"ai_overview\"` `\"local_pack\"` `\"sitelink\"` `\"news\"` `\"image\"` `\"video\"` `\"discussion\"` `\"tweet\"` `\"paid_top\"` `\"paid_bottom\"` `\"paid_sitelink\"` `\"shopping\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"question\"` `\"image_th\"` `\"video_th\"` `\"organic_shopping\"`\n\n**serp_last_update**: The date when we last checked search engine results for a keyword.  \ntype: datetime nullable\n\n**traffic_potential** (10 units): The sum of organic traffic that the #1 ranking page for your target keyword receives from all the keywords that it ranks for.  \ntype: integer nullable\n\n**volume** (10 units): An estimation of the average monthly number of searches for a keyword over the latest known 12 months of data.  \ntype: integer nullable\n\n**volume_desktop_pct**: The percentage of searches for a keyword performed on desktop devices.  \ntype: float nullable\n\n**volume_mobile_pct**: The percentage of searches for a keyword performed on mobile devices.  \ntype: float nullable\n\n**word_count**:   \ntype: integer",
1267 |                     "type": "string"
1268 |                 },
1269 |                 "select": {
1270 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
1271 |                     "type": "string"
1272 |                 },
1273 |                 "country": {
1274 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
1275 |                     "type": "string"
1276 |                 },
1277 |                 "keywords": {
1278 |                     "description": "A comma-separated list of keywords to show metrics for.",
1279 |                     "type": "string"
1280 |                 },
1281 |                 "keyword_list_id": {
1282 |                     "description": "The id of an existing keyword list to show metrics for.",
1283 |                     "type": "integer"
1284 |                 }
1285 |             },
1286 |             "required": [
1287 |                 "select",
1288 |                 "country"
1289 |             ],
1290 |             "type": "object"
1291 |         },
1292 |         "name": "keywords-explorer-search-suggestions"
1293 |     },
1294 |     {
1295 |         "_original_method": "GET",
1296 |         "_original_parameters": [
1297 |             {
1298 |                 "in": "query",
1299 |                 "name": "output",
1300 |                 "required": false
1301 |             }
1302 |         ],
1303 |         "_original_path": "site-audit/projects",
1304 |         "_original_request_body": null,
1305 |         "description": "Retrieves a list of site audit projects available in the system. Use doc tool first to get the real input schema.",
1306 |         "inputSchema": {
1307 |             "properties": {},
1308 |             "required": [],
1309 |             "type": "object"
1310 |         },
1311 |         "_inputSchema": {
1312 |             "properties": {},
1313 |             "required": [],
1314 |             "type": "object"
1315 |         },
1316 |         "name": "site-audit-projects"
1317 |     },
1318 |     {
1319 |         "_original_method": "GET",
1320 |         "_original_parameters": [
1321 |             {
1322 |                 "in": "query",
1323 |                 "name": "owned_by",
1324 |                 "required": false
1325 |             },
1326 |             {
1327 |                 "in": "query",
1328 |                 "name": "access",
1329 |                 "required": false
1330 |             },
1331 |             {
1332 |                 "in": "query",
1333 |                 "name": "has_keywords",
1334 |                 "required": false
1335 |             },
1336 |             {
1337 |                 "in": "query",
1338 |                 "name": "project_id",
1339 |                 "required": false
1340 |             },
1341 |             {
1342 |                 "in": "query",
1343 |                 "name": "output",
1344 |                 "required": false
1345 |             }
1346 |         ],
1347 |         "_original_path": "management/projects",
1348 |         "_original_request_body": null,
1349 |         "description": "Retrieves information about existing projects, including ownership, access type, presence of Rank Tracker keywords, and project ID. Use doc tool first to get the real input schema.",
1350 |         "inputSchema": {
1351 |             "properties": {
1352 |                 "owned_by": {
1353 |                     "type": "string"
1354 |                 },
1355 |                 "access": {
1356 |                     "type": "string"
1357 |                 },
1358 |                 "has_keywords": {
1359 |                     "type": "boolean"
1360 |                 },
1361 |                 "project_id": {
1362 |                     "type": "integer"
1363 |                 }
1364 |             },
1365 |             "required": [],
1366 |             "type": "object"
1367 |         },
1368 |         "_inputSchema": {
1369 |             "properties": {
1370 |                 "owned_by": {
1371 |                     "description": "The email of the project owner.",
1372 |                     "type": "string"
1373 |                 },
1374 |                 "access": {
1375 |                     "description": "The access type of the project.",
1376 |                     "type": "string",
1377 |                     "enum": [
1378 |                         "private",
1379 |                         "shared"
1380 |                     ]
1381 |                 },
1382 |                 "has_keywords": {
1383 |                     "description": "Has Rank Tracker keywords.",
1384 |                     "type": "boolean"
1385 |                 },
1386 |                 "project_id": {
1387 |                     "description": "The unique identifier of the project. You can find it in the URL of your Rank Tracker project in Ahrefs: `https://app.ahrefs.com/rank-tracker/overview/#project_id#`",
1388 |                     "type": "integer"
1389 |                 }
1390 |             },
1391 |             "required": [],
1392 |             "type": "object"
1393 |         },
1394 |         "name": "management-projects"
1395 |     },
1396 |     {
1397 |         "_original_method": "GET",
1398 |         "_original_parameters": [
1399 |             {
1400 |                 "in": "query",
1401 |                 "name": "project_id",
1402 |                 "required": true
1403 |             },
1404 |             {
1405 |                 "in": "query",
1406 |                 "name": "output",
1407 |                 "required": false
1408 |             }
1409 |         ],
1410 |         "_original_path": "management/project-keywords",
1411 |         "_original_request_body": null,
1412 |         "description": "Retrieves keywords associated with a specific project in Ahrefs' Rank Tracker by project ID. Use doc tool first to get the real input schema.",
1413 |         "inputSchema": {
1414 |             "properties": {
1415 |                 "project_id": {
1416 |                     "type": "integer"
1417 |                 }
1418 |             },
1419 |             "required": [
1420 |                 "project_id"
1421 |             ],
1422 |             "type": "object"
1423 |         },
1424 |         "_inputSchema": {
1425 |             "properties": {
1426 |                 "project_id": {
1427 |                     "description": "The unique identifier of the project. You can find it in the URL of your Rank Tracker project in Ahrefs: `https://app.ahrefs.com/rank-tracker/overview/#project_id#`",
1428 |                     "type": "integer"
1429 |                 }
1430 |             },
1431 |             "required": [
1432 |                 "project_id"
1433 |             ],
1434 |             "type": "object"
1435 |         },
1436 |         "name": "management-project-keywords"
1437 |     },
1438 |     {
1439 |         "_original_method": "GET",
1440 |         "_original_parameters": [
1441 |             {
1442 |                 "in": "query",
1443 |                 "name": "us_state",
1444 |                 "required": false
1445 |             },
1446 |             {
1447 |                 "in": "query",
1448 |                 "name": "country_code",
1449 |                 "required": true
1450 |             },
1451 |             {
1452 |                 "in": "query",
1453 |                 "name": "output",
1454 |                 "required": false
1455 |             }
1456 |         ],
1457 |         "_original_path": "management/locations",
1458 |         "_original_request_body": null,
1459 |         "description": "Retrieves a list of management locations filtered by country code and optionally by US state. Use doc tool first to get the real input schema.",
1460 |         "inputSchema": {
1461 |             "properties": {
1462 |                 "us_state": {
1463 |                     "type": "string"
1464 |                 },
1465 |                 "country_code": {
1466 |                     "type": "string"
1467 |                 }
1468 |             },
1469 |             "required": [
1470 |                 "country_code"
1471 |             ],
1472 |             "type": "object"
1473 |         },
1474 |         "_inputSchema": {
1475 |             "properties": {
1476 |                 "us_state": {
1477 |                     "description": "A two-letter US state code (ISO 3166-2:US): \"AL\" .. \"WY\". Required only if `country_code` is set to `US`",
1478 |                     "type": "string"
1479 |                 },
1480 |                 "country_code": {
1481 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
1482 |                     "type": "string"
1483 |                 }
1484 |             },
1485 |             "required": [
1486 |                 "country_code"
1487 |             ],
1488 |             "type": "object"
1489 |         },
1490 |         "name": "management-locations"
1491 |     },
1492 |     {
1493 |         "_original_method": "GET",
1494 |         "_original_parameters": [
1495 |             {
1496 |                 "in": "query",
1497 |                 "name": "project_id",
1498 |                 "required": true
1499 |             },
1500 |             {
1501 |                 "in": "query",
1502 |                 "name": "output",
1503 |                 "required": false
1504 |             }
1505 |         ],
1506 |         "_original_path": "management/project-competitors",
1507 |         "_original_request_body": null,
1508 |         "description": "Retrieves the list of competitors associated with a specific Rank Tracker project in Ahrefs, using the project's unique identifier. Use doc tool first to get the real input schema.",
1509 |         "inputSchema": {
1510 |             "properties": {
1511 |                 "project_id": {
1512 |                     "type": "integer"
1513 |                 }
1514 |             },
1515 |             "required": [
1516 |                 "project_id"
1517 |             ],
1518 |             "type": "object"
1519 |         },
1520 |         "_inputSchema": {
1521 |             "properties": {
1522 |                 "project_id": {
1523 |                     "description": "The unique identifier of the project. You can find it in the URL of your Rank Tracker project in Ahrefs: `https://app.ahrefs.com/rank-tracker/overview/#project_id#`",
1524 |                     "type": "integer"
1525 |                 }
1526 |             },
1527 |             "required": [
1528 |                 "project_id"
1529 |             ],
1530 |             "type": "object"
1531 |         },
1532 |         "name": "management-project-competitors"
1533 |     },
1534 |     {
1535 |         "_original_method": "GET",
1536 |         "_original_parameters": [
1537 |             {
1538 |                 "in": "query",
1539 |                 "name": "select",
1540 |                 "required": true
1541 |             },
1542 |             {
1543 |                 "in": "query",
1544 |                 "name": "top_positions",
1545 |                 "required": false
1546 |             },
1547 |             {
1548 |                 "in": "query",
1549 |                 "name": "date",
1550 |                 "required": false
1551 |             },
1552 |             {
1553 |                 "in": "query",
1554 |                 "name": "country",
1555 |                 "required": true
1556 |             },
1557 |             {
1558 |                 "in": "query",
1559 |                 "name": "keyword",
1560 |                 "required": true
1561 |             },
1562 |             {
1563 |                 "in": "query",
1564 |                 "name": "output",
1565 |                 "required": false
1566 |             }
1567 |         ],
1568 |         "_original_path": "serp-overview/serp-overview",
1569 |         "_original_request_body": null,
1570 |         "description": "Returns an overview of the top search results (SERP) for a specified keyword and country, including detailed metrics about each result like position, backlinks, traffic, domain rating, and related keywords. Use doc tool first to get the real input schema.",
1571 |         "inputSchema": {
1572 |             "properties": {
1573 |                 "select": {
1574 |                     "type": "string"
1575 |                 },
1576 |                 "top_positions": {
1577 |                     "type": "integer"
1578 |                 },
1579 |                 "date": {
1580 |                     "type": "string"
1581 |                 },
1582 |                 "country": {
1583 |                     "type": "string"
1584 |                 },
1585 |                 "keyword": {
1586 |                     "type": "string"
1587 |                 }
1588 |             },
1589 |             "required": [
1590 |                 "select",
1591 |                 "country",
1592 |                 "keyword"
1593 |             ],
1594 |             "type": "object"
1595 |         },
1596 |         "_inputSchema": {
1597 |             "properties": {
1598 |                 "select": {
1599 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c\n\nResponse schema:**ahrefs_rank**: The strength of a domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer nullable  \n\n**backlinks**: The total number of links from other websites pointing to a search result.  \ntype: integer nullable  \n\n**domain_rating**: The strength of a domain’s backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float> nullable  \n\n**keywords**: The total number of keywords that a search result ranks for in the top 100 organic positions.  \ntype: integer nullable  \n\n**position**: The position of the search result in SERP.  \ntype: integer  \n\n**refdomains**: (5 units) The total number of unique domains linking to a search result.  \ntype: integer nullable  \n\n**title**: The title of a ranking page.  \ntype: string nullable  \n\n**top_keyword**: The keyword that brings the most organic traffic to a search result.  \ntype: string nullable  \n\n**top_keyword_volume**: (10 units) An estimation of the average monthly number of searches for the top keyword over the latest known 12 months of data.  \ntype: integer nullable  \n\n**traffic**: (10 units) An estimation of the monthly organic search traffic that a result gets from all the keywords that it ranks for.  \ntype: integer nullable  \n\n**type**: The kind of the position: organic, paid, or a SERP feature.  \ntype: array[string]  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"`  \n\n**update_date**: The date when we checked search engine results for a keyword.  \ntype: string<date-time>  \n\n**url**: The URL of a ranking page.  \ntype: string nullable  \n\n**url_rating**: The strength of a page's backlink profile on a 100-point logarithmic scale.  \ntype: number<float> nullable  \n\n**value**: (10 units) The estimated value of a page’s monthly organic search traffic, in USD cents.  \ntype: integer nullable  \n\n",
1600 |                     "type": "string"
1601 |                 },
1602 |                 "top_positions": {
1603 |                     "description": "The number of top organic SERP positions to return. If not specified, all available positions will be returned.",
1604 |                     "type": "integer"
1605 |                 },
1606 |                 "date": {
1607 |                     "description": "A timestamp on which the last available SERP Overview is returned in YYYY-MM-DDThh:mm:ss format. If it is not specified, the most recent SERP Overview is returned.",
1608 |                     "type": "string",
1609 |                     "format": "date-time"
1610 |                 },
1611 |                 "country": {
1612 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
1613 |                     "type": "string"
1614 |                 },
1615 |                 "keyword": {
1616 |                     "description": "The keyword to return SERP Overview for.",
1617 |                     "type": "string"
1618 |                 }
1619 |             },
1620 |             "required": [
1621 |                 "select",
1622 |                 "country",
1623 |                 "keyword"
1624 |             ],
1625 |             "type": "object"
1626 |         },
1627 |         "name": "serp-overview-serp-overview"
1628 |     },
1629 |     {
1630 |         "_original_method": "GET",
1631 |         "_original_parameters": [
1632 |             {
1633 |                 "in": "query",
1634 |                 "name": "protocol",
1635 |                 "required": false
1636 |             },
1637 |             {
1638 |                 "in": "query",
1639 |                 "name": "target",
1640 |                 "required": true
1641 |             },
1642 |             {
1643 |                 "in": "query",
1644 |                 "name": "date",
1645 |                 "required": true
1646 |             },
1647 |             {
1648 |                 "in": "query",
1649 |                 "name": "output",
1650 |                 "required": false
1651 |             }
1652 |         ],
1653 |         "_original_path": "site-explorer/domain-rating",
1654 |         "_original_request_body": null,
1655 |         "description": "Retrieves the domain rating and related metrics for a specified domain or URL as of a specific date. Use doc tool first to get the real input schema.",
1656 |         "inputSchema": {
1657 |             "properties": {
1658 |                 "protocol": {
1659 |                     "type": "string"
1660 |                 },
1661 |                 "target": {
1662 |                     "type": "string"
1663 |                 },
1664 |                 "date": {
1665 |                     "type": "string"
1666 |                 }
1667 |             },
1668 |             "required": [
1669 |                 "target",
1670 |                 "date"
1671 |             ],
1672 |             "type": "object"
1673 |         },
1674 |         "_inputSchema": {
1675 |             "properties": {
1676 |                 "protocol": {
1677 |                     "description": "The protocol of your target.",
1678 |                     "type": "string",
1679 |                     "enum": [
1680 |                         "both",
1681 |                         "http",
1682 |                         "https"
1683 |                     ]
1684 |                 },
1685 |                 "target": {
1686 |                     "description": "The target of the search: a domain or a URL.",
1687 |                     "type": "string"
1688 |                 },
1689 |                 "date": {
1690 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
1691 |                     "type": "string",
1692 |                     "format": "date"
1693 |                 }
1694 |             },
1695 |             "required": [
1696 |                 "target",
1697 |                 "date"
1698 |             ],
1699 |             "type": "object"
1700 |         },
1701 |         "name": "site-explorer-domain-rating"
1702 |     },
1703 |     {
1704 |         "_original_method": "GET",
1705 |         "_original_parameters": [
1706 |             {
1707 |                 "in": "query",
1708 |                 "name": "protocol",
1709 |                 "required": false
1710 |             },
1711 |             {
1712 |                 "in": "query",
1713 |                 "name": "target",
1714 |                 "required": true
1715 |             },
1716 |             {
1717 |                 "in": "query",
1718 |                 "name": "mode",
1719 |                 "required": false
1720 |             },
1721 |             {
1722 |                 "in": "query",
1723 |                 "name": "date",
1724 |                 "required": true
1725 |             },
1726 |             {
1727 |                 "in": "query",
1728 |                 "name": "output",
1729 |                 "required": false
1730 |             }
1731 |         ],
1732 |         "_original_path": "site-explorer/backlinks-stats",
1733 |         "_original_request_body": null,
1734 |         "description": "Provides backlink statistics for a specified URL or domain as of a given date, with options to control protocol and scope. Use doc tool first to get the real input schema.",
1735 |         "inputSchema": {
1736 |             "properties": {
1737 |                 "protocol": {
1738 |                     "type": "string"
1739 |                 },
1740 |                 "target": {
1741 |                     "type": "string"
1742 |                 },
1743 |                 "mode": {
1744 |                     "type": "string"
1745 |                 },
1746 |                 "date": {
1747 |                     "type": "string"
1748 |                 }
1749 |             },
1750 |             "required": [
1751 |                 "target",
1752 |                 "date"
1753 |             ],
1754 |             "type": "object"
1755 |         },
1756 |         "_inputSchema": {
1757 |             "properties": {
1758 |                 "protocol": {
1759 |                     "description": "The protocol of your target.",
1760 |                     "type": "string",
1761 |                     "enum": [
1762 |                         "both",
1763 |                         "http",
1764 |                         "https"
1765 |                     ]
1766 |                 },
1767 |                 "target": {
1768 |                     "description": "The target of the search: a domain or a URL.",
1769 |                     "type": "string"
1770 |                 },
1771 |                 "mode": {
1772 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
1773 |                     "type": "string",
1774 |                     "enum": [
1775 |                         "exact",
1776 |                         "prefix",
1777 |                         "domain",
1778 |                         "subdomains"
1779 |                     ]
1780 |                 },
1781 |                 "date": {
1782 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
1783 |                     "type": "string",
1784 |                     "format": "date"
1785 |                 }
1786 |             },
1787 |             "required": [
1788 |                 "target",
1789 |                 "date"
1790 |             ],
1791 |             "type": "object"
1792 |         },
1793 |         "name": "site-explorer-backlinks-stats"
1794 |     },
1795 |     {
1796 |         "_original_method": "GET",
1797 |         "_original_parameters": [
1798 |             {
1799 |                 "in": "query",
1800 |                 "name": "protocol",
1801 |                 "required": false
1802 |             },
1803 |             {
1804 |                 "in": "query",
1805 |                 "name": "mode",
1806 |                 "required": false
1807 |             },
1808 |             {
1809 |                 "in": "query",
1810 |                 "name": "target",
1811 |                 "required": true
1812 |             },
1813 |             {
1814 |                 "in": "query",
1815 |                 "name": "output",
1816 |                 "required": false
1817 |             }
1818 |         ],
1819 |         "_original_path": "site-explorer/outlinks-stats",
1820 |         "_original_request_body": null,
1821 |         "description": "Retrieves statistical data about the outbound links (outlinks) from a specified URL, domain, or site section. Use doc tool first to get the real input schema.",
1822 |         "inputSchema": {
1823 |             "properties": {
1824 |                 "protocol": {
1825 |                     "type": "string"
1826 |                 },
1827 |                 "mode": {
1828 |                     "type": "string"
1829 |                 },
1830 |                 "target": {
1831 |                     "type": "string"
1832 |                 }
1833 |             },
1834 |             "required": [
1835 |                 "target"
1836 |             ],
1837 |             "type": "object"
1838 |         },
1839 |         "_inputSchema": {
1840 |             "properties": {
1841 |                 "protocol": {
1842 |                     "description": "The protocol of your target.",
1843 |                     "type": "string",
1844 |                     "enum": [
1845 |                         "both",
1846 |                         "http",
1847 |                         "https"
1848 |                     ]
1849 |                 },
1850 |                 "mode": {
1851 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
1852 |                     "type": "string",
1853 |                     "enum": [
1854 |                         "exact",
1855 |                         "prefix",
1856 |                         "domain",
1857 |                         "subdomains"
1858 |                     ]
1859 |                 },
1860 |                 "target": {
1861 |                     "description": "The target of the search: a domain or a URL.",
1862 |                     "type": "string"
1863 |                 }
1864 |             },
1865 |             "required": [
1866 |                 "target"
1867 |             ],
1868 |             "type": "object"
1869 |         },
1870 |         "name": "site-explorer-outlinks-stats"
1871 |     },
1872 |     {
1873 |         "_original_method": "GET",
1874 |         "_original_parameters": [
1875 |             {
1876 |                 "in": "query",
1877 |                 "name": "volume_mode",
1878 |                 "required": false
1879 |             },
1880 |             {
1881 |                 "in": "query",
1882 |                 "name": "country",
1883 |                 "required": false
1884 |             },
1885 |             {
1886 |                 "in": "query",
1887 |                 "name": "protocol",
1888 |                 "required": false
1889 |             },
1890 |             {
1891 |                 "in": "query",
1892 |                 "name": "target",
1893 |                 "required": true
1894 |             },
1895 |             {
1896 |                 "in": "query",
1897 |                 "name": "mode",
1898 |                 "required": false
1899 |             },
1900 |             {
1901 |                 "in": "query",
1902 |                 "name": "date",
1903 |                 "required": true
1904 |             },
1905 |             {
1906 |                 "in": "query",
1907 |                 "name": "output",
1908 |                 "required": false
1909 |             }
1910 |         ],
1911 |         "_original_path": "site-explorer/metrics",
1912 |         "_original_request_body": null,
1913 |         "description": "Provides SEO performance metrics for a specified domain, URL, or site section as of a given date, with options to customize search scope, protocol, country, and search volume mode. Use doc tool first to get the real input schema.",
1914 |         "inputSchema": {
1915 |             "properties": {
1916 |                 "volume_mode": {
1917 |                     "type": "string"
1918 |                 },
1919 |                 "country": {
1920 |                     "type": "string"
1921 |                 },
1922 |                 "protocol": {
1923 |                     "type": "string"
1924 |                 },
1925 |                 "target": {
1926 |                     "type": "string"
1927 |                 },
1928 |                 "mode": {
1929 |                     "type": "string"
1930 |                 },
1931 |                 "date": {
1932 |                     "type": "string"
1933 |                 }
1934 |             },
1935 |             "required": [
1936 |                 "target",
1937 |                 "date"
1938 |             ],
1939 |             "type": "object"
1940 |         },
1941 |         "_inputSchema": {
1942 |             "properties": {
1943 |                 "volume_mode": {
1944 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
1945 |                     "type": "string",
1946 |                     "enum": [
1947 |                         "monthly",
1948 |                         "average"
1949 |                     ]
1950 |                 },
1951 |                 "country": {
1952 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
1953 |                     "type": "string"
1954 |                 },
1955 |                 "protocol": {
1956 |                     "description": "The protocol of your target.",
1957 |                     "type": "string",
1958 |                     "enum": [
1959 |                         "both",
1960 |                         "http",
1961 |                         "https"
1962 |                     ]
1963 |                 },
1964 |                 "target": {
1965 |                     "description": "The target of the search: a domain or a URL.",
1966 |                     "type": "string"
1967 |                 },
1968 |                 "mode": {
1969 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
1970 |                     "type": "string",
1971 |                     "enum": [
1972 |                         "exact",
1973 |                         "prefix",
1974 |                         "domain",
1975 |                         "subdomains"
1976 |                     ]
1977 |                 },
1978 |                 "date": {
1979 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
1980 |                     "type": "string",
1981 |                     "format": "date"
1982 |                 }
1983 |             },
1984 |             "required": [
1985 |                 "target",
1986 |                 "date"
1987 |             ],
1988 |             "type": "object"
1989 |         },
1990 |         "name": "site-explorer-metrics"
1991 |     },
1992 |     {
1993 |         "_original_method": "GET",
1994 |         "_original_parameters": [
1995 |             {
1996 |                 "in": "query",
1997 |                 "name": "history_grouping",
1998 |                 "required": false
1999 |             },
2000 |             {
2001 |                 "in": "query",
2002 |                 "name": "date_to",
2003 |                 "required": false
2004 |             },
2005 |             {
2006 |                 "in": "query",
2007 |                 "name": "date_from",
2008 |                 "required": true
2009 |             },
2010 |             {
2011 |                 "in": "query",
2012 |                 "name": "protocol",
2013 |                 "required": false
2014 |             },
2015 |             {
2016 |                 "in": "query",
2017 |                 "name": "target",
2018 |                 "required": true
2019 |             },
2020 |             {
2021 |                 "in": "query",
2022 |                 "name": "mode",
2023 |                 "required": false
2024 |             },
2025 |             {
2026 |                 "in": "query",
2027 |                 "name": "output",
2028 |                 "required": false
2029 |             }
2030 |         ],
2031 |         "_original_path": "site-explorer/refdomains-history",
2032 |         "_original_request_body": null,
2033 |         "description": "Provides historical data on referring domains linking to a specified target (domain or URL) over a defined date range, with customizable grouping and analysis scope. Use doc tool first to get the real input schema.",
2034 |         "inputSchema": {
2035 |             "properties": {
2036 |                 "history_grouping": {
2037 |                     "type": "string"
2038 |                 },
2039 |                 "date_to": {
2040 |                     "type": "string"
2041 |                 },
2042 |                 "date_from": {
2043 |                     "type": "string"
2044 |                 },
2045 |                 "protocol": {
2046 |                     "type": "string"
2047 |                 },
2048 |                 "target": {
2049 |                     "type": "string"
2050 |                 },
2051 |                 "mode": {
2052 |                     "type": "string"
2053 |                 }
2054 |             },
2055 |             "required": [
2056 |                 "date_from",
2057 |                 "target"
2058 |             ],
2059 |             "type": "object"
2060 |         },
2061 |         "_inputSchema": {
2062 |             "properties": {
2063 |                 "history_grouping": {
2064 |                     "description": "The time interval used to group historical data.",
2065 |                     "type": "string",
2066 |                     "enum": [
2067 |                         "daily",
2068 |                         "weekly",
2069 |                         "monthly"
2070 |                     ]
2071 |                 },
2072 |                 "date_to": {
2073 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
2074 |                     "type": "string",
2075 |                     "format": "date"
2076 |                 },
2077 |                 "date_from": {
2078 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
2079 |                     "type": "string",
2080 |                     "format": "date"
2081 |                 },
2082 |                 "protocol": {
2083 |                     "description": "The protocol of your target.",
2084 |                     "type": "string",
2085 |                     "enum": [
2086 |                         "both",
2087 |                         "http",
2088 |                         "https"
2089 |                     ]
2090 |                 },
2091 |                 "target": {
2092 |                     "description": "The target of the search: a domain or a URL.",
2093 |                     "type": "string"
2094 |                 },
2095 |                 "mode": {
2096 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
2097 |                     "type": "string",
2098 |                     "enum": [
2099 |                         "exact",
2100 |                         "prefix",
2101 |                         "domain",
2102 |                         "subdomains"
2103 |                     ]
2104 |                 }
2105 |             },
2106 |             "required": [
2107 |                 "date_from",
2108 |                 "target"
2109 |             ],
2110 |             "type": "object"
2111 |         },
2112 |         "name": "site-explorer-refdomains-history"
2113 |     },
2114 |     {
2115 |         "_original_method": "GET",
2116 |         "_original_parameters": [
2117 |             {
2118 |                 "in": "query",
2119 |                 "name": "history_grouping",
2120 |                 "required": false
2121 |             },
2122 |             {
2123 |                 "in": "query",
2124 |                 "name": "date_to",
2125 |                 "required": false
2126 |             },
2127 |             {
2128 |                 "in": "query",
2129 |                 "name": "date_from",
2130 |                 "required": true
2131 |             },
2132 |             {
2133 |                 "in": "query",
2134 |                 "name": "target",
2135 |                 "required": true
2136 |             },
2137 |             {
2138 |                 "in": "query",
2139 |                 "name": "output",
2140 |                 "required": false
2141 |             }
2142 |         ],
2143 |         "_original_path": "site-explorer/domain-rating-history",
2144 |         "_original_request_body": null,
2145 |         "description": "Retrieves the historical domain rating data for a specified domain or URL over a defined date range and grouping interval. Use doc tool first to get the real input schema.",
2146 |         "inputSchema": {
2147 |             "properties": {
2148 |                 "history_grouping": {
2149 |                     "type": "string"
2150 |                 },
2151 |                 "date_to": {
2152 |                     "type": "string"
2153 |                 },
2154 |                 "date_from": {
2155 |                     "type": "string"
2156 |                 },
2157 |                 "target": {
2158 |                     "type": "string"
2159 |                 }
2160 |             },
2161 |             "required": [
2162 |                 "date_from",
2163 |                 "target"
2164 |             ],
2165 |             "type": "object"
2166 |         },
2167 |         "_inputSchema": {
2168 |             "properties": {
2169 |                 "history_grouping": {
2170 |                     "description": "The time interval used to group historical data.",
2171 |                     "type": "string",
2172 |                     "enum": [
2173 |                         "daily",
2174 |                         "weekly",
2175 |                         "monthly"
2176 |                     ]
2177 |                 },
2178 |                 "date_to": {
2179 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
2180 |                     "type": "string",
2181 |                     "format": "date"
2182 |                 },
2183 |                 "date_from": {
2184 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
2185 |                     "type": "string",
2186 |                     "format": "date"
2187 |                 },
2188 |                 "target": {
2189 |                     "description": "The target of the search: a domain or a URL.",
2190 |                     "type": "string"
2191 |                 }
2192 |             },
2193 |             "required": [
2194 |                 "date_from",
2195 |                 "target"
2196 |             ],
2197 |             "type": "object"
2198 |         },
2199 |         "name": "site-explorer-domain-rating-history"
2200 |     },
2201 |     {
2202 |         "_original_method": "GET",
2203 |         "_original_parameters": [
2204 |             {
2205 |                 "in": "query",
2206 |                 "name": "history_grouping",
2207 |                 "required": false
2208 |             },
2209 |             {
2210 |                 "in": "query",
2211 |                 "name": "date_to",
2212 |                 "required": false
2213 |             },
2214 |             {
2215 |                 "in": "query",
2216 |                 "name": "date_from",
2217 |                 "required": true
2218 |             },
2219 |             {
2220 |                 "in": "query",
2221 |                 "name": "target",
2222 |                 "required": true
2223 |             },
2224 |             {
2225 |                 "in": "query",
2226 |                 "name": "output",
2227 |                 "required": false
2228 |             }
2229 |         ],
2230 |         "_original_path": "site-explorer/url-rating-history",
2231 |         "_original_request_body": null,
2232 |         "description": "Retrieves the historical URL rating data for a specified domain or URL over a defined date range, grouped by a chosen time interval. Use doc tool first to get the real input schema.",
2233 |         "inputSchema": {
2234 |             "properties": {
2235 |                 "history_grouping": {
2236 |                     "type": "string"
2237 |                 },
2238 |                 "date_to": {
2239 |                     "type": "string"
2240 |                 },
2241 |                 "date_from": {
2242 |                     "type": "string"
2243 |                 },
2244 |                 "target": {
2245 |                     "type": "string"
2246 |                 }
2247 |             },
2248 |             "required": [
2249 |                 "date_from",
2250 |                 "target"
2251 |             ],
2252 |             "type": "object"
2253 |         },
2254 |         "_inputSchema": {
2255 |             "properties": {
2256 |                 "history_grouping": {
2257 |                     "description": "The time interval used to group historical data.",
2258 |                     "type": "string",
2259 |                     "enum": [
2260 |                         "daily",
2261 |                         "weekly",
2262 |                         "monthly"
2263 |                     ]
2264 |                 },
2265 |                 "date_to": {
2266 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
2267 |                     "type": "string",
2268 |                     "format": "date"
2269 |                 },
2270 |                 "date_from": {
2271 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
2272 |                     "type": "string",
2273 |                     "format": "date"
2274 |                 },
2275 |                 "target": {
2276 |                     "description": "The target of the search: a domain or a URL.",
2277 |                     "type": "string"
2278 |                 }
2279 |             },
2280 |             "required": [
2281 |                 "date_from",
2282 |                 "target"
2283 |             ],
2284 |             "type": "object"
2285 |         },
2286 |         "name": "site-explorer-url-rating-history"
2287 |     },
2288 |     {
2289 |         "_original_method": "GET",
2290 |         "_original_parameters": [
2291 |             {
2292 |                 "in": "query",
2293 |                 "name": "history_grouping",
2294 |                 "required": false
2295 |             },
2296 |             {
2297 |                 "in": "query",
2298 |                 "name": "date_to",
2299 |                 "required": false
2300 |             },
2301 |             {
2302 |                 "in": "query",
2303 |                 "name": "date_from",
2304 |                 "required": true
2305 |             },
2306 |             {
2307 |                 "in": "query",
2308 |                 "name": "country",
2309 |                 "required": false
2310 |             },
2311 |             {
2312 |                 "in": "query",
2313 |                 "name": "protocol",
2314 |                 "required": false
2315 |             },
2316 |             {
2317 |                 "in": "query",
2318 |                 "name": "target",
2319 |                 "required": true
2320 |             },
2321 |             {
2322 |                 "in": "query",
2323 |                 "name": "mode",
2324 |                 "required": false
2325 |             },
2326 |             {
2327 |                 "in": "query",
2328 |                 "name": "output",
2329 |                 "required": false
2330 |             }
2331 |         ],
2332 |         "_original_path": "site-explorer/pages-history",
2333 |         "_original_request_body": null,
2334 |         "description": "Retrieves historical data about pages from a specified domain, URL, or section of a site, grouped by a chosen time interval. Use doc tool first to get the real input schema.",
2335 |         "inputSchema": {
2336 |             "properties": {
2337 |                 "history_grouping": {
2338 |                     "type": "string"
2339 |                 },
2340 |                 "date_to": {
2341 |                     "type": "string"
2342 |                 },
2343 |                 "date_from": {
2344 |                     "type": "string"
2345 |                 },
2346 |                 "country": {
2347 |                     "type": "string"
2348 |                 },
2349 |                 "protocol": {
2350 |                     "type": "string"
2351 |                 },
2352 |                 "target": {
2353 |                     "type": "string"
2354 |                 },
2355 |                 "mode": {
2356 |                     "type": "string"
2357 |                 }
2358 |             },
2359 |             "required": [
2360 |                 "date_from",
2361 |                 "target"
2362 |             ],
2363 |             "type": "object"
2364 |         },
2365 |         "_inputSchema": {
2366 |             "properties": {
2367 |                 "history_grouping": {
2368 |                     "description": "The time interval used to group historical data.",
2369 |                     "type": "string",
2370 |                     "enum": [
2371 |                         "daily",
2372 |                         "weekly",
2373 |                         "monthly"
2374 |                     ]
2375 |                 },
2376 |                 "date_to": {
2377 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
2378 |                     "type": "string",
2379 |                     "format": "date"
2380 |                 },
2381 |                 "date_from": {
2382 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
2383 |                     "type": "string",
2384 |                     "format": "date"
2385 |                 },
2386 |                 "country": {
2387 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
2388 |                     "type": "string"
2389 |                 },
2390 |                 "protocol": {
2391 |                     "description": "The protocol of your target.",
2392 |                     "type": "string",
2393 |                     "enum": [
2394 |                         "both",
2395 |                         "http",
2396 |                         "https"
2397 |                     ]
2398 |                 },
2399 |                 "target": {
2400 |                     "description": "The target of the search: a domain or a URL.",
2401 |                     "type": "string"
2402 |                 },
2403 |                 "mode": {
2404 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
2405 |                     "type": "string",
2406 |                     "enum": [
2407 |                         "exact",
2408 |                         "prefix",
2409 |                         "domain",
2410 |                         "subdomains"
2411 |                     ]
2412 |                 }
2413 |             },
2414 |             "required": [
2415 |                 "date_from",
2416 |                 "target"
2417 |             ],
2418 |             "type": "object"
2419 |         },
2420 |         "name": "site-explorer-pages-history"
2421 |     },
2422 |     {
2423 |         "_original_method": "GET",
2424 |         "_original_parameters": [
2425 |             {
2426 |                 "in": "query",
2427 |                 "name": "select",
2428 |                 "required": false
2429 |             },
2430 |             {
2431 |                 "in": "query",
2432 |                 "name": "volume_mode",
2433 |                 "required": false
2434 |             },
2435 |             {
2436 |                 "in": "query",
2437 |                 "name": "history_grouping",
2438 |                 "required": false
2439 |             },
2440 |             {
2441 |                 "in": "query",
2442 |                 "name": "date_to",
2443 |                 "required": false
2444 |             },
2445 |             {
2446 |                 "in": "query",
2447 |                 "name": "date_from",
2448 |                 "required": true
2449 |             },
2450 |             {
2451 |                 "in": "query",
2452 |                 "name": "country",
2453 |                 "required": false
2454 |             },
2455 |             {
2456 |                 "in": "query",
2457 |                 "name": "protocol",
2458 |                 "required": false
2459 |             },
2460 |             {
2461 |                 "in": "query",
2462 |                 "name": "target",
2463 |                 "required": true
2464 |             },
2465 |             {
2466 |                 "in": "query",
2467 |                 "name": "mode",
2468 |                 "required": false
2469 |             },
2470 |             {
2471 |                 "in": "query",
2472 |                 "name": "output",
2473 |                 "required": false
2474 |             }
2475 |         ],
2476 |         "_original_path": "site-explorer/metrics-history",
2477 |         "_original_request_body": null,
2478 |         "description": "Retrieves historical data on key organic and paid search traffic and cost metrics for a specified domain, URL, or path over a selectable date range and grouping interval. Use doc tool first to get the real input schema.",
2479 |         "inputSchema": {
2480 |             "properties": {
2481 |                 "select": {
2482 |                     "type": "string"
2483 |                 },
2484 |                 "volume_mode": {
2485 |                     "type": "string"
2486 |                 },
2487 |                 "history_grouping": {
2488 |                     "type": "string"
2489 |                 },
2490 |                 "date_to": {
2491 |                     "type": "string"
2492 |                 },
2493 |                 "date_from": {
2494 |                     "type": "string"
2495 |                 },
2496 |                 "country": {
2497 |                     "type": "string"
2498 |                 },
2499 |                 "protocol": {
2500 |                     "type": "string"
2501 |                 },
2502 |                 "target": {
2503 |                     "type": "string"
2504 |                 },
2505 |                 "mode": {
2506 |                     "type": "string"
2507 |                 }
2508 |             },
2509 |             "required": [
2510 |                 "date_from",
2511 |                 "target"
2512 |             ],
2513 |             "type": "object"
2514 |         },
2515 |         "_inputSchema": {
2516 |             "properties": {
2517 |                 "select": {
2518 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c\n\nResponse schema:**date**  \ntype: string<date>  \n\n**org_cost**: (10 units) The estimated cost of your target's monthly organic search traffic, in USD cents.  \ntype: integer  \n\n**org_traffic**: (10 units) The estimated number of monthly visitors that your target gets from organic search.  \ntype: integer  \n\n**paid_cost**: (10 units) The estimated cost of your target's monthly paid search traffic, in USD cents.  \ntype: integer  \n\n**paid_traffic**: (10 units) The estimated number of monthly visitors that your target gets from paid search.  \ntype: integer  \n\n",
2519 |                     "type": "string"
2520 |                 },
2521 |                 "volume_mode": {
2522 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
2523 |                     "type": "string",
2524 |                     "enum": [
2525 |                         "monthly",
2526 |                         "average"
2527 |                     ]
2528 |                 },
2529 |                 "history_grouping": {
2530 |                     "description": "The time interval used to group historical data.",
2531 |                     "type": "string",
2532 |                     "enum": [
2533 |                         "daily",
2534 |                         "weekly",
2535 |                         "monthly"
2536 |                     ]
2537 |                 },
2538 |                 "date_to": {
2539 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
2540 |                     "type": "string",
2541 |                     "format": "date"
2542 |                 },
2543 |                 "date_from": {
2544 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
2545 |                     "type": "string",
2546 |                     "format": "date"
2547 |                 },
2548 |                 "country": {
2549 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
2550 |                     "type": "string"
2551 |                 },
2552 |                 "protocol": {
2553 |                     "description": "The protocol of your target.",
2554 |                     "type": "string",
2555 |                     "enum": [
2556 |                         "both",
2557 |                         "http",
2558 |                         "https"
2559 |                     ]
2560 |                 },
2561 |                 "target": {
2562 |                     "description": "The target of the search: a domain or a URL.",
2563 |                     "type": "string"
2564 |                 },
2565 |                 "mode": {
2566 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
2567 |                     "type": "string",
2568 |                     "enum": [
2569 |                         "exact",
2570 |                         "prefix",
2571 |                         "domain",
2572 |                         "subdomains"
2573 |                     ]
2574 |                 }
2575 |             },
2576 |             "required": [
2577 |                 "date_from",
2578 |                 "target"
2579 |             ],
2580 |             "type": "object"
2581 |         },
2582 |         "name": "site-explorer-metrics-history"
2583 |     },
2584 |     {
2585 |         "_original_method": "GET",
2586 |         "_original_parameters": [
2587 |             {
2588 |                 "in": "query",
2589 |                 "name": "select",
2590 |                 "required": false
2591 |             },
2592 |             {
2593 |                 "in": "query",
2594 |                 "name": "history_grouping",
2595 |                 "required": false
2596 |             },
2597 |             {
2598 |                 "in": "query",
2599 |                 "name": "date_to",
2600 |                 "required": false
2601 |             },
2602 |             {
2603 |                 "in": "query",
2604 |                 "name": "date_from",
2605 |                 "required": true
2606 |             },
2607 |             {
2608 |                 "in": "query",
2609 |                 "name": "country",
2610 |                 "required": false
2611 |             },
2612 |             {
2613 |                 "in": "query",
2614 |                 "name": "protocol",
2615 |                 "required": false
2616 |             },
2617 |             {
2618 |                 "in": "query",
2619 |                 "name": "target",
2620 |                 "required": true
2621 |             },
2622 |             {
2623 |                 "in": "query",
2624 |                 "name": "mode",
2625 |                 "required": false
2626 |             },
2627 |             {
2628 |                 "in": "query",
2629 |                 "name": "output",
2630 |                 "required": false
2631 |             }
2632 |         ],
2633 |         "_original_path": "site-explorer/keywords-history",
2634 |         "_original_request_body": null,
2635 |         "description": "Retrieves historical data on the number of organic keywords a specified website or URL has ranked for, segmented by various search position ranges and grouped by a chosen time interval. Use doc tool first to get the real input schema.",
2636 |         "inputSchema": {
2637 |             "properties": {
2638 |                 "select": {
2639 |                     "type": "string"
2640 |                 },
2641 |                 "history_grouping": {
2642 |                     "type": "string"
2643 |                 },
2644 |                 "date_to": {
2645 |                     "type": "string"
2646 |                 },
2647 |                 "date_from": {
2648 |                     "type": "string"
2649 |                 },
2650 |                 "country": {
2651 |                     "type": "string"
2652 |                 },
2653 |                 "protocol": {
2654 |                     "type": "string"
2655 |                 },
2656 |                 "target": {
2657 |                     "type": "string"
2658 |                 },
2659 |                 "mode": {
2660 |                     "type": "string"
2661 |                 }
2662 |             },
2663 |             "required": [
2664 |                 "date_from",
2665 |                 "target"
2666 |             ],
2667 |             "type": "object"
2668 |         },
2669 |         "_inputSchema": {
2670 |             "properties": {
2671 |                 "select": {
2672 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c\n\nResponse schema:**date**  \ntype: string<date>  \n\n**top11_20**: The total number of keywords that your target ranks for in the top 11-20 organic search results.  \ntype: integer  \n\n**top11_plus**: The total number of keywords that your target ranks for in the top 11+ organic search results.  \ntype: integer  \n\n**top21_50**: The total number of keywords that your target ranks for in the top 21-50 organic search results.  \ntype: integer  \n\n**top3**: The total number of keywords that your target ranks for in the top 3 organic search results.  \ntype: integer  \n\n**top4_10**: The total number of keywords that your target ranks for in the top 4-10 organic search results.  \ntype: integer  \n\n**top51_plus**: The total number of keywords that your target ranks for in the top 51+ organic search results.  \ntype: integer  \n\n",
2673 |                     "type": "string"
2674 |                 },
2675 |                 "history_grouping": {
2676 |                     "description": "The time interval used to group historical data.",
2677 |                     "type": "string",
2678 |                     "enum": [
2679 |                         "daily",
2680 |                         "weekly",
2681 |                         "monthly"
2682 |                     ]
2683 |                 },
2684 |                 "date_to": {
2685 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
2686 |                     "type": "string",
2687 |                     "format": "date"
2688 |                 },
2689 |                 "date_from": {
2690 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
2691 |                     "type": "string",
2692 |                     "format": "date"
2693 |                 },
2694 |                 "country": {
2695 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
2696 |                     "type": "string"
2697 |                 },
2698 |                 "protocol": {
2699 |                     "description": "The protocol of your target.",
2700 |                     "type": "string",
2701 |                     "enum": [
2702 |                         "both",
2703 |                         "http",
2704 |                         "https"
2705 |                     ]
2706 |                 },
2707 |                 "target": {
2708 |                     "description": "The target of the search: a domain or a URL.",
2709 |                     "type": "string"
2710 |                 },
2711 |                 "mode": {
2712 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
2713 |                     "type": "string",
2714 |                     "enum": [
2715 |                         "exact",
2716 |                         "prefix",
2717 |                         "domain",
2718 |                         "subdomains"
2719 |                     ]
2720 |                 }
2721 |             },
2722 |             "required": [
2723 |                 "date_from",
2724 |                 "target"
2725 |             ],
2726 |             "type": "object"
2727 |         },
2728 |         "name": "site-explorer-keywords-history"
2729 |     },
2730 |     {
2731 |         "_original_method": "GET",
2732 |         "_original_parameters": [
2733 |             {
2734 |                 "in": "query",
2735 |                 "name": "select",
2736 |                 "required": false
2737 |             },
2738 |             {
2739 |                 "in": "query",
2740 |                 "name": "volume_mode",
2741 |                 "required": false
2742 |             },
2743 |             {
2744 |                 "in": "query",
2745 |                 "name": "protocol",
2746 |                 "required": false
2747 |             },
2748 |             {
2749 |                 "in": "query",
2750 |                 "name": "target",
2751 |                 "required": true
2752 |             },
2753 |             {
2754 |                 "in": "query",
2755 |                 "name": "mode",
2756 |                 "required": false
2757 |             },
2758 |             {
2759 |                 "in": "query",
2760 |                 "name": "date",
2761 |                 "required": true
2762 |             },
2763 |             {
2764 |                 "in": "query",
2765 |                 "name": "output",
2766 |                 "required": false
2767 |             }
2768 |         ],
2769 |         "_original_path": "site-explorer/metrics-by-country",
2770 |         "_original_request_body": null,
2771 |         "description": "Provides organic and paid search performance metrics for a specified website, broken down by country, for a specific date. Use doc tool first to get the real input schema.",
2772 |         "inputSchema": {
2773 |             "properties": {
2774 |                 "select": {
2775 |                     "type": "string"
2776 |                 },
2777 |                 "volume_mode": {
2778 |                     "type": "string"
2779 |                 },
2780 |                 "protocol": {
2781 |                     "type": "string"
2782 |                 },
2783 |                 "target": {
2784 |                     "type": "string"
2785 |                 },
2786 |                 "mode": {
2787 |                     "type": "string"
2788 |                 },
2789 |                 "date": {
2790 |                     "type": "string"
2791 |                 }
2792 |             },
2793 |             "required": [
2794 |                 "target",
2795 |                 "date"
2796 |             ],
2797 |             "type": "object"
2798 |         },
2799 |         "_inputSchema": {
2800 |             "properties": {
2801 |                 "select": {
2802 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c\n\nResponse schema:**country**  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**org_cost**: (10 units) The estimated value of your target's monthly organic search traffic, in USD cents.  \ntype: integer nullable  \n\n**org_keywords**: The total number of keywords that your target ranks for in the top 100 organic search results.  \ntype: integer  \n\n**org_keywords_1_3**: The total number of keywords that your target ranks for in the top 3 organic search results.  \ntype: integer  \n\n**org_traffic**: (10 units) The estimated number of monthly visitors that your target gets from organic search.  \ntype: integer  \n\n**paid_cost**: (10 units) The estimated cost of your target's monthly paid search traffic, in USD cents.  \ntype: integer nullable  \n\n**paid_keywords**: The total number of keywords that your target ranks for in paid search results.  \ntype: integer  \n\n**paid_pages**: The total number of pages from a target ranking in the top 100 paid search results.  \ntype: integer  \n\n**paid_traffic**: (10 units) The estimated number of monthly visitors that your target gets from paid search.  \ntype: integer  \n\n",
2803 |                     "type": "string"
2804 |                 },
2805 |                 "volume_mode": {
2806 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
2807 |                     "type": "string",
2808 |                     "enum": [
2809 |                         "monthly",
2810 |                         "average"
2811 |                     ]
2812 |                 },
2813 |                 "protocol": {
2814 |                     "description": "The protocol of your target.",
2815 |                     "type": "string",
2816 |                     "enum": [
2817 |                         "both",
2818 |                         "http",
2819 |                         "https"
2820 |                     ]
2821 |                 },
2822 |                 "target": {
2823 |                     "description": "The target of the search: a domain or a URL.",
2824 |                     "type": "string"
2825 |                 },
2826 |                 "mode": {
2827 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
2828 |                     "type": "string",
2829 |                     "enum": [
2830 |                         "exact",
2831 |                         "prefix",
2832 |                         "domain",
2833 |                         "subdomains"
2834 |                     ]
2835 |                 },
2836 |                 "date": {
2837 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
2838 |                     "type": "string",
2839 |                     "format": "date"
2840 |                 }
2841 |             },
2842 |             "required": [
2843 |                 "target",
2844 |                 "date"
2845 |             ],
2846 |             "type": "object"
2847 |         },
2848 |         "name": "site-explorer-metrics-by-country"
2849 |     },
2850 |     {
2851 |         "_original_method": "GET",
2852 |         "_original_parameters": [
2853 |             {
2854 |                 "in": "query",
2855 |                 "name": "volume_mode",
2856 |                 "required": false
2857 |             },
2858 |             {
2859 |                 "in": "query",
2860 |                 "name": "country",
2861 |                 "required": false
2862 |             },
2863 |             {
2864 |                 "in": "query",
2865 |                 "name": "protocol",
2866 |                 "required": false
2867 |             },
2868 |             {
2869 |                 "in": "query",
2870 |                 "name": "target",
2871 |                 "required": true
2872 |             },
2873 |             {
2874 |                 "in": "query",
2875 |                 "name": "mode",
2876 |                 "required": false
2877 |             },
2878 |             {
2879 |                 "in": "query",
2880 |                 "name": "output",
2881 |                 "required": false
2882 |             }
2883 |         ],
2884 |         "_original_path": "site-explorer/pages-by-traffic",
2885 |         "_original_request_body": null,
2886 |         "description": "Retrieves pages from a specified domain, subdomain, path, or exact URL, ranked by their estimated organic search traffic for a selected country and protocol. Use doc tool first to get the real input schema.",
2887 |         "inputSchema": {
2888 |             "properties": {
2889 |                 "volume_mode": {
2890 |                     "type": "string"
2891 |                 },
2892 |                 "country": {
2893 |                     "type": "string"
2894 |                 },
2895 |                 "protocol": {
2896 |                     "type": "string"
2897 |                 },
2898 |                 "target": {
2899 |                     "type": "string"
2900 |                 },
2901 |                 "mode": {
2902 |                     "type": "string"
2903 |                 }
2904 |             },
2905 |             "required": [
2906 |                 "target"
2907 |             ],
2908 |             "type": "object"
2909 |         },
2910 |         "_inputSchema": {
2911 |             "properties": {
2912 |                 "volume_mode": {
2913 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
2914 |                     "type": "string",
2915 |                     "enum": [
2916 |                         "monthly",
2917 |                         "average"
2918 |                     ]
2919 |                 },
2920 |                 "country": {
2921 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
2922 |                     "type": "string"
2923 |                 },
2924 |                 "protocol": {
2925 |                     "description": "The protocol of your target.",
2926 |                     "type": "string",
2927 |                     "enum": [
2928 |                         "both",
2929 |                         "http",
2930 |                         "https"
2931 |                     ]
2932 |                 },
2933 |                 "target": {
2934 |                     "description": "The target of the search: a domain or a URL.",
2935 |                     "type": "string"
2936 |                 },
2937 |                 "mode": {
2938 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
2939 |                     "type": "string",
2940 |                     "enum": [
2941 |                         "exact",
2942 |                         "prefix",
2943 |                         "domain",
2944 |                         "subdomains"
2945 |                     ]
2946 |                 }
2947 |             },
2948 |             "required": [
2949 |                 "target"
2950 |             ],
2951 |             "type": "object"
2952 |         },
2953 |         "name": "site-explorer-pages-by-traffic"
2954 |     },
2955 |     {
2956 |         "_original_method": "GET",
2957 |         "_original_parameters": [
2958 |             {
2959 |                 "in": "query",
2960 |                 "name": "timeout",
2961 |                 "required": false
2962 |             },
2963 |             {
2964 |                 "in": "query",
2965 |                 "name": "offset",
2966 |                 "required": false
2967 |             },
2968 |             {
2969 |                 "in": "query",
2970 |                 "name": "limit",
2971 |                 "required": false
2972 |             },
2973 |             {
2974 |                 "in": "query",
2975 |                 "name": "order_by",
2976 |                 "required": false
2977 |             },
2978 |             {
2979 |                 "in": "query",
2980 |                 "name": "where",
2981 |                 "required": false
2982 |             },
2983 |             {
2984 |                 "in": "query",
2985 |                 "name": "select",
2986 |                 "required": true
2987 |             },
2988 |             {
2989 |                 "in": "query",
2990 |                 "name": "protocol",
2991 |                 "required": false
2992 |             },
2993 |             {
2994 |                 "in": "query",
2995 |                 "name": "target",
2996 |                 "required": true
2997 |             },
2998 |             {
2999 |                 "in": "query",
3000 |                 "name": "mode",
3001 |                 "required": false
3002 |             },
3003 |             {
3004 |                 "in": "query",
3005 |                 "name": "aggregation",
3006 |                 "required": false
3007 |             },
3008 |             {
3009 |                 "in": "query",
3010 |                 "name": "history",
3011 |                 "required": false
3012 |             },
3013 |             {
3014 |                 "in": "query",
3015 |                 "name": "output",
3016 |                 "required": false
3017 |             }
3018 |         ],
3019 |         "_original_path": "site-explorer/all-backlinks",
3020 |         "_original_request_body": null,
3021 |         "description": "Retrieves detailed information about all backlinks pointing to a specified URL or domain, with extensive filtering, sorting, selection, and aggregation options. Use doc tool first to get the real input schema.",
3022 |         "inputSchema": {
3023 |             "properties": {
3024 |                 "timeout": {
3025 |                     "type": "integer"
3026 |                 },
3027 |                 "limit": {
3028 |                     "type": "integer"
3029 |                 },
3030 |                 "order_by": {
3031 |                     "type": "string"
3032 |                 },
3033 |                 "where": {
3034 |                     "type": "string"
3035 |                 },
3036 |                 "select": {
3037 |                     "type": "string"
3038 |                 },
3039 |                 "protocol": {
3040 |                     "type": "string"
3041 |                 },
3042 |                 "target": {
3043 |                     "type": "string"
3044 |                 },
3045 |                 "mode": {
3046 |                     "type": "string"
3047 |                 },
3048 |                 "aggregation": {
3049 |                     "type": "string"
3050 |                 },
3051 |                 "history": {
3052 |                     "type": "string"
3053 |                 }
3054 |             },
3055 |             "required": [
3056 |                 "select",
3057 |                 "target"
3058 |             ],
3059 |             "type": "object"
3060 |         },
3061 |         "_inputSchema": {
3062 |             "properties": {
3063 |                 "timeout": {
3064 |                     "description": "A manual timeout duration in seconds.",
3065 |                     "type": "integer"
3066 |                 },
3067 |                 "limit": {
3068 |                     "description": "The number of results to return.",
3069 |                     "type": "integer"
3070 |                 },
3071 |                 "order_by": {
3072 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**ahrefs_rank_source**: The strength of the referring domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer  \n\n**ahrefs_rank_target**: The strength of the target domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer  \n\n**alt**: The alt attribute of the link.  \ntype: string nullable  \n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string  \n\n**broken_redirect_new_target**: The new destination of a modified redirect.  \ntype: string nullable  \n\n**broken_redirect_reason**: The reason the redirect was considered broken during the last crawl.  \ntype: string nullable  \nenum: `\"droppedmanual\"` `\"droppedtooold\"` `\"dropped\"` `\"codechanged\"` `\"nxdomain\"` `\"robotsdisallowed\"` `\"curlerror\"` `\"invalidtarget\"` `\"nomorecanonical\"` `\"isnowparked\"` `\"targetchanged\"`  \n\n**broken_redirect_source**: The redirecting URL that was modified, causing the redirect to become broken.  \ntype: string nullable  \n\n**class_c**: (5 units) The number of unique class_c subnets linking to the referring page.  \ntype: integer  \n\n**discovered_status**: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.  \ntype: string nullable  \nenum: `\"pagefound\"` `\"linkfound\"` `\"linkrestored\"`  \n\n**domain_rating_source**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**domain_rating_target**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**drop_reason**: The reason we removed the link from our index.  \ntype: string nullable  \nenum: `\"manual\"` `\"noratingunused\"` `\"notop\"` `\"tooold\"` `\"oldunavailable\"` `\"rescursive\"` `\"duplicate\"` `\"nxdomain\"` `\"malformed\"` `\"blockedport\"` `\"disallowed\"` `\"unlinked\"`  \n\n**encoding**: The character set encoding of the referring page HTML.  \ntype: string  \n\n**first_seen**: The date the referring page URL was first discovered.  \ntype: string<date-time>  \n\n**first_seen_link**: The date we first found a backlink to your target on a given referring page.  \ntype: string<date-time>  \n\n**http_code**: The return code from HTTP protocol returned during the referring page crawl.  \ntype: integer  \n\n**http_crawl**: The link was discovered without executing javascript and rendering the page.  \ntype: boolean  \n\n**ip_source**: The referring domain IP address.  \ntype: string nullable  \n\n**is_alternate**: The link with the rel=“alternate” attribute.  \ntype: boolean  \n\n**is_canonical**: The link with the rel=“canonical” attribute.  \ntype: boolean  \n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean  \n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean  \n\n**is_form**: The link was found in a form HTML tag.  \ntype: boolean  \n\n**is_frame**: The link was found in an iframe HTML tag.  \ntype: boolean  \n\n**is_image**: The link is a regular link that has an image inside their href attribute.  \ntype: boolean  \n\n**is_lost**: The link currently does not exist anymore.  \ntype: boolean  \n\n**is_new**: The link was discovered on the last crawl.  \ntype: boolean  \n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean  \n\n**is_redirect**: The link pointing to your target via a redirect.  \ntype: boolean  \n\n**is_redirect_lost**: The redirected link currently does not exist anymore.  \ntype: boolean  \n\n**is_root_source**: The referring domain name is a root domain name.  \ntype: boolean  \n\n**is_root_target**: The target domain name is a root domain name.  \ntype: boolean  \n\n**is_rss**: The link was found in an RSS feed.  \ntype: boolean  \n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean  \n\n**is_text**: The link is a standard href hyperlink.  \ntype: boolean  \n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean  \n\n**js_crawl**: The link was discovered after executing javascript and rendering the page.  \ntype: boolean  \n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array[string]  \n\n**last_seen**: The date we discovered that the link was lost.  \ntype: string<date-time> nullable  \n\n**last_visited**: The date we last verified a live link to your target page.  \ntype: string<date-time>  \n\n**link_group_count**: The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation 'all'.  \ntype: integer  \n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`  \n\n**linked_domains_source_domain**: The number of unique root domains linked from the referring domain.  \ntype: integer  \n\n**linked_domains_source_page**: The number of unique root domains linked from the referring page.  \ntype: integer  \n\n**linked_domains_target_domain**: The number of unique root domains linked from the target domain.  \ntype: integer  \n\n**links_external**: The number of external links from the referring page.  \ntype: integer  \n\n**links_internal**: The number of internal links from the referring page.  \ntype: integer  \n\n**lost_reason**: The reason the link was lost during the last crawl.  \ntype: string nullable  \nenum: `\"removedfromhtml\"` `\"notcanonical\"` `\"noindex\"` `\"pageredirected\"` `\"pageerror\"` `\"lostredirect\"` `\"notfound\"`  \n\n**name_source**: The complete referring domain name, including subdomains.  \ntype: string  \n\n**name_target**: The complete target domain name, including subdomains.  \ntype: string  \n\n**noindex**: The referring page has the noindex meta attribute.  \ntype: boolean  \n\n**page_size**: The size in bytes of the referring page content.  \ntype: integer  \n\n**port_source**: The network port of the referring page URL.  \ntype: integer  \n\n**port_target**: The network port of the target page URL.  \ntype: integer  \n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer  \n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array[string]  \n\n**redirect_code**: The HTTP status code of a referring page pointing to your target via a redirect.  \ntype: integer nullable  \n\n**redirect_kind**: The HTTP status codes returned by the target redirecting URL or redirect chain.  \ntype: array[integer]  \n\n**refdomains_source**: (5 units) The number of unique referring domains linking to the referring page.  \ntype: integer  \n\n**refdomains_source_domain**: (5 units) The number of unique referring domains linking to the referring domain.  \ntype: integer  \n\n**refdomains_target_domain**: (5 units) The number of unique referring domains linking to the target domain.  \ntype: integer  \n\n**root_name_source**: The root domain name of the referring domain, not including subdomains.  \ntype: string  \n\n**root_name_target**: The root domain name of the target domain, not including subdomains.  \ntype: string  \n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string  \n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string  \n\n**source_page_author**: The author of the referring page.  \ntype: string nullable  \n\n**source_page_publish_date**: the date we identified the page was published  \ntype: string<date> nullable  \n\n**title**: The html title of the referring page.  \ntype: string  \n\n**tld_class_source**: The top level domain class of the referring domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`  \n\n**tld_class_target**: The top level domain class of the target domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`  \n\n**traffic**: (10 units) The referring page's estimated monthly organic traffic from search.  \ntype: integer  \n\n**traffic_domain**: (10 units) The referring domain's estimated monthly organic traffic from search.  \ntype: integer  \n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string<url>  \n\n**url_from_plain**: The referring page URL optimized for use as a filter.  \ntype: string  \n\n**url_rating_source**: The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array[string<url>]  \n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array[string]  \n\n**url_to**: The URL the backlink points to.  \ntype: string<url>  \n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string  \n\n",
3073 |                     "type": "string"
3074 |                 },
3075 |                 "where": {
3076 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**ahrefs_rank_source**: The strength of the referring domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer\n\n**ahrefs_rank_target**: The strength of the target domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer\n\n**alt**: The alt attribute of the link.  \ntype: string nullable\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**broken_redirect_new_target**: The new destination of a modified redirect.  \ntype: string nullable\n\n**broken_redirect_reason**: The reason the redirect was considered broken during the last crawl.  \ntype: string nullable  \nenum: `\"droppedmanual\"` `\"droppedtooold\"` `\"dropped\"` `\"codechanged\"` `\"nxdomain\"` `\"robotsdisallowed\"` `\"curlerror\"` `\"invalidtarget\"` `\"nomorecanonical\"` `\"isnowparked\"` `\"targetchanged\"`\n\n**broken_redirect_source**: The redirecting URL that was modified, causing the redirect to become broken.  \ntype: string nullable\n\n**class_c** (5 units): The number of unique class_c subnets linking to the referring page.  \ntype: integer\n\n**discovered_status**: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.  \ntype: string nullable  \nenum: `\"pagefound\"` `\"linkfound\"` `\"linkrestored\"`\n\n**domain_rating_source**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**domain_rating_target**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**drop_reason**: The reason we removed the link from our index.  \ntype: string nullable  \nenum: `\"manual\"` `\"noratingunused\"` `\"notop\"` `\"tooold\"` `\"oldunavailable\"` `\"rescursive\"` `\"duplicate\"` `\"nxdomain\"` `\"malformed\"` `\"blockedport\"` `\"disallowed\"` `\"unlinked\"`\n\n**encoding**: The character set encoding of the referring page HTML.  \ntype: string\n\n**first_seen**: The date the referring page URL was first discovered.  \ntype: datetime\n\n**first_seen_link**: The date we first found a backlink to your target on a given referring page.  \ntype: datetime\n\n**http_code**: The return code from HTTP protocol returned during the referring page crawl.  \ntype: integer\n\n**http_crawl**: The link was discovered without executing javascript and rendering the page.  \ntype: boolean\n\n**ip_source**: The referring domain IP address.  \ntype: string nullable\n\n**is_alternate**: The link with the rel=“alternate” attribute.  \ntype: boolean\n\n**is_canonical**: The link with the rel=“canonical” attribute.  \ntype: boolean\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_form**: The link was found in a form HTML tag.  \ntype: boolean\n\n**is_frame**: The link was found in an iframe HTML tag.  \ntype: boolean\n\n**is_homepage_link**: The link was found on the homepage of a referring website.  \ntype: boolean\n\n**is_image**: The link is a regular link that has an image inside their href attribute.  \ntype: boolean\n\n**is_lost**: The link currently does not exist anymore.  \ntype: boolean\n\n**is_new**: The link was discovered on the last crawl.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_redirect**: The link pointing to your target via a redirect.  \ntype: boolean\n\n**is_redirect_lost**: The redirected link currently does not exist anymore.  \ntype: boolean\n\n**is_root_source**: The referring domain name is a root domain name.  \ntype: boolean\n\n**is_root_target**: The target domain name is a root domain name.  \ntype: boolean\n\n**is_rss**: The link was found in an RSS feed.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_text**: The link is a standard href hyperlink.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**js_crawl**: The link was discovered after executing javascript and rendering the page.  \ntype: boolean\n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**last_seen**: The date we discovered that the link was lost.  \ntype: datetime nullable\n\n**last_visited**: The date we last verified a live link to your target page.  \ntype: datetime\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_group_count**: The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation 'all'.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains_source_domain**: The number of unique root domains linked from the referring domain.  \ntype: integer\n\n**linked_domains_source_page**: The number of unique root domains linked from the referring page.  \ntype: integer\n\n**linked_domains_target_domain**: The number of unique root domains linked from the target domain.  \ntype: integer\n\n**links_external**: The number of external links from the referring page.  \ntype: integer\n\n**links_internal**: The number of internal links from the referring page.  \ntype: integer\n\n**lost_reason**: The reason the link was lost during the last crawl.  \ntype: string nullable  \nenum: `\"removedfromhtml\"` `\"notcanonical\"` `\"noindex\"` `\"pageredirected\"` `\"pageerror\"` `\"lostredirect\"` `\"notfound\"`\n\n**name_source**: The complete referring domain name, including subdomains.  \ntype: string\n\n**name_target**: The complete target domain name, including subdomains.  \ntype: string\n\n**noindex**: The referring page has the noindex meta attribute.  \ntype: boolean\n\n**page_size**: The size in bytes of the referring page content.  \ntype: integer\n\n**port_source**: The network port of the referring page URL.  \ntype: integer\n\n**port_target**: The network port of the target page URL.  \ntype: integer\n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**redirect_code**: The HTTP status code of a referring page pointing to your target via a redirect.  \ntype: integer nullable\n\n**redirect_kind**: The HTTP status codes returned by the target redirecting URL or redirect chain.  \ntype: array(integer)\n\n**refdomains_source** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**refdomains_source_domain** (5 units): The number of unique referring domains linking to the referring domain.  \ntype: integer\n\n**refdomains_target_domain** (5 units): The number of unique referring domains linking to the target domain.  \ntype: integer\n\n**root_name_source**: The root domain name of the referring domain, not including subdomains.  \ntype: string\n\n**root_name_target**: The root domain name of the target domain, not including subdomains.  \ntype: string\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**source_page_author**: The author of the referring page.  \ntype: string nullable\n\n**source_page_publish_date**: the date we identified the page was published  \ntype: date nullable\n\n**title**: The html title of the referring page.  \ntype: string\n\n**tld_class_source**: The top level domain class of the referring domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`\n\n**tld_class_target**: The top level domain class of the target domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`\n\n**traffic** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**traffic_domain** (10 units): The referring domain's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string\n\n**url_from_plain**: The referring page URL optimized for use as a filter.  \ntype: string\n\n**url_rating_source**: The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string\n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string",
3077 |                     "type": "string"
3078 |                 },
3079 |                 "select": {
3080 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
3081 |                     "type": "string"
3082 |                 },
3083 |                 "protocol": {
3084 |                     "description": "The protocol of your target.",
3085 |                     "type": "string",
3086 |                     "enum": [
3087 |                         "both",
3088 |                         "http",
3089 |                         "https"
3090 |                     ]
3091 |                 },
3092 |                 "target": {
3093 |                     "description": "The target of the search: a domain or a URL.",
3094 |                     "type": "string"
3095 |                 },
3096 |                 "mode": {
3097 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
3098 |                     "type": "string",
3099 |                     "enum": [
3100 |                         "exact",
3101 |                         "prefix",
3102 |                         "domain",
3103 |                         "subdomains"
3104 |                     ]
3105 |                 },
3106 |                 "aggregation": {
3107 |                     "description": "The backlinks grouping mode.",
3108 |                     "type": "string",
3109 |                     "enum": [
3110 |                         "similar_links",
3111 |                         "1_per_domain",
3112 |                         "all"
3113 |                     ]
3114 |                 },
3115 |                 "history": {
3116 |                     "description": "A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.",
3117 |                     "type": "string"
3118 |                 }
3119 |             },
3120 |             "required": [
3121 |                 "select",
3122 |                 "target"
3123 |             ],
3124 |             "type": "object"
3125 |         },
3126 |         "name": "site-explorer-all-backlinks"
3127 |     },
3128 |     {
3129 |         "_original_method": "GET",
3130 |         "_original_parameters": [
3131 |             {
3132 |                 "in": "query",
3133 |                 "name": "timeout",
3134 |                 "required": false
3135 |             },
3136 |             {
3137 |                 "in": "query",
3138 |                 "name": "offset",
3139 |                 "required": false
3140 |             },
3141 |             {
3142 |                 "in": "query",
3143 |                 "name": "limit",
3144 |                 "required": false
3145 |             },
3146 |             {
3147 |                 "in": "query",
3148 |                 "name": "order_by",
3149 |                 "required": false
3150 |             },
3151 |             {
3152 |                 "in": "query",
3153 |                 "name": "where",
3154 |                 "required": false
3155 |             },
3156 |             {
3157 |                 "in": "query",
3158 |                 "name": "select",
3159 |                 "required": true
3160 |             },
3161 |             {
3162 |                 "in": "query",
3163 |                 "name": "protocol",
3164 |                 "required": false
3165 |             },
3166 |             {
3167 |                 "in": "query",
3168 |                 "name": "target",
3169 |                 "required": true
3170 |             },
3171 |             {
3172 |                 "in": "query",
3173 |                 "name": "mode",
3174 |                 "required": false
3175 |             },
3176 |             {
3177 |                 "in": "query",
3178 |                 "name": "aggregation",
3179 |                 "required": false
3180 |             },
3181 |             {
3182 |                 "in": "query",
3183 |                 "name": "output",
3184 |                 "required": false
3185 |             }
3186 |         ],
3187 |         "_original_path": "site-explorer/broken-backlinks",
3188 |         "_original_request_body": null,
3189 |         "description": "Retrieves a list of broken backlinks (i.e., links pointing to non-functioning pages) for a specified domain or URL, with customizable filtering, field selection, and aggregation options. Use doc tool first to get the real input schema.",
3190 |         "inputSchema": {
3191 |             "properties": {
3192 |                 "timeout": {
3193 |                     "type": "integer"
3194 |                 },
3195 |                 "limit": {
3196 |                     "type": "integer"
3197 |                 },
3198 |                 "order_by": {
3199 |                     "type": "string"
3200 |                 },
3201 |                 "where": {
3202 |                     "type": "string"
3203 |                 },
3204 |                 "select": {
3205 |                     "type": "string"
3206 |                 },
3207 |                 "protocol": {
3208 |                     "type": "string"
3209 |                 },
3210 |                 "target": {
3211 |                     "type": "string"
3212 |                 },
3213 |                 "mode": {
3214 |                     "type": "string"
3215 |                 },
3216 |                 "aggregation": {
3217 |                     "type": "string"
3218 |                 }
3219 |             },
3220 |             "required": [
3221 |                 "select",
3222 |                 "target"
3223 |             ],
3224 |             "type": "object"
3225 |         },
3226 |         "_inputSchema": {
3227 |             "properties": {
3228 |                 "timeout": {
3229 |                     "description": "A manual timeout duration in seconds.",
3230 |                     "type": "integer"
3231 |                 },
3232 |                 "limit": {
3233 |                     "description": "The number of results to return.",
3234 |                     "type": "integer"
3235 |                 },
3236 |                 "order_by": {
3237 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**ahrefs_rank_source**: The strength of the referring domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer  \n\n**ahrefs_rank_target**: The strength of the target domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer  \n\n**alt**: The alt attribute of the link.  \ntype: string nullable  \n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string  \n\n**class_c**: (5 units) The number of unique class_c subnets linking to the referring page.  \ntype: integer  \n\n**domain_rating_source**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**domain_rating_target**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**encoding**: The character set encoding of the referring page HTML.  \ntype: string  \n\n**first_seen**: The date the referring page URL was first discovered.  \ntype: string<date-time>  \n\n**first_seen_link**: The date we first found a backlink to your target on a given referring page.  \ntype: string<date-time>  \n\n**http_code**: The return code from HTTP protocol returned during the referring page crawl.  \ntype: integer  \n\n**http_code_target**: The return code from HTTP protocol returned during the target page crawl.  \ntype: integer nullable  \n\n**http_crawl**: The link was discovered without executing javascript and rendering the page.  \ntype: boolean  \n\n**ip_source**: The referring domain IP address.  \ntype: string nullable  \n\n**is_alternate**: The link with the rel=“alternate” attribute.  \ntype: boolean  \n\n**is_canonical**: The link with the rel=“canonical” attribute.  \ntype: boolean  \n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean  \n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean  \n\n**is_form**: The link was found in a form HTML tag.  \ntype: boolean  \n\n**is_frame**: The link was found in an iframe HTML tag.  \ntype: boolean  \n\n**is_image**: The link is a regular link that has an image inside their href attribute.  \ntype: boolean  \n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean  \n\n**is_redirect**: The link pointing to your target via a redirect.  \ntype: boolean  \n\n**is_root_source**: The referring domain name is a root domain name.  \ntype: boolean  \n\n**is_root_target**: The target domain name is a root domain name.  \ntype: boolean  \n\n**is_rss**: The link was found in an RSS feed.  \ntype: boolean  \n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean  \n\n**is_text**: The link is a standard href hyperlink.  \ntype: boolean  \n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean  \n\n**js_crawl**: The link was discovered after executing javascript and rendering the page.  \ntype: boolean  \n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array[string]  \n\n**last_seen**: The date we discovered that the link was lost.  \ntype: string<date-time> nullable  \n\n**last_visited**: The date we last re-crawled the referring page to verify the backlink is alive.  \ntype: string<date-time>  \n\n**last_visited_target**: The date we last re-crawled the target page to verify that it is broken.  \ntype: string<date-time> nullable  \n\n**link_group_count**: The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation 'all'.  \ntype: integer  \n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`  \n\n**linked_domains_source_domain**: The number of unique root domains linked from the referring domain.  \ntype: integer  \n\n**linked_domains_source_page**: The number of unique root domains linked from the referring page.  \ntype: integer  \n\n**linked_domains_target_domain**: The number of unique root domains linked from the target domain.  \ntype: integer  \n\n**links_external**: The number of external links from the referring page.  \ntype: integer  \n\n**links_internal**: The number of internal links from the referring page.  \ntype: integer  \n\n**name_source**: The complete referring domain name, including subdomains.  \ntype: string  \n\n**name_target**: The complete target domain name, including subdomains.  \ntype: string  \n\n**page_size**: The size in bytes of the referring page content.  \ntype: integer  \n\n**port_source**: The network port of the referring page URL.  \ntype: integer  \n\n**port_target**: The network port of the target page URL.  \ntype: integer  \n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer  \n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array[string]  \n\n**redirect_code**: The HTTP status code of a referring page pointing to your target via a redirect.  \ntype: integer nullable  \n\n**redirect_kind**: The HTTP status codes returned by the target redirecting URL or redirect chain.  \ntype: array[integer]  \n\n**refdomains_source**: (5 units) The number of unique referring domains linking to the referring page.  \ntype: integer  \n\n**refdomains_source_domain**: (5 units) The number of unique referring domains linking to the referring domain.  \ntype: integer  \n\n**refdomains_target_domain**: (5 units) The number of unique referring domains linking to the target domain.  \ntype: integer  \n\n**root_name_source**: The root domain name of the referring domain, not including subdomains.  \ntype: string  \n\n**root_name_target**: The root domain name of the target domain, not including subdomains.  \ntype: string  \n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string  \n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string  \n\n**source_page_author**: The author of the referring page.  \ntype: string nullable  \n\n**title**: The html title of the referring page.  \ntype: string  \n\n**tld_class_source**: The top level domain class of the referring domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`  \n\n**tld_class_target**: The top level domain class of the target domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`  \n\n**traffic**: (10 units) The referring page's estimated monthly organic traffic from search.  \ntype: integer  \n\n**traffic_domain**: (10 units) The referring domain's estimated monthly organic traffic from search.  \ntype: integer  \n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string<url>  \n\n**url_from_plain**: The referring page URL optimized for use as a filter.  \ntype: string  \n\n**url_rating_source**: The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array[string<url>]  \n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array[string]  \n\n**url_to**: The URL the backlink points to.  \ntype: string<url>  \n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string  \n\n",
3238 |                     "type": "string"
3239 |                 },
3240 |                 "where": {
3241 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**ahrefs_rank_source**: The strength of the referring domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer\n\n**ahrefs_rank_target**: The strength of the target domain's backlink profile compared to the other websites in our database, with rank #1 being the strongest.  \ntype: integer\n\n**alt**: The alt attribute of the link.  \ntype: string nullable\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**class_c** (5 units): The number of unique class_c subnets linking to the referring page.  \ntype: integer\n\n**domain_rating_source**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**domain_rating_target**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**encoding**: The character set encoding of the referring page HTML.  \ntype: string\n\n**first_seen**: The date the referring page URL was first discovered.  \ntype: datetime\n\n**first_seen_link**: The date we first found a backlink to your target on a given referring page.  \ntype: datetime\n\n**http_code**: The return code from HTTP protocol returned during the referring page crawl.  \ntype: integer\n\n**http_code_target**: The return code from HTTP protocol returned during the target page crawl.  \ntype: integer nullable\n\n**http_crawl**: The link was discovered without executing javascript and rendering the page.  \ntype: boolean\n\n**ip_source**: The referring domain IP address.  \ntype: string nullable\n\n**is_alternate**: The link with the rel=“alternate” attribute.  \ntype: boolean\n\n**is_canonical**: The link with the rel=“canonical” attribute.  \ntype: boolean\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_form**: The link was found in a form HTML tag.  \ntype: boolean\n\n**is_frame**: The link was found in an iframe HTML tag.  \ntype: boolean\n\n**is_homepage_link**: The link was found on the homepage of a referring website.  \ntype: boolean\n\n**is_image**: The link is a regular link that has an image inside their href attribute.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_redirect**: The link pointing to your target via a redirect.  \ntype: boolean\n\n**is_root_source**: The referring domain name is a root domain name.  \ntype: boolean\n\n**is_root_target**: The target domain name is a root domain name.  \ntype: boolean\n\n**is_rss**: The link was found in an RSS feed.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_text**: The link is a standard href hyperlink.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**js_crawl**: The link was discovered after executing javascript and rendering the page.  \ntype: boolean\n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**last_seen**: The date we discovered that the link was lost.  \ntype: datetime nullable\n\n**last_visited**: The date we last re-crawled the referring page to verify the backlink is alive.  \ntype: datetime\n\n**last_visited_target**: The date we last re-crawled the target page to verify that it is broken.  \ntype: datetime nullable\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_group_count**: The number of backlinks that were grouped together based on the aggregation parameter. This field cannot be used with aggregation 'all'.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains_source_domain**: The number of unique root domains linked from the referring domain.  \ntype: integer\n\n**linked_domains_source_page**: The number of unique root domains linked from the referring page.  \ntype: integer\n\n**linked_domains_target_domain**: The number of unique root domains linked from the target domain.  \ntype: integer\n\n**links_external**: The number of external links from the referring page.  \ntype: integer\n\n**links_internal**: The number of internal links from the referring page.  \ntype: integer\n\n**name_source**: The complete referring domain name, including subdomains.  \ntype: string\n\n**name_target**: The complete target domain name, including subdomains.  \ntype: string\n\n**page_size**: The size in bytes of the referring page content.  \ntype: integer\n\n**port_source**: The network port of the referring page URL.  \ntype: integer\n\n**port_target**: The network port of the target page URL.  \ntype: integer\n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**redirect_code**: The HTTP status code of a referring page pointing to your target via a redirect.  \ntype: integer nullable\n\n**redirect_kind**: The HTTP status codes returned by the target redirecting URL or redirect chain.  \ntype: array(integer)\n\n**refdomains_source** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**refdomains_source_domain** (5 units): The number of unique referring domains linking to the referring domain.  \ntype: integer\n\n**refdomains_target_domain** (5 units): The number of unique referring domains linking to the target domain.  \ntype: integer\n\n**root_name_source**: The root domain name of the referring domain, not including subdomains.  \ntype: string\n\n**root_name_target**: The root domain name of the target domain, not including subdomains.  \ntype: string\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**source_page_author**: The author of the referring page.  \ntype: string nullable\n\n**title**: The html title of the referring page.  \ntype: string\n\n**tld_class_source**: The top level domain class of the referring domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`\n\n**tld_class_target**: The top level domain class of the target domain.  \ntype: string  \nenum: `\"gov\"` `\"edu\"` `\"normal\"`\n\n**traffic** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**traffic_domain** (10 units): The referring domain's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string\n\n**url_from_plain**: The referring page URL optimized for use as a filter.  \ntype: string\n\n**url_rating_source**: The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string\n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string",
3242 |                     "type": "string"
3243 |                 },
3244 |                 "select": {
3245 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
3246 |                     "type": "string"
3247 |                 },
3248 |                 "protocol": {
3249 |                     "description": "The protocol of your target.",
3250 |                     "type": "string",
3251 |                     "enum": [
3252 |                         "both",
3253 |                         "http",
3254 |                         "https"
3255 |                     ]
3256 |                 },
3257 |                 "target": {
3258 |                     "description": "The target of the search: a domain or a URL.",
3259 |                     "type": "string"
3260 |                 },
3261 |                 "mode": {
3262 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
3263 |                     "type": "string",
3264 |                     "enum": [
3265 |                         "exact",
3266 |                         "prefix",
3267 |                         "domain",
3268 |                         "subdomains"
3269 |                     ]
3270 |                 },
3271 |                 "aggregation": {
3272 |                     "description": "The backlinks grouping mode.",
3273 |                     "type": "string",
3274 |                     "enum": [
3275 |                         "similar_links",
3276 |                         "1_per_domain",
3277 |                         "all"
3278 |                     ]
3279 |                 }
3280 |             },
3281 |             "required": [
3282 |                 "select",
3283 |                 "target"
3284 |             ],
3285 |             "type": "object"
3286 |         },
3287 |         "name": "site-explorer-broken-backlinks"
3288 |     },
3289 |     {
3290 |         "_original_method": "GET",
3291 |         "_original_parameters": [
3292 |             {
3293 |                 "in": "query",
3294 |                 "name": "timeout",
3295 |                 "required": false
3296 |             },
3297 |             {
3298 |                 "in": "query",
3299 |                 "name": "offset",
3300 |                 "required": false
3301 |             },
3302 |             {
3303 |                 "in": "query",
3304 |                 "name": "limit",
3305 |                 "required": false
3306 |             },
3307 |             {
3308 |                 "in": "query",
3309 |                 "name": "order_by",
3310 |                 "required": false
3311 |             },
3312 |             {
3313 |                 "in": "query",
3314 |                 "name": "where",
3315 |                 "required": false
3316 |             },
3317 |             {
3318 |                 "in": "query",
3319 |                 "name": "select",
3320 |                 "required": true
3321 |             },
3322 |             {
3323 |                 "in": "query",
3324 |                 "name": "protocol",
3325 |                 "required": false
3326 |             },
3327 |             {
3328 |                 "in": "query",
3329 |                 "name": "target",
3330 |                 "required": true
3331 |             },
3332 |             {
3333 |                 "in": "query",
3334 |                 "name": "mode",
3335 |                 "required": false
3336 |             },
3337 |             {
3338 |                 "in": "query",
3339 |                 "name": "history",
3340 |                 "required": false
3341 |             },
3342 |             {
3343 |                 "in": "query",
3344 |                 "name": "output",
3345 |                 "required": false
3346 |             }
3347 |         ],
3348 |         "_original_path": "site-explorer/refdomains",
3349 |         "_original_request_body": null,
3350 |         "description": "Retrieves detailed information about referring domains that link to a specified target domain or URL, with flexible filtering, selection, and sorting of backlink-related metrics. Use doc tool first to get the real input schema.",
3351 |         "inputSchema": {
3352 |             "properties": {
3353 |                 "timeout": {
3354 |                     "type": "integer"
3355 |                 },
3356 |                 "limit": {
3357 |                     "type": "integer"
3358 |                 },
3359 |                 "order_by": {
3360 |                     "type": "string"
3361 |                 },
3362 |                 "where": {
3363 |                     "type": "string"
3364 |                 },
3365 |                 "select": {
3366 |                     "type": "string"
3367 |                 },
3368 |                 "protocol": {
3369 |                     "type": "string"
3370 |                 },
3371 |                 "target": {
3372 |                     "type": "string"
3373 |                 },
3374 |                 "mode": {
3375 |                     "type": "string"
3376 |                 },
3377 |                 "history": {
3378 |                     "type": "string"
3379 |                 }
3380 |             },
3381 |             "required": [
3382 |                 "select",
3383 |                 "target"
3384 |             ],
3385 |             "type": "object"
3386 |         },
3387 |         "_inputSchema": {
3388 |             "properties": {
3389 |                 "timeout": {
3390 |                     "description": "A manual timeout duration in seconds.",
3391 |                     "type": "integer"
3392 |                 },
3393 |                 "limit": {
3394 |                     "description": "The number of results to return.",
3395 |                     "type": "integer"
3396 |                 },
3397 |                 "order_by": {
3398 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**dofollow_linked_domains**: The number of unique root domains with dofollow links linked from the referring domain.  \ntype: integer  \n\n**dofollow_links**: The number of links from the referring domain to your target that don't have the “nofollow” attribute.  \ntype: integer  \n\n**dofollow_refdomains**: (5 units) The number of unique domains with dofollow links to the referring domain.  \ntype: integer  \n\n**domain**: A referring domain that has at least one link to your target.  \ntype: string  \n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**first_seen**: The date we first found a backlink to your target from the referring domain.  \ntype: string<date-time>  \n\n**ip_source**: The referring domain IP address.  \ntype: string nullable  \n\n**is_root_domain**: The domain name is a root domain name.  \ntype: boolean  \n\n**last_seen**: The date your target lost its last live backlink for the referring domain.  \ntype: string<date-time> nullable  \n\n**links_to_target**: The number of backlinks from the referring domain to your target.  \ntype: integer  \n\n**lost_links**: The number of backlinks lost from the referring domain for the selected time period.  \ntype: integer  \n\n**new_links**: The number of new backlinks found from the referring domain for the selected time period.  \ntype: integer  \n\n**positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.  \ntype: integer  \n\n**traffic_domain**: (10 units) The referring domain's estimated monthly organic traffic from search.  \ntype: integer  \n\n",
3399 |                     "type": "string"
3400 |                 },
3401 |                 "where": {
3402 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**discovered_status**: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.  \ntype: string nullable  \nenum: `\"pagefound\"` `\"linkfound\"` `\"linkrestored\"`\n\n**dofollow_linked_domains**: The number of unique root domains with dofollow links linked from the referring domain.  \ntype: integer\n\n**dofollow_links**: The number of links from the referring domain to your target that don't have the “nofollow” attribute.  \ntype: integer\n\n**dofollow_refdomains** (5 units): The number of unique domains with dofollow links to the referring domain.  \ntype: integer\n\n**domain**: A referring domain that has at least one link to your target.  \ntype: string\n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**drop_reason**: The reason we removed the link from our index.  \ntype: string nullable  \nenum: `\"manual\"` `\"noratingunused\"` `\"notop\"` `\"tooold\"` `\"oldunavailable\"` `\"rescursive\"` `\"duplicate\"` `\"nxdomain\"` `\"malformed\"` `\"blockedport\"` `\"disallowed\"` `\"unlinked\"`\n\n**first_seen**: The date we first found a backlink to your target from the referring domain.  \ntype: datetime\n\n**ip_source**: The referring domain IP address.  \ntype: string nullable\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_homepage_link**: The link was found on the homepage of a referring website.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_root_domain**: The domain name is a root domain name.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**last_seen**: The date your target lost its last live backlink for the referring domain.  \ntype: datetime nullable\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains**: The number of unique root domains linked from the referring page.  \ntype: integer\n\n**links_external**: The number of external links from the referring page.  \ntype: integer\n\n**links_to_target**: The number of backlinks from the referring domain to your target.  \ntype: integer\n\n**lost_links**: The number of backlinks lost from the referring domain for the selected time period.  \ntype: integer\n\n**lost_reason**: The reason the link was lost during the last crawl.  \ntype: string nullable  \nenum: `\"removedfromhtml\"` `\"notcanonical\"` `\"noindex\"` `\"pageredirected\"` `\"pageerror\"` `\"lostredirect\"` `\"notfound\"`\n\n**new_links**: The number of new backlinks found from the referring domain for the selected time period.  \ntype: integer\n\n**noindex**: The referring page has the noindex meta attribute.  \ntype: boolean\n\n**port_source**: The network port of the referring page URL.  \ntype: integer\n\n**port_target**: The network port of the target page URL.  \ntype: integer\n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**refdomains** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**root_domain_name**: The root domain name of the referring domain, not including subdomains.  \ntype: string\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**source_page_author**: The author of the referring page.  \ntype: string nullable\n\n**title**: The html title of the referring page.  \ntype: string\n\n**traffic_domain** (10 units): The referring domain's estimated monthly organic traffic from search.  \ntype: integer\n\n**traffic_page** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string",
3403 |                     "type": "string"
3404 |                 },
3405 |                 "select": {
3406 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
3407 |                     "type": "string"
3408 |                 },
3409 |                 "protocol": {
3410 |                     "description": "The protocol of your target.",
3411 |                     "type": "string",
3412 |                     "enum": [
3413 |                         "both",
3414 |                         "http",
3415 |                         "https"
3416 |                     ]
3417 |                 },
3418 |                 "target": {
3419 |                     "description": "The target of the search: a domain or a URL.",
3420 |                     "type": "string"
3421 |                 },
3422 |                 "mode": {
3423 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
3424 |                     "type": "string",
3425 |                     "enum": [
3426 |                         "exact",
3427 |                         "prefix",
3428 |                         "domain",
3429 |                         "subdomains"
3430 |                     ]
3431 |                 },
3432 |                 "history": {
3433 |                     "description": "A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.",
3434 |                     "type": "string"
3435 |                 }
3436 |             },
3437 |             "required": [
3438 |                 "select",
3439 |                 "target"
3440 |             ],
3441 |             "type": "object"
3442 |         },
3443 |         "name": "site-explorer-refdomains"
3444 |     },
3445 |     {
3446 |         "_original_method": "GET",
3447 |         "_original_parameters": [
3448 |             {
3449 |                 "in": "query",
3450 |                 "name": "timeout",
3451 |                 "required": false
3452 |             },
3453 |             {
3454 |                 "in": "query",
3455 |                 "name": "offset",
3456 |                 "required": false
3457 |             },
3458 |             {
3459 |                 "in": "query",
3460 |                 "name": "limit",
3461 |                 "required": false
3462 |             },
3463 |             {
3464 |                 "in": "query",
3465 |                 "name": "order_by",
3466 |                 "required": false
3467 |             },
3468 |             {
3469 |                 "in": "query",
3470 |                 "name": "where",
3471 |                 "required": false
3472 |             },
3473 |             {
3474 |                 "in": "query",
3475 |                 "name": "select",
3476 |                 "required": true
3477 |             },
3478 |             {
3479 |                 "in": "query",
3480 |                 "name": "protocol",
3481 |                 "required": false
3482 |             },
3483 |             {
3484 |                 "in": "query",
3485 |                 "name": "target",
3486 |                 "required": true
3487 |             },
3488 |             {
3489 |                 "in": "query",
3490 |                 "name": "mode",
3491 |                 "required": false
3492 |             },
3493 |             {
3494 |                 "in": "query",
3495 |                 "name": "history",
3496 |                 "required": false
3497 |             },
3498 |             {
3499 |                 "in": "query",
3500 |                 "name": "output",
3501 |                 "required": false
3502 |             }
3503 |         ],
3504 |         "_original_path": "site-explorer/anchors",
3505 |         "_original_request_body": null,
3506 |         "description": "Retrieves anchor text and associated backlink metrics for a specified domain or URL, with filtering and selection options. Use doc tool first to get the real input schema.",
3507 |         "inputSchema": {
3508 |             "properties": {
3509 |                 "timeout": {
3510 |                     "type": "integer"
3511 |                 },
3512 |                 "limit": {
3513 |                     "type": "integer"
3514 |                 },
3515 |                 "order_by": {
3516 |                     "type": "string"
3517 |                 },
3518 |                 "where": {
3519 |                     "type": "string"
3520 |                 },
3521 |                 "select": {
3522 |                     "type": "string"
3523 |                 },
3524 |                 "protocol": {
3525 |                     "type": "string"
3526 |                 },
3527 |                 "target": {
3528 |                     "type": "string"
3529 |                 },
3530 |                 "mode": {
3531 |                     "type": "string"
3532 |                 },
3533 |                 "history": {
3534 |                     "type": "string"
3535 |                 }
3536 |             },
3537 |             "required": [
3538 |                 "select",
3539 |                 "target"
3540 |             ],
3541 |             "type": "object"
3542 |         },
3543 |         "_inputSchema": {
3544 |             "properties": {
3545 |                 "timeout": {
3546 |                     "description": "A manual timeout duration in seconds.",
3547 |                     "type": "integer"
3548 |                 },
3549 |                 "limit": {
3550 |                     "description": "The number of results to return.",
3551 |                     "type": "integer"
3552 |                 },
3553 |                 "order_by": {
3554 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**anchor**: The clickable words in a link that point to a URL.  \ntype: string  \n\n**dofollow_links**: The number of links with a given anchor to your target that don’t have the “nofollow” attribute.  \ntype: integer  \n\n**first_seen**: The date we first found a link with a given anchor to your target.  \ntype: string<date-time>  \n\n**last_seen**: The date we discovered the last backlink with a given anchor was lost.  \ntype: string<date-time> nullable  \n\n**links_to_target**: The number of inbound backlinks your target has with a given anchor.  \ntype: integer  \n\n**lost_links**: The number of backlinks with a given anchor lost during the selected time period.  \ntype: integer  \n\n**new_links**: The number of new backlinks with a given anchor found during the selected time period.  \ntype: integer  \n\n**refdomains**: (5 units) The number of unique domains linking to your target with a given anchor.  \ntype: integer  \n\n**refpages**: The number of pages containing a link with a given anchor to your target.  \ntype: integer  \n\n**top_domain_rating**: The highest Domain Rating (DR) counted out of all referring domains. DR shows the strength of a website’s backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n",
3555 |                     "type": "string"
3556 |                 },
3557 |                 "where": {
3558 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**discovered_status**: The reason the link was discovered during the last crawl: the page was crawled for the first time, the link was added to the page, or the link re-appeared after being removed.  \ntype: string nullable  \nenum: `\"pagefound\"` `\"linkfound\"` `\"linkrestored\"`\n\n**dofollow_links**: The number of links with a given anchor to your target that don’t have the “nofollow” attribute.  \ntype: integer\n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**drop_reason**: The reason we removed the link from our index.  \ntype: string nullable  \nenum: `\"manual\"` `\"noratingunused\"` `\"notop\"` `\"tooold\"` `\"oldunavailable\"` `\"rescursive\"` `\"duplicate\"` `\"nxdomain\"` `\"malformed\"` `\"blockedport\"` `\"disallowed\"` `\"unlinked\"`\n\n**first_seen**: The date we first found a link with a given anchor to your target.  \ntype: datetime\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_homepage_link**: The link was found on the homepage of a referring website.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_root_domain**: The domain name is a root domain name.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**last_seen**: The date we discovered the last backlink with a given anchor was lost.  \ntype: datetime nullable\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains**: The number of unique root domains linked from the referring page.  \ntype: integer\n\n**links_external**: The number of external links from the referring page.  \ntype: integer\n\n**links_to_target**: The number of inbound backlinks your target has with a given anchor.  \ntype: integer\n\n**lost_links**: The number of backlinks with a given anchor lost during the selected time period.  \ntype: integer\n\n**lost_reason**: The reason the link was lost during the last crawl.  \ntype: string nullable  \nenum: `\"removedfromhtml\"` `\"notcanonical\"` `\"noindex\"` `\"pageredirected\"` `\"pageerror\"` `\"lostredirect\"` `\"notfound\"`\n\n**new_links**: The number of new backlinks with a given anchor found during the selected time period.  \ntype: integer\n\n**noindex**: The referring page has the noindex meta attribute.  \ntype: boolean\n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**refdomains** (5 units): The number of unique domains linking to your target with a given anchor.  \ntype: integer\n\n**refdomains_source** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**refpages**: The number of pages containing a link with a given anchor to your target.  \ntype: integer\n\n**root_domain_name**: The root domain name of the referring domain, not including subdomains.  \ntype: string\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**source_page_author**: The author of the referring page.  \ntype: string nullable\n\n**title**: The html title of the referring page.  \ntype: string\n\n**top_domain_rating**: The highest Domain Rating (DR) counted out of all referring domains. DR shows the strength of a website’s backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**traffic_domain** (10 units): The referring domain's estimated monthly organic traffic from search.  \ntype: integer\n\n**traffic_page** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string",
3559 |                     "type": "string"
3560 |                 },
3561 |                 "select": {
3562 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
3563 |                     "type": "string"
3564 |                 },
3565 |                 "protocol": {
3566 |                     "description": "The protocol of your target.",
3567 |                     "type": "string",
3568 |                     "enum": [
3569 |                         "both",
3570 |                         "http",
3571 |                         "https"
3572 |                     ]
3573 |                 },
3574 |                 "target": {
3575 |                     "description": "The target of the search: a domain or a URL.",
3576 |                     "type": "string"
3577 |                 },
3578 |                 "mode": {
3579 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
3580 |                     "type": "string",
3581 |                     "enum": [
3582 |                         "exact",
3583 |                         "prefix",
3584 |                         "domain",
3585 |                         "subdomains"
3586 |                     ]
3587 |                 },
3588 |                 "history": {
3589 |                     "description": "A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.",
3590 |                     "type": "string"
3591 |                 }
3592 |             },
3593 |             "required": [
3594 |                 "select",
3595 |                 "target"
3596 |             ],
3597 |             "type": "object"
3598 |         },
3599 |         "name": "site-explorer-anchors"
3600 |     },
3601 |     {
3602 |         "_original_method": "GET",
3603 |         "_original_parameters": [
3604 |             {
3605 |                 "in": "query",
3606 |                 "name": "timeout",
3607 |                 "required": false
3608 |             },
3609 |             {
3610 |                 "in": "query",
3611 |                 "name": "offset",
3612 |                 "required": false
3613 |             },
3614 |             {
3615 |                 "in": "query",
3616 |                 "name": "limit",
3617 |                 "required": false
3618 |             },
3619 |             {
3620 |                 "in": "query",
3621 |                 "name": "order_by",
3622 |                 "required": false
3623 |             },
3624 |             {
3625 |                 "in": "query",
3626 |                 "name": "where",
3627 |                 "required": false
3628 |             },
3629 |             {
3630 |                 "in": "query",
3631 |                 "name": "select",
3632 |                 "required": true
3633 |             },
3634 |             {
3635 |                 "in": "query",
3636 |                 "name": "protocol",
3637 |                 "required": false
3638 |             },
3639 |             {
3640 |                 "in": "query",
3641 |                 "name": "target",
3642 |                 "required": true
3643 |             },
3644 |             {
3645 |                 "in": "query",
3646 |                 "name": "mode",
3647 |                 "required": false
3648 |             },
3649 |             {
3650 |                 "in": "query",
3651 |                 "name": "output",
3652 |                 "required": false
3653 |             }
3654 |         ],
3655 |         "_original_path": "site-explorer/linkeddomains",
3656 |         "_original_request_body": null,
3657 |         "description": "Retrieves information about external domains that are linked from a specified target domain or URL, allowing for filtering, field selection, and various scopes of analysis. Use doc tool first to get the real input schema.",
3658 |         "inputSchema": {
3659 |             "properties": {
3660 |                 "timeout": {
3661 |                     "type": "integer"
3662 |                 },
3663 |                 "limit": {
3664 |                     "type": "integer"
3665 |                 },
3666 |                 "order_by": {
3667 |                     "type": "string"
3668 |                 },
3669 |                 "where": {
3670 |                     "type": "string"
3671 |                 },
3672 |                 "select": {
3673 |                     "type": "string"
3674 |                 },
3675 |                 "protocol": {
3676 |                     "type": "string"
3677 |                 },
3678 |                 "target": {
3679 |                     "type": "string"
3680 |                 },
3681 |                 "mode": {
3682 |                     "type": "string"
3683 |                 }
3684 |             },
3685 |             "required": [
3686 |                 "select",
3687 |                 "target"
3688 |             ],
3689 |             "type": "object"
3690 |         },
3691 |         "_inputSchema": {
3692 |             "properties": {
3693 |                 "timeout": {
3694 |                     "description": "A manual timeout duration in seconds.",
3695 |                     "type": "integer"
3696 |                 },
3697 |                 "limit": {
3698 |                     "description": "The number of results to return.",
3699 |                     "type": "integer"
3700 |                 },
3701 |                 "order_by": {
3702 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**dofollow_linked_domains**: The number of unique root domains with dofollow links linked from the linked domain.  \ntype: integer  \n\n**dofollow_links**: The number of links from your target to the linked domain that don’t have the “nofollow” attribute.  \ntype: integer  \n\n**dofollow_refdomains**: (5 units) The number of unique domains with dofollow links to the linked domain.  \ntype: integer  \n\n**domain**: A linked domain that has at least one link from your target.  \ntype: string  \n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**first_seen**: The date we first found a link to the linked domain from your target.  \ntype: string<date-time>  \n\n**is_root_domain**: The domain name is a root domain name.  \ntype: boolean  \n\n**linked_domain_traffic**: (10 units) The linked domain’s estimated monthly organic traffic from search  \ntype: integer  \n\n**linked_pages**: The number of the domain's pages linked from your target.  \ntype: integer  \n\n**links_from_target**: The number of links to the linked domain from your target.  \ntype: integer  \n\n",
3703 |                     "type": "string"
3704 |                 },
3705 |                 "where": {
3706 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**dofollow_linked_domains**: The number of unique root domains with dofollow links linked from the linked domain.  \ntype: integer\n\n**dofollow_links**: The number of links from your target to the linked domain that don’t have the “nofollow” attribute.  \ntype: integer\n\n**dofollow_refdomains** (5 units): The number of unique domains with dofollow links to the linked domain.  \ntype: integer\n\n**domain**: A linked domain that has at least one link from your target.  \ntype: string\n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**first_seen**: The date we first found a link to the linked domain from your target.  \ntype: datetime\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_root_domain**: The domain name is a root domain name.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domain_traffic** (10 units): The linked domain’s estimated monthly organic traffic from search  \ntype: integer\n\n**linked_domains**: The number of unique root domains linked from the referring page.  \ntype: integer\n\n**linked_pages**: The number of the domain's pages linked from your target.  \ntype: integer\n\n**links_external**: The number of external links from the referring page.  \ntype: integer\n\n**links_from_target**: The number of links to the linked domain from your target.  \ntype: integer\n\n**port_source**: The network port of the referring page URL.  \ntype: integer\n\n**port_target**: The network port of the target page URL.  \ntype: integer\n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**refdomains** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**root_domain_name**: The root domain name of the referring domain, not including subdomains.  \ntype: string\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**title**: The html title of the referring page.  \ntype: string\n\n**traffic_page** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from**: The URL of the page containing a link from your target.  \ntype: string\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the outgoing link points to.  \ntype: string",
3707 |                     "type": "string"
3708 |                 },
3709 |                 "select": {
3710 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
3711 |                     "type": "string"
3712 |                 },
3713 |                 "protocol": {
3714 |                     "description": "The protocol of your target.",
3715 |                     "type": "string",
3716 |                     "enum": [
3717 |                         "both",
3718 |                         "http",
3719 |                         "https"
3720 |                     ]
3721 |                 },
3722 |                 "target": {
3723 |                     "description": "The target of the search: a domain or a URL.",
3724 |                     "type": "string"
3725 |                 },
3726 |                 "mode": {
3727 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
3728 |                     "type": "string",
3729 |                     "enum": [
3730 |                         "exact",
3731 |                         "prefix",
3732 |                         "domain",
3733 |                         "subdomains"
3734 |                     ]
3735 |                 }
3736 |             },
3737 |             "required": [
3738 |                 "select",
3739 |                 "target"
3740 |             ],
3741 |             "type": "object"
3742 |         },
3743 |         "name": "site-explorer-linkeddomains"
3744 |     },
3745 |     {
3746 |         "_original_method": "GET",
3747 |         "_original_parameters": [
3748 |             {
3749 |                 "in": "query",
3750 |                 "name": "timeout",
3751 |                 "required": false
3752 |             },
3753 |             {
3754 |                 "in": "query",
3755 |                 "name": "offset",
3756 |                 "required": false
3757 |             },
3758 |             {
3759 |                 "in": "query",
3760 |                 "name": "limit",
3761 |                 "required": false
3762 |             },
3763 |             {
3764 |                 "in": "query",
3765 |                 "name": "order_by",
3766 |                 "required": false
3767 |             },
3768 |             {
3769 |                 "in": "query",
3770 |                 "name": "where",
3771 |                 "required": false
3772 |             },
3773 |             {
3774 |                 "in": "query",
3775 |                 "name": "select",
3776 |                 "required": true
3777 |             },
3778 |             {
3779 |                 "in": "query",
3780 |                 "name": "protocol",
3781 |                 "required": false
3782 |             },
3783 |             {
3784 |                 "in": "query",
3785 |                 "name": "target",
3786 |                 "required": true
3787 |             },
3788 |             {
3789 |                 "in": "query",
3790 |                 "name": "mode",
3791 |                 "required": false
3792 |             },
3793 |             {
3794 |                 "in": "query",
3795 |                 "name": "output",
3796 |                 "required": false
3797 |             }
3798 |         ],
3799 |         "_original_path": "site-explorer/linked-anchors-external",
3800 |         "_original_request_body": null,
3801 |         "description": "Retrieves data about external anchor text (the clickable words in outbound links) used on a specified domain, subdomain, or URL, including metrics like dofollow link counts, distinct linked domains, and other attributes about the links. Use doc tool first to get the real input schema.",
3802 |         "inputSchema": {
3803 |             "properties": {
3804 |                 "timeout": {
3805 |                     "type": "integer"
3806 |                 },
3807 |                 "limit": {
3808 |                     "type": "integer"
3809 |                 },
3810 |                 "order_by": {
3811 |                     "type": "string"
3812 |                 },
3813 |                 "where": {
3814 |                     "type": "string"
3815 |                 },
3816 |                 "select": {
3817 |                     "type": "string"
3818 |                 },
3819 |                 "protocol": {
3820 |                     "type": "string"
3821 |                 },
3822 |                 "target": {
3823 |                     "type": "string"
3824 |                 },
3825 |                 "mode": {
3826 |                     "type": "string"
3827 |                 }
3828 |             },
3829 |             "required": [
3830 |                 "select",
3831 |                 "target"
3832 |             ],
3833 |             "type": "object"
3834 |         },
3835 |         "_inputSchema": {
3836 |             "properties": {
3837 |                 "timeout": {
3838 |                     "description": "A manual timeout duration in seconds.",
3839 |                     "type": "integer"
3840 |                 },
3841 |                 "limit": {
3842 |                     "description": "The number of results to return.",
3843 |                     "type": "integer"
3844 |                 },
3845 |                 "order_by": {
3846 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**anchor**: The clickable words in a link that point to a URL.  \ntype: string  \n\n**dofollow_links**: The number of outbound links with a given anchor from your target that don’t have the “nofollow” attribute.  \ntype: integer  \n\n**first_seen**: The date we first found a link with a given anchor on your target.  \ntype: string<date-time>  \n\n**linked_domains**: The number of unique domains linked from your target with a given anchor.  \ntype: integer  \n\n**linked_pages**: The number of unique pages linked from your target with a given anchor.  \ntype: integer  \n\n**links_from_target**: The number of outbound links your target has with a given anchor.  \ntype: integer  \n\n",
3847 |                     "type": "string"
3848 |                 },
3849 |                 "where": {
3850 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**dofollow_links**: The number of outbound links with a given anchor from your target that don’t have the “nofollow” attribute.  \ntype: integer\n\n**domain**: A linked domain that has at least one link from your target with a given anchor.  \ntype: string\n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**first_seen**: The date we first found a link with a given anchor on your target.  \ntype: datetime\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains**: The number of unique domains linked from your target with a given anchor.  \ntype: integer\n\n**linked_domains_source**: The number of unique root domains linked from the source page.  \ntype: integer\n\n**linked_pages**: The number of unique pages linked from your target with a given anchor.  \ntype: integer\n\n**links_external**: The number of external links from the referring page.  \ntype: integer\n\n**links_from_target**: The number of outbound links your target has with a given anchor.  \ntype: integer\n\n**port_source**: The network port of the referring page URL.  \ntype: integer\n\n**port_target**: The network port of the target page URL.  \ntype: integer\n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**refdomains_source** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**title**: The html title of the referring page.  \ntype: string\n\n**traffic_page** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string",
3851 |                     "type": "string"
3852 |                 },
3853 |                 "select": {
3854 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
3855 |                     "type": "string"
3856 |                 },
3857 |                 "protocol": {
3858 |                     "description": "The protocol of your target.",
3859 |                     "type": "string",
3860 |                     "enum": [
3861 |                         "both",
3862 |                         "http",
3863 |                         "https"
3864 |                     ]
3865 |                 },
3866 |                 "target": {
3867 |                     "description": "The target of the search: a domain or a URL.",
3868 |                     "type": "string"
3869 |                 },
3870 |                 "mode": {
3871 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
3872 |                     "type": "string",
3873 |                     "enum": [
3874 |                         "exact",
3875 |                         "prefix",
3876 |                         "domain",
3877 |                         "subdomains"
3878 |                     ]
3879 |                 }
3880 |             },
3881 |             "required": [
3882 |                 "select",
3883 |                 "target"
3884 |             ],
3885 |             "type": "object"
3886 |         },
3887 |         "name": "site-explorer-linked-anchors-external"
3888 |     },
3889 |     {
3890 |         "_original_method": "GET",
3891 |         "_original_parameters": [
3892 |             {
3893 |                 "in": "query",
3894 |                 "name": "timeout",
3895 |                 "required": false
3896 |             },
3897 |             {
3898 |                 "in": "query",
3899 |                 "name": "offset",
3900 |                 "required": false
3901 |             },
3902 |             {
3903 |                 "in": "query",
3904 |                 "name": "limit",
3905 |                 "required": false
3906 |             },
3907 |             {
3908 |                 "in": "query",
3909 |                 "name": "order_by",
3910 |                 "required": false
3911 |             },
3912 |             {
3913 |                 "in": "query",
3914 |                 "name": "where",
3915 |                 "required": false
3916 |             },
3917 |             {
3918 |                 "in": "query",
3919 |                 "name": "select",
3920 |                 "required": true
3921 |             },
3922 |             {
3923 |                 "in": "query",
3924 |                 "name": "protocol",
3925 |                 "required": false
3926 |             },
3927 |             {
3928 |                 "in": "query",
3929 |                 "name": "target",
3930 |                 "required": true
3931 |             },
3932 |             {
3933 |                 "in": "query",
3934 |                 "name": "mode",
3935 |                 "required": false
3936 |             },
3937 |             {
3938 |                 "in": "query",
3939 |                 "name": "output",
3940 |                 "required": false
3941 |             }
3942 |         ],
3943 |         "_original_path": "site-explorer/linked-anchors-internal",
3944 |         "_original_request_body": null,
3945 |         "description": "Retrieves internal anchor text data for a given website or URL, detailing how anchor texts are used in links between pages on the same site. Use doc tool first to get the real input schema.",
3946 |         "inputSchema": {
3947 |             "properties": {
3948 |                 "timeout": {
3949 |                     "type": "integer"
3950 |                 },
3951 |                 "limit": {
3952 |                     "type": "integer"
3953 |                 },
3954 |                 "order_by": {
3955 |                     "type": "string"
3956 |                 },
3957 |                 "where": {
3958 |                     "type": "string"
3959 |                 },
3960 |                 "select": {
3961 |                     "type": "string"
3962 |                 },
3963 |                 "protocol": {
3964 |                     "type": "string"
3965 |                 },
3966 |                 "target": {
3967 |                     "type": "string"
3968 |                 },
3969 |                 "mode": {
3970 |                     "type": "string"
3971 |                 }
3972 |             },
3973 |             "required": [
3974 |                 "select",
3975 |                 "target"
3976 |             ],
3977 |             "type": "object"
3978 |         },
3979 |         "_inputSchema": {
3980 |             "properties": {
3981 |                 "timeout": {
3982 |                     "description": "A manual timeout duration in seconds.",
3983 |                     "type": "integer"
3984 |                 },
3985 |                 "limit": {
3986 |                     "description": "The number of results to return.",
3987 |                     "type": "integer"
3988 |                 },
3989 |                 "order_by": {
3990 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**anchor**: The clickable words in a link that point to a URL.  \ntype: string  \n\n**dofollow_links**: The number of outbound links with a given anchor from your target that don’t have the “nofollow” attribute.  \ntype: integer  \n\n**first_seen**: The date we first found a link with a given anchor on your target.  \ntype: string<date-time>  \n\n**linked_pages**: The number of unique pages linked from your target with a given anchor.  \ntype: integer  \n\n**links_from_target**: The number of outbound links your target has with a given anchor.  \ntype: integer  \n\n",
3991 |                     "type": "string"
3992 |                 },
3993 |                 "where": {
3994 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**dofollow_links**: The number of outbound links with a given anchor from your target that don’t have the “nofollow” attribute.  \ntype: integer\n\n**domain**: A linked domain that has at least one link from your target with a given anchor.  \ntype: string\n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**first_seen**: The date we first found a link with a given anchor on your target.  \ntype: datetime\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**languages**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains_source**: The number of unique root domains linked from the source page.  \ntype: integer\n\n**linked_pages**: The number of unique pages linked from your target with a given anchor.  \ntype: integer\n\n**links_external**: The number of external links from the referring page.  \ntype: integer\n\n**links_from_target**: The number of outbound links your target has with a given anchor.  \ntype: integer\n\n**port_source**: The network port of the referring page URL.  \ntype: integer\n\n**port_target**: The network port of the target page URL.  \ntype: integer\n\n**positions**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**refdomains_source** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**title**: The html title of the referring page.  \ntype: string\n\n**traffic_page** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from**: The URL of the page containing a link to your target.  \ntype: string\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string",
3995 |                     "type": "string"
3996 |                 },
3997 |                 "select": {
3998 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
3999 |                     "type": "string"
4000 |                 },
4001 |                 "protocol": {
4002 |                     "description": "The protocol of your target.",
4003 |                     "type": "string",
4004 |                     "enum": [
4005 |                         "both",
4006 |                         "http",
4007 |                         "https"
4008 |                     ]
4009 |                 },
4010 |                 "target": {
4011 |                     "description": "The target of the search: a domain or a URL.",
4012 |                     "type": "string"
4013 |                 },
4014 |                 "mode": {
4015 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
4016 |                     "type": "string",
4017 |                     "enum": [
4018 |                         "exact",
4019 |                         "prefix",
4020 |                         "domain",
4021 |                         "subdomains"
4022 |                     ]
4023 |                 }
4024 |             },
4025 |             "required": [
4026 |                 "select",
4027 |                 "target"
4028 |             ],
4029 |             "type": "object"
4030 |         },
4031 |         "name": "site-explorer-linked-anchors-internal"
4032 |     },
4033 |     {
4034 |         "_original_method": "GET",
4035 |         "_original_parameters": [
4036 |             {
4037 |                 "in": "query",
4038 |                 "name": "timeout",
4039 |                 "required": false
4040 |             },
4041 |             {
4042 |                 "in": "query",
4043 |                 "name": "offset",
4044 |                 "required": false
4045 |             },
4046 |             {
4047 |                 "in": "query",
4048 |                 "name": "limit",
4049 |                 "required": false
4050 |             },
4051 |             {
4052 |                 "in": "query",
4053 |                 "name": "order_by",
4054 |                 "required": false
4055 |             },
4056 |             {
4057 |                 "in": "query",
4058 |                 "name": "where",
4059 |                 "required": false
4060 |             },
4061 |             {
4062 |                 "in": "query",
4063 |                 "name": "select",
4064 |                 "required": true
4065 |             },
4066 |             {
4067 |                 "in": "query",
4068 |                 "name": "protocol",
4069 |                 "required": false
4070 |             },
4071 |             {
4072 |                 "in": "query",
4073 |                 "name": "target",
4074 |                 "required": true
4075 |             },
4076 |             {
4077 |                 "in": "query",
4078 |                 "name": "mode",
4079 |                 "required": false
4080 |             },
4081 |             {
4082 |                 "in": "query",
4083 |                 "name": "country",
4084 |                 "required": false
4085 |             },
4086 |             {
4087 |                 "in": "query",
4088 |                 "name": "date_compared",
4089 |                 "required": false
4090 |             },
4091 |             {
4092 |                 "in": "query",
4093 |                 "name": "date",
4094 |                 "required": true
4095 |             },
4096 |             {
4097 |                 "in": "query",
4098 |                 "name": "volume_mode",
4099 |                 "required": false
4100 |             },
4101 |             {
4102 |                 "in": "query",
4103 |                 "name": "output",
4104 |                 "required": false
4105 |             }
4106 |         ],
4107 |         "_original_path": "site-explorer/organic-keywords",
4108 |         "_original_request_body": null,
4109 |         "description": "Retrieves detailed organic keyword data for a given domain, URL, or path, including rankings, search intent, SERP features, traffic and CPC metrics, with the ability to filter, sort, and compare metrics across dates and regions. Use doc tool first to get the real input schema.",
4110 |         "inputSchema": {
4111 |             "properties": {
4112 |                 "timeout": {
4113 |                     "type": "integer"
4114 |                 },
4115 |                 "limit": {
4116 |                     "type": "integer"
4117 |                 },
4118 |                 "order_by": {
4119 |                     "type": "string"
4120 |                 },
4121 |                 "where": {
4122 |                     "type": "string"
4123 |                 },
4124 |                 "select": {
4125 |                     "type": "string"
4126 |                 },
4127 |                 "protocol": {
4128 |                     "type": "string"
4129 |                 },
4130 |                 "target": {
4131 |                     "type": "string"
4132 |                 },
4133 |                 "mode": {
4134 |                     "type": "string"
4135 |                 },
4136 |                 "country": {
4137 |                     "type": "string"
4138 |                 },
4139 |                 "date_compared": {
4140 |                     "type": "string"
4141 |                 },
4142 |                 "date": {
4143 |                     "type": "string"
4144 |                 },
4145 |                 "volume_mode": {
4146 |                     "type": "string"
4147 |                 }
4148 |             },
4149 |             "required": [
4150 |                 "select",
4151 |                 "target",
4152 |                 "date"
4153 |             ],
4154 |             "type": "object"
4155 |         },
4156 |         "_inputSchema": {
4157 |             "properties": {
4158 |                 "timeout": {
4159 |                     "description": "A manual timeout duration in seconds.",
4160 |                     "type": "integer"
4161 |                 },
4162 |                 "limit": {
4163 |                     "description": "The number of results to return.",
4164 |                     "type": "integer"
4165 |                 },
4166 |                 "order_by": {
4167 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**best_position**: The top position your target ranks for in the organic search results for a keyword.  \ntype: integer nullable  \n\n**best_position_diff**: The change in position between your selected dates.  \ntype: integer nullable  \n\n**best_position_has_thumbnail**: The top position has a thumbnail.  \ntype: boolean nullable  \n\n**best_position_has_thumbnail_prev**: The top position has a thumbnail on the comparison date.  \ntype: boolean nullable  \n\n**best_position_has_video**: The top position has a video.  \ntype: boolean nullable  \n\n**best_position_has_video_prev**: The top position has a video on the comparison date.  \ntype: boolean nullable  \n\n**best_position_kind**: The kind of the top position: organic, paid, or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**best_position_kind_merged**: The kind of the top position optimized for sorting.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**best_position_kind_prev**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**best_position_prev**: The top position on the comparison date.  \ntype: integer nullable  \n\n**best_position_set**: The ranking group of the top position.  \ntype: string  \nenum: `\"top_3\"` `\"top_4_10\"` `\"top_11_50\"` `\"top_51_more\"`  \n\n**best_position_set_prev**: The ranking group of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"top_3\"` `\"top_4_10\"` `\"top_11_50\"` `\"top_51_more\"`  \n\n**best_position_url**: The ranking URL in organic search results.  \ntype: string<url> nullable  \n\n**best_position_url_prev**: The ranking URL on the comparison date.  \ntype: string<url> nullable  \n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable  \n\n**cpc_merged**: The CPC field optimized for sorting.  \ntype: integer nullable  \n\n**cpc_prev**: The CPC metric on the comparison date.  \ntype: integer nullable  \n\n**is_best_position_set_top_11_50**: The ranking group of the top position is 11-50.  \ntype: boolean  \n\n**is_best_position_set_top_11_50_prev**: The ranking group of the top position was 11-50 on the comparison date.  \ntype: boolean nullable  \n\n**is_best_position_set_top_3**: The ranking group of the top position is Top 3.  \ntype: boolean  \n\n**is_best_position_set_top_3_prev**: The ranking group of the top position was Top 3 on the comparison date.  \ntype: boolean nullable  \n\n**is_best_position_set_top_4_10**: The ranking group of the top position is 4-10.  \ntype: boolean  \n\n**is_best_position_set_top_4_10_prev**: The ranking group of the top position was 4-10 on the comparison date.  \ntype: boolean nullable  \n\n**is_branded**: User intent: branded. The user is searching for a specific brand or company name.  \ntype: boolean  \n\n**is_commercial**: User intent: commercial. The user is comparing products or services before making a purchase decision.  \ntype: boolean  \n\n**is_informational**: User intent: informational. The user is looking for information or an answer to a specific question.  \ntype: boolean  \n\n**is_local**: User intent: local. The user is looking for information relevant to a specific location or nearby services.  \ntype: boolean  \n\n**is_navigational**: User intent: navigational. The user is searching for a specific website or web page.  \ntype: boolean  \n\n**is_transactional**: User intent: transactional. The user is ready to complete an action, often a purchase.  \ntype: boolean  \n\n**keyword**: The keyword your target ranks for.  \ntype: string nullable  \n\n**keyword_country**: The country of a keyword your target ranks for.  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**keyword_difficulty**: (10 units) An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable  \n\n**keyword_difficulty_merged**: (10 units) The keyword difficulty field optimized for sorting.  \ntype: integer nullable  \n\n**keyword_difficulty_prev**: (10 units) The keyword difficulty on the comparison date.  \ntype: integer nullable  \n\n**keyword_merged**: The keyword field optimized for sorting.  \ntype: string  \n\n**keyword_prev**: The keyword your target ranks for on the comparison date.  \ntype: string nullable  \n\n**language**: The SERP language.  \ntype: string  \n\n**language_prev**: The SERP language on the comparison date.  \ntype: string nullable  \n\n**last_update**: The date when we last checked search engine results for a keyword.  \ntype: string<date-time>  \n\n**last_update_prev**: The date when we checked search engine results up to the comparison date.  \ntype: string<date-time> nullable  \n\n**serp_features**: The SERP features that appear in search results for a keyword.  \ntype: array[string]  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`  \n\n**serp_features_count**: The number of SERP features that appear in search results for a keyword.  \ntype: integer  \n\n**serp_features_count_prev**: The number of SERP features on the comparison date.  \ntype: integer nullable  \n\n**serp_features_merged**: The SERP features field optimized for sorting.  \ntype: array[string]  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`  \n\n**serp_features_prev**: The SERP features on the comparison date.  \ntype: array[string]  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`  \n\n**serp_target_main_positions_count**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).  \ntype: integer  \n\n**serp_target_main_positions_count_prev**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.  \ntype: integer nullable  \n\n**serp_target_positions_count**: The number of target URLs ranking for a keyword.  \ntype: integer  \n\n**serp_target_positions_count_prev**: The number of target URLs ranking for a keyword on the comparison date.  \ntype: integer nullable  \n\n**status**: The status of a page: the new page that just started to rank (\"left\"), the lost page that disappeared from search results (\"right\"), or no change (\"both\").  \ntype: string  \nenum: `\"left\"` `\"right\"` `\"both\"`  \n\n**sum_paid_traffic**: (10 units) An estimation of the number of monthly visits that your target gets from paid search for a keyword.  \ntype: integer nullable  \n\n**sum_paid_traffic_merged**: (10 units) The paid traffic field optimized for sorting.  \ntype: integer  \n\n**sum_paid_traffic_prev**: (10 units) The paid traffic on the comparison date.  \ntype: integer nullable  \n\n**sum_traffic**: (10 units) An estimation of the number of monthly visitors that your target gets from organic search for a keyword.  \ntype: integer nullable  \n\n**sum_traffic_merged**: (10 units) The traffic field optimized for sorting.  \ntype: integer  \n\n**sum_traffic_prev**: (10 units) The traffic on the comparison date.  \ntype: integer nullable  \n\n**volume**: (10 units) An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable  \n\n**volume_desktop_pct**: The percentage of the total search volume that comes from desktop devices.  \ntype: number<float> nullable  \n\n**volume_merged**: (10 units) The search volume field optimized for sorting.  \ntype: integer nullable  \n\n**volume_mobile_pct**: The percentage of the total search volume that comes from mobile devices.  \ntype: number<float> nullable  \n\n**volume_prev**: (10 units) The search volume on the comparison date.  \ntype: integer nullable  \n\n**words**: The number of words in a keyword.  \ntype: integer nullable  \n\n**words_merged**: The number of words in a keyword optimized for sorting.  \ntype: integer  \n\n**words_prev**: The number of words in a keyword on the comparison date.  \ntype: integer nullable  \n\n",
4168 |                     "type": "string"
4169 |                 },
4170 |                 "where": {
4171 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**best_position**: The top position your target ranks for in the organic search results for a keyword.  \ntype: integer nullable\n\n**best_position_diff**: The change in position between your selected dates.  \ntype: integer nullable\n\n**best_position_has_thumbnail**: The top position has a thumbnail.  \ntype: boolean nullable\n\n**best_position_has_thumbnail_prev**: The top position has a thumbnail on the comparison date.  \ntype: boolean nullable\n\n**best_position_has_video**: The top position has a video.  \ntype: boolean nullable\n\n**best_position_has_video_prev**: The top position has a video on the comparison date.  \ntype: boolean nullable\n\n**best_position_kind**: The kind of the top position: organic, paid, or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**best_position_kind_merged**: The kind of the top position optimized for sorting.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**best_position_kind_prev**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**best_position_prev**: The top position on the comparison date.  \ntype: integer nullable\n\n**best_position_set**: The ranking group of the top position.  \ntype: string  \nenum: `\"top_3\"` `\"top_4_10\"` `\"top_11_50\"` `\"top_51_more\"`\n\n**best_position_set_prev**: The ranking group of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"top_3\"` `\"top_4_10\"` `\"top_11_50\"` `\"top_51_more\"`\n\n**best_position_url**: The ranking URL in organic search results.  \ntype: string nullable\n\n**best_position_url_prev**: The ranking URL on the comparison date.  \ntype: string nullable\n\n**best_position_url_raw**: The ranking page URL in encoded format.  \ntype: string nullable\n\n**best_position_url_raw_prev**: The ranking page URL on the comparison date in encoded format.  \ntype: string nullable\n\n**cpc**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents.  \ntype: integer nullable\n\n**cpc_merged**: The CPC field optimized for sorting.  \ntype: integer nullable\n\n**cpc_prev**: The CPC metric on the comparison date.  \ntype: integer nullable\n\n**is_best_position_set_top_11_50**: The ranking group of the top position is 11-50.  \ntype: boolean\n\n**is_best_position_set_top_11_50_prev**: The ranking group of the top position was 11-50 on the comparison date.  \ntype: boolean nullable\n\n**is_best_position_set_top_3**: The ranking group of the top position is Top 3.  \ntype: boolean\n\n**is_best_position_set_top_3_prev**: The ranking group of the top position was Top 3 on the comparison date.  \ntype: boolean nullable\n\n**is_best_position_set_top_4_10**: The ranking group of the top position is 4-10.  \ntype: boolean\n\n**is_best_position_set_top_4_10_prev**: The ranking group of the top position was 4-10 on the comparison date.  \ntype: boolean nullable\n\n**is_branded**: User intent: branded. The user is searching for a specific brand or company name.  \ntype: boolean\n\n**is_commercial**: User intent: commercial. The user is comparing products or services before making a purchase decision.  \ntype: boolean\n\n**is_informational**: User intent: informational. The user is looking for information or an answer to a specific question.  \ntype: boolean\n\n**is_local**: User intent: local. The user is looking for information relevant to a specific location or nearby services.  \ntype: boolean\n\n**is_main_position**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).  \ntype: boolean\n\n**is_main_position_prev**: Excludes positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.  \ntype: boolean\n\n**is_navigational**: User intent: navigational. The user is searching for a specific website or web page.  \ntype: boolean\n\n**is_transactional**: User intent: transactional. The user is ready to complete an action, often a purchase.  \ntype: boolean\n\n**keyword**: The keyword your target ranks for.  \ntype: string\n\n**keyword_country**: The country of a keyword your target ranks for.  \ntype: string  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**keyword_difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**keyword_difficulty_merged** (10 units): The keyword difficulty field optimized for sorting.  \ntype: integer nullable\n\n**keyword_difficulty_prev** (10 units): The keyword difficulty on the comparison date.  \ntype: integer nullable\n\n**keyword_merged**: The keyword field optimized for sorting.  \ntype: string\n\n**keyword_prev**: The keyword your target ranks for on the comparison date.  \ntype: string\n\n**language**: The SERP language.  \ntype: string\n\n**language_prev**: The SERP language on the comparison date.  \ntype: string nullable\n\n**last_update**: The date when we last checked search engine results for a keyword.  \ntype: datetime\n\n**last_update_prev**: The date when we checked search engine results up to the comparison date.  \ntype: datetime nullable\n\n**position_kind**: The kind of a position: organic, paid or a SERP feature. This applies to all positions for a given keyword and URL before picking the top position.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**position_kind_prev**: The kind of a position on the comparison date.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**positions_kinds**: The kinds of the top positions.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**positions_kinds_prev**: The kinds of the top positions on the comparison date.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_features**: The SERP features that appear in search results for a keyword.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_features_count**: The number of SERP features that appear in search results for a keyword.  \ntype: integer\n\n**serp_features_count_prev**: The number of SERP features on the comparison date.  \ntype: integer nullable\n\n**serp_features_merged**: The SERP features field optimized for sorting.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_features_prev**: The SERP features on the comparison date.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_target_main_positions_count**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter).  \ntype: integer\n\n**serp_target_main_positions_count_prev**: The number of target URLs ranking for a keyword excluding positions in Sitelinks, Top stories, Image packs, and posts on X (Twitter) on the comparison date.  \ntype: integer nullable\n\n**serp_target_positions_count**: The number of target URLs ranking for a keyword.  \ntype: integer\n\n**serp_target_positions_count_prev**: The number of target URLs ranking for a keyword on the comparison date.  \ntype: integer nullable\n\n**status**: The status of a page: the new page that just started to rank (\"left\"), the lost page that disappeared from search results (\"right\"), or no change (\"both\").  \ntype: string  \nenum: `\"left\"` `\"right\"` `\"both\"`\n\n**sum_paid_traffic** (10 units): An estimation of the number of monthly visits that your target gets from paid search for a keyword.  \ntype: integer nullable\n\n**sum_paid_traffic_merged** (10 units): The paid traffic field optimized for sorting.  \ntype: integer\n\n**sum_paid_traffic_prev** (10 units): The paid traffic on the comparison date.  \ntype: integer nullable\n\n**sum_traffic** (10 units): An estimation of the number of monthly visitors that your target gets from organic search for a keyword.  \ntype: integer nullable\n\n**sum_traffic_merged** (10 units): The traffic field optimized for sorting.  \ntype: integer\n\n**sum_traffic_prev** (10 units): The traffic on the comparison date.  \ntype: integer nullable\n\n**title**: The title displayed for the page in a keyword's SERP.  \ntype: string\n\n**title_prev**: The title displayed for the page in a keyword's SERP on the comparison date.  \ntype: string\n\n**volume** (10 units): An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable\n\n**volume_desktop_pct**: The percentage of the total search volume that comes from desktop devices.  \ntype: float nullable\n\n**volume_merged** (10 units): The search volume field optimized for sorting.  \ntype: integer nullable\n\n**volume_mobile_pct**: The percentage of the total search volume that comes from mobile devices.  \ntype: float nullable\n\n**volume_prev** (10 units): The search volume on the comparison date.  \ntype: integer nullable\n\n**words**: The number of words in a keyword.  \ntype: integer\n\n**words_merged**: The number of words in a keyword optimized for sorting.  \ntype: integer\n\n**words_prev**: The number of words in a keyword on the comparison date.  \ntype: integer",
4172 |                     "type": "string"
4173 |                 },
4174 |                 "select": {
4175 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
4176 |                     "type": "string"
4177 |                 },
4178 |                 "protocol": {
4179 |                     "description": "The protocol of your target.",
4180 |                     "type": "string",
4181 |                     "enum": [
4182 |                         "both",
4183 |                         "http",
4184 |                         "https"
4185 |                     ]
4186 |                 },
4187 |                 "target": {
4188 |                     "description": "The target of the search: a domain or a URL.",
4189 |                     "type": "string"
4190 |                 },
4191 |                 "mode": {
4192 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
4193 |                     "type": "string",
4194 |                     "enum": [
4195 |                         "exact",
4196 |                         "prefix",
4197 |                         "domain",
4198 |                         "subdomains"
4199 |                     ]
4200 |                 },
4201 |                 "country": {
4202 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
4203 |                     "type": "string"
4204 |                 },
4205 |                 "date_compared": {
4206 |                     "description": "A date to compare metrics with in YYYY-MM-DD format.",
4207 |                     "type": "string",
4208 |                     "format": "date"
4209 |                 },
4210 |                 "date": {
4211 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
4212 |                     "type": "string",
4213 |                     "format": "date"
4214 |                 },
4215 |                 "volume_mode": {
4216 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
4217 |                     "type": "string",
4218 |                     "enum": [
4219 |                         "monthly",
4220 |                         "average"
4221 |                     ]
4222 |                 }
4223 |             },
4224 |             "required": [
4225 |                 "select",
4226 |                 "target",
4227 |                 "date"
4228 |             ],
4229 |             "type": "object"
4230 |         },
4231 |         "name": "site-explorer-organic-keywords"
4232 |     },
4233 |     {
4234 |         "_original_method": "GET",
4235 |         "_original_parameters": [
4236 |             {
4237 |                 "in": "query",
4238 |                 "name": "timeout",
4239 |                 "required": false
4240 |             },
4241 |             {
4242 |                 "in": "query",
4243 |                 "name": "offset",
4244 |                 "required": false
4245 |             },
4246 |             {
4247 |                 "in": "query",
4248 |                 "name": "limit",
4249 |                 "required": false
4250 |             },
4251 |             {
4252 |                 "in": "query",
4253 |                 "name": "order_by",
4254 |                 "required": false
4255 |             },
4256 |             {
4257 |                 "in": "query",
4258 |                 "name": "where",
4259 |                 "required": false
4260 |             },
4261 |             {
4262 |                 "in": "query",
4263 |                 "name": "select",
4264 |                 "required": true
4265 |             },
4266 |             {
4267 |                 "in": "query",
4268 |                 "name": "protocol",
4269 |                 "required": false
4270 |             },
4271 |             {
4272 |                 "in": "query",
4273 |                 "name": "target",
4274 |                 "required": true
4275 |             },
4276 |             {
4277 |                 "in": "query",
4278 |                 "name": "mode",
4279 |                 "required": false
4280 |             },
4281 |             {
4282 |                 "in": "query",
4283 |                 "name": "country",
4284 |                 "required": true
4285 |             },
4286 |             {
4287 |                 "in": "query",
4288 |                 "name": "date_compared",
4289 |                 "required": false
4290 |             },
4291 |             {
4292 |                 "in": "query",
4293 |                 "name": "date",
4294 |                 "required": true
4295 |             },
4296 |             {
4297 |                 "in": "query",
4298 |                 "name": "volume_mode",
4299 |                 "required": false
4300 |             },
4301 |             {
4302 |                 "in": "query",
4303 |                 "name": "output",
4304 |                 "required": false
4305 |             }
4306 |         ],
4307 |         "_original_path": "site-explorer/organic-competitors",
4308 |         "_original_request_body": null,
4309 |         "description": "Retrieves a list of organic search competitors for a specified website or URL, providing comparative SEO metrics such as common keywords, traffic estimations, and domain strength for a chosen country and date. Use doc tool first to get the real input schema.",
4310 |         "inputSchema": {
4311 |             "properties": {
4312 |                 "timeout": {
4313 |                     "type": "integer"
4314 |                 },
4315 |                 "limit": {
4316 |                     "type": "integer"
4317 |                 },
4318 |                 "order_by": {
4319 |                     "type": "string"
4320 |                 },
4321 |                 "where": {
4322 |                     "type": "string"
4323 |                 },
4324 |                 "select": {
4325 |                     "type": "string"
4326 |                 },
4327 |                 "protocol": {
4328 |                     "type": "string"
4329 |                 },
4330 |                 "target": {
4331 |                     "type": "string"
4332 |                 },
4333 |                 "mode": {
4334 |                     "type": "string"
4335 |                 },
4336 |                 "country": {
4337 |                     "type": "string"
4338 |                 },
4339 |                 "date_compared": {
4340 |                     "type": "string"
4341 |                 },
4342 |                 "date": {
4343 |                     "type": "string"
4344 |                 },
4345 |                 "volume_mode": {
4346 |                     "type": "string"
4347 |                 }
4348 |             },
4349 |             "required": [
4350 |                 "select",
4351 |                 "target",
4352 |                 "country",
4353 |                 "date"
4354 |             ],
4355 |             "type": "object"
4356 |         },
4357 |         "_inputSchema": {
4358 |             "properties": {
4359 |                 "timeout": {
4360 |                     "description": "A manual timeout duration in seconds.",
4361 |                     "type": "integer"
4362 |                 },
4363 |                 "limit": {
4364 |                     "description": "The number of results to return.",
4365 |                     "type": "integer"
4366 |                 },
4367 |                 "order_by": {
4368 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**competitor_domain**: A competitor's domain of your target in “domains\" group mode.  \ntype: string<domain> nullable  \n\n**competitor_url**: A competitor's URL of your target in pages\" group mode.  \ntype: string<url> nullable  \n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**group_mode**: To see competing pages instead, use the “exact URL” target mode or “path” target mode if your target doesn't have multiple pages.  \ntype: string  \nenum: `\"domains\"` `\"pages\"`  \n\n**keywords_common**: Organic keywords that both your target and a competitor are ranking for.  \ntype: integer  \n\n**keywords_competitor**: Organic keywords that a competitor is ranking for, but your target isn't.  \ntype: integer  \n\n**keywords_target**: Organic keywords that your target is ranking for, but a competitor isn't.  \ntype: integer  \n\n**pages**: The total number of pages from a target ranking in search results.  \ntype: integer nullable  \n\n**pages_diff**: The change in pages between your selected dates.  \ntype: integer  \n\n**pages_merged**: The pages field optimized for sorting.  \ntype: integer  \n\n**pages_prev**: The total number of pages from a target ranking in search results on the comparison date.  \ntype: integer nullable  \n\n**share**: The percentage of common keywords out of the total number of keywords that your target and a competitor both rank for.  \ntype: number<float>  \n\n**traffic**: (10 units) An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable  \n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer  \n\n**traffic_merged**: (10 units) The traffic field optimized for sorting.  \ntype: integer  \n\n**traffic_prev**: (10 units) An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter on the comparison date.  \ntype: integer nullable  \n\n**value**: (10 units) The estimated value of a page's monthly organic search traffic, in USD cents.  \ntype: integer nullable  \n\n**value_diff**: The change in value between your selected dates.  \ntype: integer  \n\n**value_merged**: (10 units) The value field optimized for sorting.  \ntype: integer nullable  \n\n**value_prev**: (10 units) The estimated value of a page's monthly organic search traffic, in USD cents on the comparison date.  \ntype: integer nullable  \n\n",
4369 |                     "type": "string"
4370 |                 },
4371 |                 "where": {
4372 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**competitor_domain**: A competitor's domain of your target in “domains\" group mode.  \ntype: domain nullable\n\n**competitor_url**: A competitor's URL of your target in pages\" group mode.  \ntype: url nullable\n\n**cpc_competitor**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents for a competitor.  \ntype: integer nullable\n\n**cpc_target**: Cost Per Click shows the average price that advertisers pay for each ad click in paid search results for a keyword, in USD cents for a target.  \ntype: integer nullable\n\n**domain_rating**: The strength of a domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**group_mode**: To see competing pages instead, use the “exact URL” target mode or “path” target mode if your target doesn't have multiple pages.  \ntype: string  \nenum: `\"domains\"` `\"pages\"`\n\n**keyword_difficulty_competitor** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale for a competitor.  \ntype: integer nullable\n\n**keyword_difficulty_target** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale for a target.  \ntype: integer nullable\n\n**keywords_common**: Organic keywords that both your target and a competitor are ranking for.  \ntype: integer\n\n**keywords_competitor**: Organic keywords that a competitor is ranking for, but your target isn't.  \ntype: integer\n\n**keywords_target**: Organic keywords that your target is ranking for, but a competitor isn't.  \ntype: integer\n\n**pages**: The total number of pages from a target ranking in search results.  \ntype: integer nullable\n\n**pages_diff**: The change in pages between your selected dates.  \ntype: integer\n\n**pages_merged**: The pages field optimized for sorting.  \ntype: integer\n\n**pages_prev**: The total number of pages from a target ranking in search results on the comparison date.  \ntype: integer nullable\n\n**share**: The percentage of common keywords out of the total number of keywords that your target and a competitor both rank for.  \ntype: float\n\n**traffic** (10 units): An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable\n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer\n\n**traffic_merged** (10 units): The traffic field optimized for sorting.  \ntype: integer\n\n**traffic_prev** (10 units): An estimation of the number of monthly visits that a page gets from organic search over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter on the comparison date.  \ntype: integer nullable\n\n**value** (10 units): The estimated value of a page's monthly organic search traffic, in USD cents.  \ntype: integer nullable\n\n**value_diff**: The change in value between your selected dates.  \ntype: integer\n\n**value_merged** (10 units): The value field optimized for sorting.  \ntype: integer nullable\n\n**value_prev** (10 units): The estimated value of a page's monthly organic search traffic, in USD cents on the comparison date.  \ntype: integer nullable\n\n**volume_competitor** (10 units): An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter for a competitor.  \ntype: integer nullable\n\n**volume_target** (10 units): An estimation of the average monthly number of searches for a keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter for a target.  \ntype: integer nullable\n\n**words_competitor**: The number of words in a keyword for a competitor.  \ntype: integer\n\n**words_target**: The number of words in a keyword for a target.  \ntype: integer",
4373 |                     "type": "string"
4374 |                 },
4375 |                 "select": {
4376 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
4377 |                     "type": "string"
4378 |                 },
4379 |                 "protocol": {
4380 |                     "description": "The protocol of your target.",
4381 |                     "type": "string",
4382 |                     "enum": [
4383 |                         "both",
4384 |                         "http",
4385 |                         "https"
4386 |                     ]
4387 |                 },
4388 |                 "target": {
4389 |                     "description": "The target of the search: a domain or a URL.",
4390 |                     "type": "string"
4391 |                 },
4392 |                 "mode": {
4393 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
4394 |                     "type": "string",
4395 |                     "enum": [
4396 |                         "exact",
4397 |                         "prefix",
4398 |                         "domain",
4399 |                         "subdomains"
4400 |                     ]
4401 |                 },
4402 |                 "country": {
4403 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
4404 |                     "type": "string"
4405 |                 },
4406 |                 "date_compared": {
4407 |                     "description": "A date to compare metrics with in YYYY-MM-DD format.",
4408 |                     "type": "string",
4409 |                     "format": "date"
4410 |                 },
4411 |                 "date": {
4412 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
4413 |                     "type": "string",
4414 |                     "format": "date"
4415 |                 },
4416 |                 "volume_mode": {
4417 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
4418 |                     "type": "string",
4419 |                     "enum": [
4420 |                         "monthly",
4421 |                         "average"
4422 |                     ]
4423 |                 }
4424 |             },
4425 |             "required": [
4426 |                 "select",
4427 |                 "target",
4428 |                 "country",
4429 |                 "date"
4430 |             ],
4431 |             "type": "object"
4432 |         },
4433 |         "name": "site-explorer-organic-competitors"
4434 |     },
4435 |     {
4436 |         "_original_method": "GET",
4437 |         "_original_parameters": [
4438 |             {
4439 |                 "in": "query",
4440 |                 "name": "timeout",
4441 |                 "required": false
4442 |             },
4443 |             {
4444 |                 "in": "query",
4445 |                 "name": "offset",
4446 |                 "required": false
4447 |             },
4448 |             {
4449 |                 "in": "query",
4450 |                 "name": "limit",
4451 |                 "required": false
4452 |             },
4453 |             {
4454 |                 "in": "query",
4455 |                 "name": "order_by",
4456 |                 "required": false
4457 |             },
4458 |             {
4459 |                 "in": "query",
4460 |                 "name": "where",
4461 |                 "required": false
4462 |             },
4463 |             {
4464 |                 "in": "query",
4465 |                 "name": "select",
4466 |                 "required": true
4467 |             },
4468 |             {
4469 |                 "in": "query",
4470 |                 "name": "protocol",
4471 |                 "required": false
4472 |             },
4473 |             {
4474 |                 "in": "query",
4475 |                 "name": "target",
4476 |                 "required": true
4477 |             },
4478 |             {
4479 |                 "in": "query",
4480 |                 "name": "mode",
4481 |                 "required": false
4482 |             },
4483 |             {
4484 |                 "in": "query",
4485 |                 "name": "country",
4486 |                 "required": false
4487 |             },
4488 |             {
4489 |                 "in": "query",
4490 |                 "name": "date_compared",
4491 |                 "required": false
4492 |             },
4493 |             {
4494 |                 "in": "query",
4495 |                 "name": "date",
4496 |                 "required": true
4497 |             },
4498 |             {
4499 |                 "in": "query",
4500 |                 "name": "volume_mode",
4501 |                 "required": false
4502 |             },
4503 |             {
4504 |                 "in": "query",
4505 |                 "name": "output",
4506 |                 "required": false
4507 |             }
4508 |         ],
4509 |         "_original_path": "site-explorer/top-pages",
4510 |         "_original_request_body": null,
4511 |         "description": "Returns a list of the top-performing pages for a specified website or URL, including detailed SEO metrics (such as organic rankings, traffic, top keyword, and changes over time), with support for comparison between two dates and flexible filtering. Use doc tool first to get the real input schema.",
4512 |         "inputSchema": {
4513 |             "properties": {
4514 |                 "timeout": {
4515 |                     "type": "integer"
4516 |                 },
4517 |                 "limit": {
4518 |                     "type": "integer"
4519 |                 },
4520 |                 "order_by": {
4521 |                     "type": "string"
4522 |                 },
4523 |                 "where": {
4524 |                     "type": "string"
4525 |                 },
4526 |                 "select": {
4527 |                     "type": "string"
4528 |                 },
4529 |                 "protocol": {
4530 |                     "type": "string"
4531 |                 },
4532 |                 "target": {
4533 |                     "type": "string"
4534 |                 },
4535 |                 "mode": {
4536 |                     "type": "string"
4537 |                 },
4538 |                 "country": {
4539 |                     "type": "string"
4540 |                 },
4541 |                 "date_compared": {
4542 |                     "type": "string"
4543 |                 },
4544 |                 "date": {
4545 |                     "type": "string"
4546 |                 },
4547 |                 "volume_mode": {
4548 |                     "type": "string"
4549 |                 }
4550 |             },
4551 |             "required": [
4552 |                 "select",
4553 |                 "target",
4554 |                 "date"
4555 |             ],
4556 |             "type": "object"
4557 |         },
4558 |         "_inputSchema": {
4559 |             "properties": {
4560 |                 "timeout": {
4561 |                     "description": "A manual timeout duration in seconds.",
4562 |                     "type": "integer"
4563 |                 },
4564 |                 "limit": {
4565 |                     "description": "The number of results to return.",
4566 |                     "type": "integer"
4567 |                 },
4568 |                 "order_by": {
4569 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**keywords**: The total number of keywords that your target ranks for in the top 100 organic search results.  \ntype: integer nullable  \n\n**keywords_diff**: The change in keywords between your selected dates.  \ntype: integer  \n\n**keywords_diff_percent**: The change in keywords between your selected dates, in percents.  \ntype: integer  \n\n**keywords_merged**: The total number of keywords optimized for sorting.  \ntype: integer  \n\n**keywords_prev**: The keyword your target ranks for on the comparison date.  \ntype: integer nullable  \n\n**raw_url**: The ranking page URL in encoded format.  \ntype: string  \n\n**raw_url_prev**: The ranking page URL on the comparison date in encoded format.  \ntype: string nullable  \n\n**status**: The status of a page: the new page that just started to rank (\"left\"), the lost page that disappeared from search results (\"right\"), or no change (\"both\").  \ntype: string  \nenum: `\"left\"` `\"right\"` `\"both\"`  \n\n**sum_traffic**: (10 units) An estimation of the monthly organic search traffic that a page gets from all the keywords that it ranks for.  \ntype: integer nullable  \n\n**sum_traffic_merged**: (10 units) The traffic field optimized for sorting.  \ntype: integer  \n\n**sum_traffic_prev**: (10 units) The traffic on the comparison date.  \ntype: integer nullable  \n\n**top_keyword**: The keyword that brings the most organic traffic to a page.  \ntype: string nullable  \n\n**top_keyword_best_position**: The ranking position that a page holds for its top keyword.  \ntype: integer nullable  \n\n**top_keyword_best_position_diff**: The change in the top position between your selected dates.  \ntype: integer nullable  \n\n**top_keyword_best_position_kind**: The kind of the top position: organic, paid or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**top_keyword_best_position_kind_prev**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**top_keyword_best_position_prev**: The top position on the comparison date.  \ntype: integer nullable  \n\n**top_keyword_best_position_title**: The title displayed for the page in its top keyword's SERP.  \ntype: string nullable  \n\n**top_keyword_best_position_title_prev**: The title displayed for the page in its top keyword's SERP on the comparison date.  \ntype: string nullable  \n\n**top_keyword_country**: The country in which a page ranks for its top keyword.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**top_keyword_country_prev**: The country in which a page ranks for its top keyword on the comparison date.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**top_keyword_prev**: The keyword that brings the most organic traffic to a page on the comparison date.  \ntype: string nullable  \n\n**top_keyword_volume**: (10 units) An estimation of the average monthly number of searches for the top keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable  \n\n**top_keyword_volume_prev**: (10 units) The search volume on the comparison date.  \ntype: integer nullable  \n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer  \n\n**traffic_diff_percent**: The change in traffic between your selected dates, in percents.  \ntype: integer  \n\n**url**: The ranking page URL.  \ntype: string<url> nullable  \n\n**url_prev**: The ranking page URL on the comparison date.  \ntype: string<url> nullable  \n\n**value**: (10 units) The estimated value of a page's monthly organic search traffic, in USD cents.  \ntype: integer nullable  \n\n**value_diff**: The change in traffic value between your selected dates.  \ntype: integer  \n\n**value_diff_percent**: The change in traffic value between your selected dates, in percents.  \ntype: integer  \n\n**value_merged**: (10 units) The traffic value field optimized for sorting.  \ntype: integer nullable  \n\n**value_prev**: (10 units) The traffic value on the comparison date.  \ntype: integer nullable  \n\n",
4570 |                     "type": "string"
4571 |                 },
4572 |                 "where": {
4573 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**cpc**  \ntype: integer nullable\n\n**cpc_prev**: The CPC metric on the comparison date.  \ntype: integer nullable\n\n**has_thumbnail**: The position has a thumbnail.  \ntype: boolean\n\n**has_thumbnail_prev**: The position has a thumbnail on the comparison date.  \ntype: boolean\n\n**has_video**: The position has a video.  \ntype: boolean\n\n**has_video_prev**: The position has a video on the comparison date.  \ntype: boolean\n\n**keyword**: The keyword your target ranks for.  \ntype: string\n\n**keyword_difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**keyword_difficulty_prev** (10 units): The keyword difficulty on the comparison date.  \ntype: integer nullable\n\n**keyword_prev**: The keyword your target ranks for on the comparison date.  \ntype: string\n\n**keywords**: The total number of keywords that your target ranks for in the top 100 organic search results.  \ntype: integer\n\n**keywords_diff**: The change in keywords between your selected dates.  \ntype: integer\n\n**keywords_diff_percent**: The change in keywords between your selected dates, in percents.  \ntype: integer\n\n**keywords_merged**: The total number of keywords optimized for sorting.  \ntype: integer\n\n**keywords_prev**: The keyword your target ranks for on the comparison date.  \ntype: integer\n\n**position**: The position your target ranks for in the organic search results for a keyword.  \ntype: integer\n\n**position_kind**: The kind of a position: organic, paid or a SERP feature. This applies to all positions for a given keyword and URL before picking the top position.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**position_kind_prev**: The kind of a position on the comparison date.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**position_prev**: The position of your target for a given keyword on the comparison date.  \ntype: integer\n\n**raw_url**: The ranking page URL in encoded format.  \ntype: string\n\n**raw_url_prev**: The ranking page URL on the comparison date in encoded format.  \ntype: string\n\n**serp_features**  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_features_prev**: The SERP features on the comparison date.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**status**: The status of a page: the new page that just started to rank (\"left\"), the lost page that disappeared from search results (\"right\"), or no change (\"both\").  \ntype: string  \nenum: `\"left\"` `\"right\"` `\"both\"`\n\n**sum_traffic** (10 units): An estimation of the monthly organic search traffic that a page gets from all the keywords that it ranks for.  \ntype: integer nullable\n\n**sum_traffic_merged** (10 units): The traffic field optimized for sorting.  \ntype: integer\n\n**sum_traffic_prev** (10 units): The traffic on the comparison date.  \ntype: integer nullable\n\n**top_keyword**: The keyword that brings the most organic traffic to a page.  \ntype: string nullable\n\n**top_keyword_best_position**: The ranking position that a page holds for its top keyword.  \ntype: integer nullable\n\n**top_keyword_best_position_diff**: The change in the top position between your selected dates.  \ntype: integer nullable\n\n**top_keyword_best_position_kind**: The kind of the top position: organic, paid or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**top_keyword_best_position_kind_prev**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**top_keyword_best_position_prev**: The top position on the comparison date.  \ntype: integer nullable\n\n**top_keyword_best_position_title**: The title displayed for the page in its top keyword's SERP.  \ntype: string nullable\n\n**top_keyword_best_position_title_prev**: The title displayed for the page in its top keyword's SERP on the comparison date.  \ntype: string nullable\n\n**top_keyword_country**: The country in which a page ranks for its top keyword.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**top_keyword_country_prev**: The country in which a page ranks for its top keyword on the comparison date.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**top_keyword_prev**: The keyword that brings the most organic traffic to a page on the comparison date.  \ntype: string nullable\n\n**top_keyword_volume** (10 units): An estimation of the average monthly number of searches for the top keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable\n\n**top_keyword_volume_prev** (10 units): The search volume on the comparison date.  \ntype: integer nullable\n\n**traffic** (10 units): An estimation of the number of monthly visitors that your target gets from organic search for a keyword.  \ntype: integer\n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer\n\n**traffic_diff_percent**: The change in traffic between your selected dates, in percents.  \ntype: integer\n\n**traffic_prev** (10 units): The traffic from a keyword on the comparison date.  \ntype: integer\n\n**url**: The ranking page URL.  \ntype: url nullable\n\n**url_prev**: The ranking page URL on the comparison date.  \ntype: url nullable\n\n**value** (10 units): The estimated value of a page's monthly organic search traffic, in USD cents.  \ntype: integer nullable\n\n**value_diff**: The change in traffic value between your selected dates.  \ntype: integer\n\n**value_diff_percent**: The change in traffic value between your selected dates, in percents.  \ntype: integer\n\n**value_merged** (10 units): The traffic value field optimized for sorting.  \ntype: integer nullable\n\n**value_prev** (10 units): The traffic value on the comparison date.  \ntype: integer nullable\n\n**volume** (10 units): An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable\n\n**volume_prev** (10 units): The search volume on the comparison date.  \ntype: integer nullable\n\n**words**: The number of words in a keyword.  \ntype: integer\n\n**words_prev**: The number of words in a keyword on the comparison date.  \ntype: integer",
4574 |                     "type": "string"
4575 |                 },
4576 |                 "select": {
4577 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
4578 |                     "type": "string"
4579 |                 },
4580 |                 "protocol": {
4581 |                     "description": "The protocol of your target.",
4582 |                     "type": "string",
4583 |                     "enum": [
4584 |                         "both",
4585 |                         "http",
4586 |                         "https"
4587 |                     ]
4588 |                 },
4589 |                 "target": {
4590 |                     "description": "The target of the search: a domain or a URL.",
4591 |                     "type": "string"
4592 |                 },
4593 |                 "mode": {
4594 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
4595 |                     "type": "string",
4596 |                     "enum": [
4597 |                         "exact",
4598 |                         "prefix",
4599 |                         "domain",
4600 |                         "subdomains"
4601 |                     ]
4602 |                 },
4603 |                 "country": {
4604 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
4605 |                     "type": "string"
4606 |                 },
4607 |                 "date_compared": {
4608 |                     "description": "A date to compare metrics with in YYYY-MM-DD format.",
4609 |                     "type": "string",
4610 |                     "format": "date"
4611 |                 },
4612 |                 "date": {
4613 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
4614 |                     "type": "string",
4615 |                     "format": "date"
4616 |                 },
4617 |                 "volume_mode": {
4618 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
4619 |                     "type": "string",
4620 |                     "enum": [
4621 |                         "monthly",
4622 |                         "average"
4623 |                     ]
4624 |                 }
4625 |             },
4626 |             "required": [
4627 |                 "select",
4628 |                 "target",
4629 |                 "date"
4630 |             ],
4631 |             "type": "object"
4632 |         },
4633 |         "name": "site-explorer-top-pages"
4634 |     },
4635 |     {
4636 |         "_original_method": "GET",
4637 |         "_original_parameters": [
4638 |             {
4639 |                 "in": "query",
4640 |                 "name": "timeout",
4641 |                 "required": false
4642 |             },
4643 |             {
4644 |                 "in": "query",
4645 |                 "name": "offset",
4646 |                 "required": false
4647 |             },
4648 |             {
4649 |                 "in": "query",
4650 |                 "name": "limit",
4651 |                 "required": false
4652 |             },
4653 |             {
4654 |                 "in": "query",
4655 |                 "name": "order_by",
4656 |                 "required": false
4657 |             },
4658 |             {
4659 |                 "in": "query",
4660 |                 "name": "where",
4661 |                 "required": false
4662 |             },
4663 |             {
4664 |                 "in": "query",
4665 |                 "name": "select",
4666 |                 "required": true
4667 |             },
4668 |             {
4669 |                 "in": "query",
4670 |                 "name": "protocol",
4671 |                 "required": false
4672 |             },
4673 |             {
4674 |                 "in": "query",
4675 |                 "name": "target",
4676 |                 "required": true
4677 |             },
4678 |             {
4679 |                 "in": "query",
4680 |                 "name": "mode",
4681 |                 "required": false
4682 |             },
4683 |             {
4684 |                 "in": "query",
4685 |                 "name": "country",
4686 |                 "required": false
4687 |             },
4688 |             {
4689 |                 "in": "query",
4690 |                 "name": "date_compared",
4691 |                 "required": false
4692 |             },
4693 |             {
4694 |                 "in": "query",
4695 |                 "name": "date",
4696 |                 "required": true
4697 |             },
4698 |             {
4699 |                 "in": "query",
4700 |                 "name": "volume_mode",
4701 |                 "required": false
4702 |             },
4703 |             {
4704 |                 "in": "query",
4705 |                 "name": "output",
4706 |                 "required": false
4707 |             }
4708 |         ],
4709 |         "_original_path": "site-explorer/paid-pages",
4710 |         "_original_request_body": null,
4711 |         "description": "Returns detailed metrics about pages on a specified site or URL that are ranking in paid search results, including traffic, keyword data, ad presence, and changes over time, with powerful filtering and comparison capabilities. Use doc tool first to get the real input schema.",
4712 |         "inputSchema": {
4713 |             "properties": {
4714 |                 "timeout": {
4715 |                     "type": "integer"
4716 |                 },
4717 |                 "limit": {
4718 |                     "type": "integer"
4719 |                 },
4720 |                 "order_by": {
4721 |                     "type": "string"
4722 |                 },
4723 |                 "where": {
4724 |                     "type": "string"
4725 |                 },
4726 |                 "select": {
4727 |                     "type": "string"
4728 |                 },
4729 |                 "protocol": {
4730 |                     "type": "string"
4731 |                 },
4732 |                 "target": {
4733 |                     "type": "string"
4734 |                 },
4735 |                 "mode": {
4736 |                     "type": "string"
4737 |                 },
4738 |                 "country": {
4739 |                     "type": "string"
4740 |                 },
4741 |                 "date_compared": {
4742 |                     "type": "string"
4743 |                 },
4744 |                 "date": {
4745 |                     "type": "string"
4746 |                 },
4747 |                 "volume_mode": {
4748 |                     "type": "string"
4749 |                 }
4750 |             },
4751 |             "required": [
4752 |                 "select",
4753 |                 "target",
4754 |                 "date"
4755 |             ],
4756 |             "type": "object"
4757 |         },
4758 |         "_inputSchema": {
4759 |             "properties": {
4760 |                 "timeout": {
4761 |                     "description": "A manual timeout duration in seconds.",
4762 |                     "type": "integer"
4763 |                 },
4764 |                 "limit": {
4765 |                     "description": "The number of results to return.",
4766 |                     "type": "integer"
4767 |                 },
4768 |                 "order_by": {
4769 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**ads_count**: The number of unique ads with a page.  \ntype: integer nullable  \n\n**ads_count_diff**: The change in ads between your selected dates.  \ntype: integer  \n\n**ads_count_prev**: The number of ads on the comparison date.  \ntype: integer nullable  \n\n**keywords**: The total number of keywords that your target ranks for in paid search results.  \ntype: integer nullable  \n\n**keywords_diff**: The change in keywords between your selected dates.  \ntype: integer  \n\n**keywords_diff_percent**: The change in keywords between your selected dates, in percents.  \ntype: integer  \n\n**keywords_merged**: The total number of keywords optimized for sorting.  \ntype: integer  \n\n**keywords_prev**: The keyword your target ranks for on the comparison date.  \ntype: integer nullable  \n\n**raw_url**: The ranking page URL in encoded format.  \ntype: string  \n\n**raw_url_prev**: The ranking page URL on the comparison date in encoded format.  \ntype: string nullable  \n\n**status**: The status of a page: the new page that just started to rank in paid results (\"left\"), the lost page that disappeared from paid results (\"right\"), or no change (\"both\").  \ntype: string  \nenum: `\"left\"` `\"right\"` `\"both\"`  \n\n**sum_traffic**: (10 units) An estimation of the monthly paid search traffic that a page gets from all the keywords that it ranks for.  \ntype: integer nullable  \n\n**sum_traffic_merged**: (10 units) The paid traffic field optimized for sorting.  \ntype: integer  \n\n**sum_traffic_prev**: (10 units) The paid traffic on the comparison date.  \ntype: integer nullable  \n\n**top_keyword**: The keyword that brings the most paid traffic to a page.  \ntype: string nullable  \n\n**top_keyword_best_position**: The ranking position that a page holds for its top keyword.  \ntype: integer nullable  \n\n**top_keyword_best_position_diff**: The change in the top position between your selected dates.  \ntype: integer nullable  \n\n**top_keyword_best_position_kind**: The kind of the top position: organic, paid or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**top_keyword_best_position_kind_prev**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`  \n\n**top_keyword_best_position_prev**: The top position on the comparison date.  \ntype: integer nullable  \n\n**top_keyword_best_position_title**: The title displayed for the page in its top keyword's SERP.  \ntype: string nullable  \n\n**top_keyword_best_position_title_prev**: The title displayed for the page in its top keyword's SERP on the comparison date.  \ntype: string nullable  \n\n**top_keyword_country**: The country in which a page ranks for its top keyword.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**top_keyword_country_prev**: The country in which a page ranks for its top keyword on the comparison date.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`  \n\n**top_keyword_prev**: The keyword that brings the most paid traffic to a page on the comparison date.  \ntype: string nullable  \n\n**top_keyword_volume**: (10 units) An estimation of the average monthly number of searches for the top keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable  \n\n**top_keyword_volume_prev**: (10 units) The search volume on the comparison date.  \ntype: integer nullable  \n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer  \n\n**traffic_diff_percent**: The change in traffic between your selected dates, in percents.  \ntype: integer  \n\n**url**: The ranking page URL.  \ntype: string<url> nullable  \n\n**url_prev**: The ranking page URL on the comparison date.  \ntype: string<url> nullable  \n\n**value**: (10 units) The estimated cost of a page's monthly paid search traffic, in USD cents.  \ntype: integer nullable  \n\n**value_diff**: The change in traffic value between your selected dates.  \ntype: integer  \n\n**value_diff_percent**: The change in traffic value between your selected dates, in percents.  \ntype: integer  \n\n**value_merged**: (10 units) The traffic value field optimized for sorting.  \ntype: integer nullable  \n\n**value_prev**: (10 units) The traffic value on the comparison date.  \ntype: integer nullable  \n\n",
4770 |                     "type": "string"
4771 |                 },
4772 |                 "where": {
4773 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**ads_count**: The number of unique ads with a page.  \ntype: integer\n\n**ads_count_diff**: The change in ads between your selected dates.  \ntype: integer\n\n**ads_count_prev**: The number of ads on the comparison date.  \ntype: integer\n\n**cpc**  \ntype: integer nullable\n\n**cpc_prev**: The CPC metric on the comparison date.  \ntype: integer nullable\n\n**description**: The description of an ad as seen in search results.  \ntype: string\n\n**description_prev**: The description of an ad on the comparison date.  \ntype: string\n\n**has_thumbnail**: The position has a thumbnail.  \ntype: boolean\n\n**has_thumbnail_prev**: The position has a thumbnail on the comparison date.  \ntype: boolean\n\n**has_video**: The position has a video.  \ntype: boolean\n\n**has_video_prev**: The position has a video on the comparison date.  \ntype: boolean\n\n**keyword**: The keyword your target ranks for.  \ntype: string\n\n**keyword_difficulty** (10 units): An estimation of how hard it is to rank in the top 10 organic search results for a keyword on a 100-point scale.  \ntype: integer nullable\n\n**keyword_difficulty_prev** (10 units): The keyword difficulty on the comparison date.  \ntype: integer nullable\n\n**keyword_prev**: The keyword your target ranks for on the comparison date.  \ntype: string\n\n**keywords**: The total number of keywords that your target ranks for in paid search results.  \ntype: integer\n\n**keywords_diff**: The change in keywords between your selected dates.  \ntype: integer\n\n**keywords_diff_percent**: The change in keywords between your selected dates, in percents.  \ntype: integer\n\n**keywords_merged**: The total number of keywords optimized for sorting.  \ntype: integer\n\n**keywords_prev**: The keyword your target ranks for on the comparison date.  \ntype: integer\n\n**position**: The position your target ranks for in the paid search results for a keyword.  \ntype: integer\n\n**position_kind**: The kind of a position: organic, paid or a SERP feature. This applies to all positions for a given keyword and URL before picking the top position.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**position_kind_prev**: The kind of a position on the comparison date.  \ntype: string  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**position_prev**: The position of your target for a given keyword on the comparison date.  \ntype: integer\n\n**raw_url**: The ranking page URL in encoded format.  \ntype: string\n\n**raw_url_prev**: The ranking page URL on the comparison date in encoded format.  \ntype: string\n\n**serp_features**  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**serp_features_prev**: The SERP features on the comparison date.  \ntype: array(string)  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"` `\"image_th\"` `\"video_th\"` `\"ai_overview_found\"`\n\n**status**: The status of a page: the new page that just started to rank in paid results (\"left\"), the lost page that disappeared from paid results (\"right\"), or no change (\"both\").  \ntype: string  \nenum: `\"left\"` `\"right\"` `\"both\"`\n\n**sum_traffic** (10 units): An estimation of the monthly paid search traffic that a page gets from all the keywords that it ranks for.  \ntype: integer nullable\n\n**sum_traffic_merged** (10 units): The paid traffic field optimized for sorting.  \ntype: integer\n\n**sum_traffic_prev** (10 units): The paid traffic on the comparison date.  \ntype: integer nullable\n\n**title**: The title of an ad as seen in search results.  \ntype: string\n\n**title_prev**: The title of an ad on the comparison date.  \ntype: string\n\n**top_keyword**: The keyword that brings the most paid traffic to a page.  \ntype: string nullable\n\n**top_keyword_best_position**: The ranking position that a page holds for its top keyword.  \ntype: integer nullable\n\n**top_keyword_best_position_diff**: The change in the top position between your selected dates.  \ntype: integer nullable\n\n**top_keyword_best_position_kind**: The kind of the top position: organic, paid or a SERP feature.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**top_keyword_best_position_kind_prev**: The kind of the top position on the comparison date.  \ntype: string nullable  \nenum: `\"paid_top\"` `\"paid_bottom\"` `\"paid_right\"` `\"paid_sitelink\"` `\"organic\"` `\"sitelink\"` `\"snippet\"` `\"image\"` `\"article\"` `\"knowledge_card\"` `\"knowledge_panel\"` `\"local_pack\"` `\"local_teaser\"` `\"news\"` `\"question\"` `\"review\"` `\"shopping\"` `\"tweet\"` `\"spelling\"` `\"video\"` `\"discussion\"` `\"ai_overview\"` `\"ai_overview_sitelink\"` `\"organic_shopping\"`\n\n**top_keyword_best_position_prev**: The top position on the comparison date.  \ntype: integer nullable\n\n**top_keyword_best_position_title**: The title displayed for the page in its top keyword's SERP.  \ntype: string nullable\n\n**top_keyword_best_position_title_prev**: The title displayed for the page in its top keyword's SERP on the comparison date.  \ntype: string nullable\n\n**top_keyword_country**: The country in which a page ranks for its top keyword.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**top_keyword_country_prev**: The country in which a page ranks for its top keyword on the comparison date.  \ntype: string nullable  \nenum: `\"AD\"` .. `\"ZW\"`\n\n**top_keyword_prev**: The keyword that brings the most paid traffic to a page on the comparison date.  \ntype: string nullable\n\n**top_keyword_volume** (10 units): An estimation of the average monthly number of searches for the top keyword over the latest month or over the latest known 12 months of data depending on the \"volume_mode\" parameter.  \ntype: integer nullable\n\n**top_keyword_volume_prev** (10 units): The search volume on the comparison date.  \ntype: integer nullable\n\n**traffic** (10 units): An estimation of the number of monthly visitors that your target gets from paid search for a keyword.  \ntype: integer\n\n**traffic_diff**: The change in traffic between your selected dates.  \ntype: integer\n\n**traffic_diff_percent**: The change in traffic between your selected dates, in percents.  \ntype: integer\n\n**traffic_prev** (10 units): The traffic from a keyword on the comparison date.  \ntype: integer\n\n**url**: The ranking page URL.  \ntype: url nullable\n\n**url_prev**: The ranking page URL on the comparison date.  \ntype: url nullable\n\n**url_visual**: The URL of an ad as seen in search results.  \ntype: string\n\n**url_visual_prev**: The URL of an ad on the comparison date.  \ntype: string\n\n**value** (10 units): The estimated cost of a page's monthly paid search traffic, in USD cents.  \ntype: integer nullable\n\n**value_diff**: The change in traffic value between your selected dates.  \ntype: integer\n\n**value_diff_percent**: The change in traffic value between your selected dates, in percents.  \ntype: integer\n\n**value_merged** (10 units): The traffic value field optimized for sorting.  \ntype: integer nullable\n\n**value_prev** (10 units): The traffic value on the comparison date.  \ntype: integer nullable\n\n**volume** (10 units): An estimation of the number of searches for a keyword over the latest month.  \ntype: integer nullable\n\n**volume_prev** (10 units): The search volume on the comparison date.  \ntype: integer nullable\n\n**words**: The number of words in a keyword.  \ntype: integer\n\n**words_prev**: The number of words in a keyword on the comparison date.  \ntype: integer",
4774 |                     "type": "string"
4775 |                 },
4776 |                 "select": {
4777 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
4778 |                     "type": "string"
4779 |                 },
4780 |                 "protocol": {
4781 |                     "description": "The protocol of your target.",
4782 |                     "type": "string",
4783 |                     "enum": [
4784 |                         "both",
4785 |                         "http",
4786 |                         "https"
4787 |                     ]
4788 |                 },
4789 |                 "target": {
4790 |                     "description": "The target of the search: a domain or a URL.",
4791 |                     "type": "string"
4792 |                 },
4793 |                 "mode": {
4794 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
4795 |                     "type": "string",
4796 |                     "enum": [
4797 |                         "exact",
4798 |                         "prefix",
4799 |                         "domain",
4800 |                         "subdomains"
4801 |                     ]
4802 |                 },
4803 |                 "country": {
4804 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
4805 |                     "type": "string"
4806 |                 },
4807 |                 "date_compared": {
4808 |                     "description": "A date to compare metrics with in YYYY-MM-DD format.",
4809 |                     "type": "string",
4810 |                     "format": "date"
4811 |                 },
4812 |                 "date": {
4813 |                     "description": "A date to report metrics on in YYYY-MM-DD format.",
4814 |                     "type": "string",
4815 |                     "format": "date"
4816 |                 },
4817 |                 "volume_mode": {
4818 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
4819 |                     "type": "string",
4820 |                     "enum": [
4821 |                         "monthly",
4822 |                         "average"
4823 |                     ]
4824 |                 }
4825 |             },
4826 |             "required": [
4827 |                 "select",
4828 |                 "target",
4829 |                 "date"
4830 |             ],
4831 |             "type": "object"
4832 |         },
4833 |         "name": "site-explorer-paid-pages"
4834 |     },
4835 |     {
4836 |         "_original_method": "GET",
4837 |         "_original_parameters": [
4838 |             {
4839 |                 "in": "query",
4840 |                 "name": "timeout",
4841 |                 "required": false
4842 |             },
4843 |             {
4844 |                 "in": "query",
4845 |                 "name": "offset",
4846 |                 "required": false
4847 |             },
4848 |             {
4849 |                 "in": "query",
4850 |                 "name": "limit",
4851 |                 "required": false
4852 |             },
4853 |             {
4854 |                 "in": "query",
4855 |                 "name": "order_by",
4856 |                 "required": false
4857 |             },
4858 |             {
4859 |                 "in": "query",
4860 |                 "name": "where",
4861 |                 "required": false
4862 |             },
4863 |             {
4864 |                 "in": "query",
4865 |                 "name": "select",
4866 |                 "required": true
4867 |             },
4868 |             {
4869 |                 "in": "query",
4870 |                 "name": "protocol",
4871 |                 "required": false
4872 |             },
4873 |             {
4874 |                 "in": "query",
4875 |                 "name": "target",
4876 |                 "required": true
4877 |             },
4878 |             {
4879 |                 "in": "query",
4880 |                 "name": "mode",
4881 |                 "required": false
4882 |             },
4883 |             {
4884 |                 "in": "query",
4885 |                 "name": "history",
4886 |                 "required": false
4887 |             },
4888 |             {
4889 |                 "in": "query",
4890 |                 "name": "output",
4891 |                 "required": false
4892 |             }
4893 |         ],
4894 |         "_original_path": "site-explorer/best-by-external-links",
4895 |         "_original_request_body": null,
4896 |         "description": "Returns a list of a site's or URL's best-performing pages, ranked by the number of referring external links, with flexible filtering and sorting options. Use doc tool first to get the real input schema.",
4897 |         "inputSchema": {
4898 |             "properties": {
4899 |                 "timeout": {
4900 |                     "type": "integer"
4901 |                 },
4902 |                 "limit": {
4903 |                     "type": "integer"
4904 |                 },
4905 |                 "order_by": {
4906 |                     "type": "string"
4907 |                 },
4908 |                 "where": {
4909 |                     "type": "string"
4910 |                 },
4911 |                 "select": {
4912 |                     "type": "string"
4913 |                 },
4914 |                 "protocol": {
4915 |                     "type": "string"
4916 |                 },
4917 |                 "target": {
4918 |                     "type": "string"
4919 |                 },
4920 |                 "mode": {
4921 |                     "type": "string"
4922 |                 },
4923 |                 "history": {
4924 |                     "type": "string"
4925 |                 }
4926 |             },
4927 |             "required": [
4928 |                 "select",
4929 |                 "target"
4930 |             ],
4931 |             "type": "object"
4932 |         },
4933 |         "_inputSchema": {
4934 |             "properties": {
4935 |                 "timeout": {
4936 |                     "description": "A manual timeout duration in seconds.",
4937 |                     "type": "integer"
4938 |                 },
4939 |                 "limit": {
4940 |                     "description": "The number of results to return.",
4941 |                     "type": "integer"
4942 |                 },
4943 |                 "order_by": {
4944 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**dofollow_to_target**: The number of links to your target page that don’t have the “nofollow” attribute.  \ntype: integer  \n\n**first_seen_link**: The date we first found a link to your target.  \ntype: string<date-time>  \n\n**http_code_target**: The return code from HTTP protocol returned during the target page crawl.  \ntype: integer nullable  \n\n**languages_target**: The languages listed in the target page metadata or detected by the crawler to appear in the HTML.  \ntype: array[string]  \n\n**last_seen**: The date your target page lost its last live link.  \ntype: string<date-time> nullable  \n\n**last_visited_source**: The date we last verified a live link to your target page.  \ntype: string<date-time>  \n\n**last_visited_target**: The date we last crawled your target page.  \ntype: string<date-time> nullable  \n\n**links_to_target**: The number of inbound backlinks the target page has.  \ntype: integer  \n\n**lost_links_to_target**: The number of backlinks lost during the selected time period.  \ntype: integer  \n\n**new_links_to_target**: The number of new backlinks found during the selected time period.  \ntype: integer  \n\n**nofollow_to_target**: The number of links to your target page that have the “nofollow” attribute.  \ntype: integer  \n\n**powered_by_target**: Web technologies used to build and serve the target page content.  \ntype: array[string]  \n\n**redirects_to_target**: The number of inbound redirects to your target page.  \ntype: integer  \n\n**refdomains_target**: (5 units) The number of unique referring domains linking to the target page.  \ntype: integer  \n\n**target_redirect**: The target's redirect if any.  \ntype: string nullable  \n\n**title_target**: The html title of the target page.  \ntype: string nullable  \n\n**top_domain_rating_source**: The highest Domain Rating (DR) counted out of all referring domains. DR shows the strength of a website’s backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float>  \n\n**url_rating_target**: The strength of the target page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float> nullable  \n\n**url_to**: The URL the backlink points to.  \ntype: string<url>  \n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string  \n\n",
4945 |                     "type": "string"
4946 |                 },
4947 |                 "where": {
4948 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**dofollow_to_target**: The number of links to your target page that don’t have the “nofollow” attribute.  \ntype: integer\n\n**domain_rating_source**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**first_seen_link**: The date we first found a link to your target.  \ntype: datetime\n\n**http_code_source**: The return code from HTTP protocol returned during the referring page crawl.  \ntype: integer\n\n**http_code_target**: The return code from HTTP protocol returned during the target page crawl.  \ntype: integer nullable\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_homepage_link**: The link was found on the homepage of a referring website.  \ntype: boolean\n\n**is_lost**: The link currently does not exist anymore.  \ntype: boolean\n\n**is_new**: The link was discovered on the last crawl.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_root_source**: The referring domain name is a root domain name.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**languages_source**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**languages_target**: The languages listed in the target page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**last_seen**: The date your target page lost its last live link.  \ntype: datetime nullable\n\n**last_visited_source**: The date we last verified a live link to your target page.  \ntype: datetime\n\n**last_visited_target**: The date we last crawled your target page.  \ntype: datetime nullable\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains_source**: The number of unique root domains linked from the referring page.  \ntype: integer\n\n**links_external_source**: The number of external links from the referring page.  \ntype: integer\n\n**links_to_target**: The number of inbound backlinks the target page has.  \ntype: integer\n\n**lost_links_to_target**: The number of backlinks lost during the selected time period.  \ntype: integer\n\n**new_links_to_target**: The number of new backlinks found during the selected time period.  \ntype: integer\n\n**nofollow_to_target**: The number of links to your target page that have the “nofollow” attribute.  \ntype: integer\n\n**positions_source**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by_source**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**powered_by_target**: Web technologies used to build and serve the target page content.  \ntype: array(string)\n\n**redirects_to_target**: The number of inbound redirects to your target page.  \ntype: integer\n\n**refdomains_source** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**refdomains_target** (5 units): The number of unique referring domains linking to the target page.  \ntype: integer\n\n**root_name_source**: The root domain name of the referring domain, not including subdomains.  \ntype: string\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**source_page_author**: The author of the referring page.  \ntype: string nullable\n\n**target_redirect**: The target's redirect if any.  \ntype: string nullable\n\n**title_source**: The html title of the referring page.  \ntype: string\n\n**title_target**: The html title of the target page.  \ntype: string nullable\n\n**top_domain_rating_source**: The highest Domain Rating (DR) counted out of all referring domains. DR shows the strength of a website’s backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**traffic_domain_source** (10 units): The referring domain's estimated monthly organic traffic from search.  \ntype: integer\n\n**traffic_source** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from_plain**: The referring page URL optimized for use as a filter.  \ntype: string\n\n**url_rating_source**: The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**url_rating_target**: The strength of the target page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float nullable\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string\n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string",
4949 |                     "type": "string"
4950 |                 },
4951 |                 "select": {
4952 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
4953 |                     "type": "string"
4954 |                 },
4955 |                 "protocol": {
4956 |                     "description": "The protocol of your target.",
4957 |                     "type": "string",
4958 |                     "enum": [
4959 |                         "both",
4960 |                         "http",
4961 |                         "https"
4962 |                     ]
4963 |                 },
4964 |                 "target": {
4965 |                     "description": "The target of the search: a domain or a URL.",
4966 |                     "type": "string"
4967 |                 },
4968 |                 "mode": {
4969 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
4970 |                     "type": "string",
4971 |                     "enum": [
4972 |                         "exact",
4973 |                         "prefix",
4974 |                         "domain",
4975 |                         "subdomains"
4976 |                     ]
4977 |                 },
4978 |                 "history": {
4979 |                     "description": "A time frame to add lost backlinks to the report. Choose between `live` (no history), `since:<date>` (history since a specified date), and `all_time` (full history). The date should be in YYYY-MM-DD format.",
4980 |                     "type": "string"
4981 |                 }
4982 |             },
4983 |             "required": [
4984 |                 "select",
4985 |                 "target"
4986 |             ],
4987 |             "type": "object"
4988 |         },
4989 |         "name": "site-explorer-best-by-external-links"
4990 |     },
4991 |     {
4992 |         "_original_method": "GET",
4993 |         "_original_parameters": [
4994 |             {
4995 |                 "in": "query",
4996 |                 "name": "timeout",
4997 |                 "required": false
4998 |             },
4999 |             {
5000 |                 "in": "query",
5001 |                 "name": "offset",
5002 |                 "required": false
5003 |             },
5004 |             {
5005 |                 "in": "query",
5006 |                 "name": "limit",
5007 |                 "required": false
5008 |             },
5009 |             {
5010 |                 "in": "query",
5011 |                 "name": "order_by",
5012 |                 "required": false
5013 |             },
5014 |             {
5015 |                 "in": "query",
5016 |                 "name": "where",
5017 |                 "required": false
5018 |             },
5019 |             {
5020 |                 "in": "query",
5021 |                 "name": "select",
5022 |                 "required": true
5023 |             },
5024 |             {
5025 |                 "in": "query",
5026 |                 "name": "protocol",
5027 |                 "required": false
5028 |             },
5029 |             {
5030 |                 "in": "query",
5031 |                 "name": "target",
5032 |                 "required": true
5033 |             },
5034 |             {
5035 |                 "in": "query",
5036 |                 "name": "mode",
5037 |                 "required": false
5038 |             },
5039 |             {
5040 |                 "in": "query",
5041 |                 "name": "output",
5042 |                 "required": false
5043 |             }
5044 |         ],
5045 |         "_original_path": "site-explorer/best-by-internal-links",
5046 |         "_original_request_body": null,
5047 |         "description": "Retrieves a site's or page's internal link metrics, allowing analysis of how pages within the given domain or URL are interconnected and which pages receive the most internal links. Use doc tool first to get the real input schema.",
5048 |         "inputSchema": {
5049 |             "properties": {
5050 |                 "timeout": {
5051 |                     "type": "integer"
5052 |                 },
5053 |                 "limit": {
5054 |                     "type": "integer"
5055 |                 },
5056 |                 "order_by": {
5057 |                     "type": "string"
5058 |                 },
5059 |                 "where": {
5060 |                     "type": "string"
5061 |                 },
5062 |                 "select": {
5063 |                     "type": "string"
5064 |                 },
5065 |                 "protocol": {
5066 |                     "type": "string"
5067 |                 },
5068 |                 "target": {
5069 |                     "type": "string"
5070 |                 },
5071 |                 "mode": {
5072 |                     "type": "string"
5073 |                 }
5074 |             },
5075 |             "required": [
5076 |                 "select",
5077 |                 "target"
5078 |             ],
5079 |             "type": "object"
5080 |         },
5081 |         "_inputSchema": {
5082 |             "properties": {
5083 |                 "timeout": {
5084 |                     "description": "A manual timeout duration in seconds.",
5085 |                     "type": "integer"
5086 |                 },
5087 |                 "limit": {
5088 |                     "description": "The number of results to return.",
5089 |                     "type": "integer"
5090 |                 },
5091 |                 "order_by": {
5092 |                     "description": "A column to order results by. Example: field_a:desc,field_b:asc\n\nResponse schema:**canonical_to_target**: The number of inbound canonical links to your target page.  \ntype: integer  \n\n**dofollow_to_target**: The number of links to your target page that don’t have the “nofollow” attribute.  \ntype: integer  \n\n**first_seen_link**: The date we first found a link to your target.  \ntype: string<date-time>  \n\n**http_code_target**: The return code from HTTP protocol returned during the target page crawl.  \ntype: integer nullable  \n\n**languages_target**: The languages listed in the target page metadata or detected by the crawler to appear in the HTML.  \ntype: array[string]  \n\n**last_seen**: The date your target page lost its last live link.  \ntype: string<date-time> nullable  \n\n**last_visited_source**: The date we last verified a live link to your target page.  \ntype: string<date-time>  \n\n**last_visited_target**: The date we last crawled your target page.  \ntype: string<date-time> nullable  \n\n**links_to_target**: The number of inbound backlinks the target page has.  \ntype: integer  \n\n**nofollow_to_target**: The number of links to your target page that have the “nofollow” attribute.  \ntype: integer  \n\n**powered_by_target**: Web technologies used to build and serve the target page content.  \ntype: array[string]  \n\n**redirects_to_target**: The number of inbound redirects to your target page.  \ntype: integer  \n\n**target_redirect**: The target's redirect if any.  \ntype: string nullable  \n\n**title_target**: The html title of the target page.  \ntype: string nullable  \n\n**url_rating_target**: The strength of the target page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: number<float> nullable  \n\n**url_to**: The URL the backlink points to.  \ntype: string<url>  \n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string  \n\n",
5093 |                     "type": "string"
5094 |                 },
5095 |                 "where": {
5096 |                     "description": "The filter expression. Example: {\"or\":[{\"field\":\"foo\",\"modifier\":\"uppercase\",\"is\":[\"eq\",\"AHREFS\"]},{\"field\":\"bar\",\"list_is\":{\"and\":[[\"prefix\",\"Ahrefs\"],[\"suffix\",\"seo\"]]}}]}.\nThe syntax is described by the following grammar, expressed in BNF-style notation.\nA term enclosed in angle brackets < and > denotes a symbol. A symbol followed by a + denotes a non-empty array containing the symbol. A ? preceding an object field indicates that the field is optional.\nThe two terminal symbols are defined as follows:\n<field_alias> A filter field alias.\n<value> A JSON value. It should match the type of the field (or of the field's modifier, if one is present).\nPermitted patterns in regex: RE2 syntax..\n<bool_filter> ::= { \"and\" : <bool_filter>+ }\n              |   { \"or\" : <bool_filter>+ }\n              |   { \"not\" : <bool_filter> }\n              |   <expr>\n\n<expr> ::= {\n             \"field\" : <field_alias>,\n             ? \"is\": <condition>,\n             ? \"list_is\": <list_condition>\n           }\n\n<condition> ::= [ \"eq\", <value> ]\n            |   [ \"neq\", <value> ]\n            |   [ \"gt\", <value> ]\n            |   [ \"gte\", <value> ]\n            |   [ \"lt\", <value> ]\n            |   [ \"lte\", <value> ]\n            |   [ \"substring\", <value> ]\n            |   [ \"isubstring\", <value> ]\n            |   [ \"phrase_match\", <value> ]\n            |   [ \"iphrase_match\", <value> ]\n            |   [ \"prefix\", <value> ]\n            |   [ \"suffix\", <value> ]\n            |   [ \"regex\", <value> ]\n            |   \"empty\"\n            |   \"is_null\"\n\n<condition_bool_filter> ::= { \"and\" : <condition_bool_filter>+ }\n                        |   { \"or\" : <condition_bool_filter>+ }\n                        |   { \"not\" : <condition_bool_filter> }\n                        |   <condition>\n\n<list_condition> ::= { \"any\" : <condition_bool_filter> }\n                 |   { \"all\" : <condition_bool_filter> }\n The following column identifiers are recognized (this differs from the identifiers recognized by the `select` parameter).\n\n**anchor**: The clickable words in a link that point to a URL.  \ntype: string\n\n**canonical_to_target**: The number of inbound canonical links to your target page.  \ntype: integer\n\n**dofollow_to_target**: The number of links to your target page that don’t have the “nofollow” attribute.  \ntype: integer\n\n**domain_rating_source**: The strength of the referring domain's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**first_seen_link**: The date we first found a link to your target.  \ntype: datetime\n\n**http_code_source**: The return code from HTTP protocol returned during the referring page crawl.  \ntype: integer\n\n**http_code_target**: The return code from HTTP protocol returned during the target page crawl.  \ntype: integer nullable\n\n**is_content**: The link was found in the biggest piece of content on the page.  \ntype: boolean\n\n**is_dofollow**: The link has no special nofollow attribute.  \ntype: boolean\n\n**is_homepage_link**: The link was found on the homepage of a referring website.  \ntype: boolean\n\n**is_nofollow**: The link or the referring page has the nofollow attribute set.  \ntype: boolean\n\n**is_non_html**: The link points to a URL with non-HTML content.  \ntype: boolean\n\n**is_root_source**: The referring domain name is a root domain name.  \ntype: boolean\n\n**is_sponsored**: The link has the Sponsored attribute set in the referring page HTML.  \ntype: boolean\n\n**is_ugc**: The link has the User Generated Content attribute set in the referring page HTML.  \ntype: boolean\n\n**languages_source**: The languages listed in the referring page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**languages_target**: The languages listed in the target page metadata or detected by the crawler to appear in the HTML.  \ntype: array(string)\n\n**last_seen**: The date your target page lost its last live link.  \ntype: datetime nullable\n\n**last_visited_source**: The date we last verified a live link to your target page.  \ntype: datetime\n\n**last_visited_target**: The date we last crawled your target page.  \ntype: datetime nullable\n\n**len_url_redirect**: The number of redirect chain URLs.  \ntype: integer\n\n**link_type**: The kind of the backlink.  \ntype: string  \nenum: `\"redirect\"` `\"frame\"` `\"text\"` `\"form\"` `\"canonical\"` `\"alternate\"` `\"rss\"` `\"image\"`\n\n**linked_domains_source**: The number of unique root domains linked from the referring page.  \ntype: integer\n\n**links_external_source**: The number of external links from the referring page.  \ntype: integer\n\n**links_to_target**: The number of inbound backlinks the target page has.  \ntype: integer\n\n**nofollow_to_target**: The number of links to your target page that have the “nofollow” attribute.  \ntype: integer\n\n**positions_source**: The number of keywords that the referring page ranks for in the top 100 positions.  \ntype: integer\n\n**positions_source_domain**: The number of keywords that the referring domain ranks for in the top 100 positions.  \ntype: integer\n\n**powered_by_source**: Web technologies used to build and serve the referring page content.  \ntype: array(string)\n\n**powered_by_target**: Web technologies used to build and serve the target page content.  \ntype: array(string)\n\n**redirects_to_target**: The number of inbound redirects to your target page.  \ntype: integer\n\n**refdomains_source** (5 units): The number of unique referring domains linking to the referring page.  \ntype: integer\n\n**root_name_source**: The root domain name of the referring domain, not including subdomains.  \ntype: string\n\n**snippet_left**: The snippet of text appearing just before the link.  \ntype: string\n\n**snippet_right**: The snippet of text appearing just after the link.  \ntype: string\n\n**source_page_author**: The author of the referring page.  \ntype: string nullable\n\n**target_redirect**: The target's redirect if any.  \ntype: string nullable\n\n**title_source**: The html title of the referring page.  \ntype: string\n\n**title_target**: The html title of the target page.  \ntype: string nullable\n\n**traffic_domain_source** (10 units): The referring domain's estimated monthly organic traffic from search.  \ntype: integer\n\n**traffic_source** (10 units): The referring page's estimated monthly organic traffic from search.  \ntype: integer\n\n**url_from_plain**: The referring page URL optimized for use as a filter.  \ntype: string\n\n**url_rating_source**: The strength of the referring page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float\n\n**url_rating_target**: The strength of the target page's backlink profile compared to the others in our database on a 100-point scale.  \ntype: float nullable\n\n**url_redirect**: A redirect chain the target URL of the link points to.  \ntype: array(url)\n\n**url_redirect_with_target**: The target URL of the link with its redirect chain.  \ntype: array(string)\n\n**url_to**: The URL the backlink points to.  \ntype: string\n\n**url_to_plain**: The target page URL optimized for use as a filter.  \ntype: string",
5097 |                     "type": "string"
5098 |                 },
5099 |                 "select": {
5100 |                     "description": "A mandatory comma-separated list of columns to return. Example: field_a,field_b,field_c See response schema for valid column identifiers.",
5101 |                     "type": "string"
5102 |                 },
5103 |                 "protocol": {
5104 |                     "description": "The protocol of your target.",
5105 |                     "type": "string",
5106 |                     "enum": [
5107 |                         "both",
5108 |                         "http",
5109 |                         "https"
5110 |                     ]
5111 |                 },
5112 |                 "target": {
5113 |                     "description": "The target of the search: a domain or a URL.",
5114 |                     "type": "string"
5115 |                 },
5116 |                 "mode": {
5117 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
5118 |                     "type": "string",
5119 |                     "enum": [
5120 |                         "exact",
5121 |                         "prefix",
5122 |                         "domain",
5123 |                         "subdomains"
5124 |                     ]
5125 |                 }
5126 |             },
5127 |             "required": [
5128 |                 "select",
5129 |                 "target"
5130 |             ],
5131 |             "type": "object"
5132 |         },
5133 |         "name": "site-explorer-best-by-internal-links"
5134 |     },
5135 |     {
5136 |         "_original_method": "GET",
5137 |         "_original_parameters": [
5138 |             {
5139 |                 "in": "query",
5140 |                 "name": "volume_mode",
5141 |                 "required": false
5142 |             },
5143 |             {
5144 |                 "in": "query",
5145 |                 "name": "top_positions",
5146 |                 "required": false
5147 |             },
5148 |             {
5149 |                 "in": "query",
5150 |                 "name": "history_grouping",
5151 |                 "required": false
5152 |             },
5153 |             {
5154 |                 "in": "query",
5155 |                 "name": "date_to",
5156 |                 "required": false
5157 |             },
5158 |             {
5159 |                 "in": "query",
5160 |                 "name": "date_from",
5161 |                 "required": true
5162 |             },
5163 |             {
5164 |                 "in": "query",
5165 |                 "name": "country",
5166 |                 "required": false
5167 |             },
5168 |             {
5169 |                 "in": "query",
5170 |                 "name": "protocol",
5171 |                 "required": false
5172 |             },
5173 |             {
5174 |                 "in": "query",
5175 |                 "name": "target",
5176 |                 "required": true
5177 |             },
5178 |             {
5179 |                 "in": "query",
5180 |                 "name": "mode",
5181 |                 "required": false
5182 |             },
5183 |             {
5184 |                 "in": "query",
5185 |                 "name": "output",
5186 |                 "required": false
5187 |             }
5188 |         ],
5189 |         "_original_path": "site-explorer/total-search-volume-history",
5190 |         "_original_request_body": null,
5191 |         "description": "Retrieves the historical total organic search volume, traffic, and traffic value for a given site or URL over a specified time period and grouping. Use doc tool first to get the real input schema.",
5192 |         "inputSchema": {
5193 |             "properties": {
5194 |                 "volume_mode": {
5195 |                     "type": "string"
5196 |                 },
5197 |                 "top_positions": {
5198 |                     "type": "string"
5199 |                 },
5200 |                 "history_grouping": {
5201 |                     "type": "string"
5202 |                 },
5203 |                 "date_to": {
5204 |                     "type": "string"
5205 |                 },
5206 |                 "date_from": {
5207 |                     "type": "string"
5208 |                 },
5209 |                 "country": {
5210 |                     "type": "string"
5211 |                 },
5212 |                 "protocol": {
5213 |                     "type": "string"
5214 |                 },
5215 |                 "target": {
5216 |                     "type": "string"
5217 |                 },
5218 |                 "mode": {
5219 |                     "type": "string"
5220 |                 }
5221 |             },
5222 |             "required": [
5223 |                 "date_from",
5224 |                 "target"
5225 |             ],
5226 |             "type": "object"
5227 |         },
5228 |         "_inputSchema": {
5229 |             "properties": {
5230 |                 "volume_mode": {
5231 |                     "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
5232 |                     "type": "string",
5233 |                     "enum": [
5234 |                         "monthly",
5235 |                         "average"
5236 |                     ]
5237 |                 },
5238 |                 "top_positions": {
5239 |                     "description": "The number of top organic search positions to consider when calculating total search volume.",
5240 |                     "type": "string",
5241 |                     "enum": [
5242 |                         "top_10",
5243 |                         "top_100"
5244 |                     ]
5245 |                 },
5246 |                 "history_grouping": {
5247 |                     "description": "The time interval used to group historical data.",
5248 |                     "type": "string",
5249 |                     "enum": [
5250 |                         "daily",
5251 |                         "weekly",
5252 |                         "monthly"
5253 |                     ]
5254 |                 },
5255 |                 "date_to": {
5256 |                     "description": "The end date of the historical period in YYYY-MM-DD format.",
5257 |                     "type": "string",
5258 |                     "format": "date"
5259 |                 },
5260 |                 "date_from": {
5261 |                     "description": "The start date of the historical period in YYYY-MM-DD format.",
5262 |                     "type": "string",
5263 |                     "format": "date"
5264 |                 },
5265 |                 "country": {
5266 |                     "description": "A two-letter country code (ISO 3166-1 alpha-2): \"AD\" .. \"ZW\"",
5267 |                     "type": "string"
5268 |                 },
5269 |                 "protocol": {
5270 |                     "description": "The protocol of your target.",
5271 |                     "type": "string",
5272 |                     "enum": [
5273 |                         "both",
5274 |                         "http",
5275 |                         "https"
5276 |                     ]
5277 |                 },
5278 |                 "target": {
5279 |                     "description": "The target of the search: a domain or a URL.",
5280 |                     "type": "string"
5281 |                 },
5282 |                 "mode": {
5283 |                     "description": "The scope of the search based on the target you entered.\n- exact: analyze a single specific URL (e.g., example.com/page) - use for individual pages.\n- prefix: analyze all pages under a specific path (e.g., example.com/blog/*) - use for sections of a site.\n- domain: analyze ONLY the exact domain entered WITHOUT any subdomains - use when you want to exclude subdomains from analysis.\n- subdomains: analyze the main domain AND ALL its subdomains - use by default.",
5284 |                     "type": "string",
5285 |                     "enum": [
5286 |                         "exact",
5287 |                         "prefix",
5288 |                         "domain",
5289 |                         "subdomains"
5290 |                     ]
5291 |                 }
5292 |             },
5293 |             "required": [
5294 |                 "date_from",
5295 |                 "target"
5296 |             ],
5297 |             "type": "object"
5298 |         },
5299 |         "name": "site-explorer-total-search-volume-history"
5300 |     },
5301 |     {
5302 |         "description": "Full documentation for Ahrefs tools. You must use this tool to get the input schema for any other tool.",
5303 |         "inputSchema": {
5304 |             "properties": {
5305 |                 "tool": {
5306 |                     "description": "The name of the tool.",
5307 |                     "type": "string"
5308 |                 }
5309 |             },
5310 |             "required": [],
5311 |             "type": "object"
5312 |         },
5313 |         "name": "doc"
5314 |     }
5315 | ];
5316 | 
5317 | function mapApiErrorToMcpError(error: unknown): McpError {
5318 |     if (axios.isAxiosError(error)) {
5319 |         const axiosError = error as AxiosError;
5320 |         const status = axiosError.response?.status;
5321 |         // Attempt to get a meaningful message from response data or default Axios message
5322 |         const apiMessage = (axiosError.response?.data as any)?.error || (axiosError.response?.data as any)?.message || (axiosError.response?.data as any)?.detail || axiosError.message;
5323 | 
5324 |         console.error(`API Error: Status ${status}, Message: ${apiMessage}`, axiosError.response?.data);
5325 | 
5326 |         switch (status) {
5327 |             case 400: return new McpError(ErrorCode.InvalidParams, `API Bad Request: ${apiMessage}`);
5328 |             case 404: return new McpError(ErrorCode.MethodNotFound, `API Not Found: ${apiMessage}`);
5329 |             case 408: return new McpError(ErrorCode.RequestTimeout, `API Request Timeout: ${apiMessage}`);
5330 |             case 500: case 502: case 503: case 504:
5331 |                 return new McpError(ErrorCode.InternalError, `API Server Error (${status}): ${apiMessage}`);
5332 |             default:
5333 |                 return new McpError(ErrorCode.InternalError, `API Request Failed (${status}): ${apiMessage}`);
5334 |         }
5335 |     } else if (error instanceof Error) {
5336 |         console.error(`Request Error: ${error.message}`, error);
5337 |         return new McpError(ErrorCode.InternalError, `Request failed: ${error.message}`);
5338 |     } else {
5339 |         console.error('Unknown internal error occurred:', error);
5340 |         return new McpError(ErrorCode.InternalError, 'An unknown internal error occurred');
5341 |     }
5342 | }
5343 | 
5344 | 
5345 | export class OpenApiMcpServer {
5346 |     public server: Server; // Make server public for transport connection
5347 |     private axiosInstance = axios.create({
5348 |         baseURL: API_BASE_URL, // Axios will use this as the base for requests
5349 |         timeout: 30000, // 30 second timeout
5350 |     });
5351 | 
5352 |     constructor() {
5353 |         console.error(`Initializing MCP Server: ahrefs v3.0.0`);
5354 |         console.error(`Using API Base URL: ${API_BASE_URL}`);
5355 |         if (!API_KEY) {
5356 |             console.error("No API Key found. Assuming public API or auth handled differently.");
5357 |         }
5358 | 
5359 |         this.server = new Server(
5360 |             { name: 'ahrefs', version: '3.0.0' },
5361 |             { capabilities: { resources: {}, tools: {} } }
5362 |         );
5363 |         this.setupRequestHandlers();
5364 |         this.setupGracefulShutdown();
5365 |         this.server.onerror = (error) => console.error('[MCP Server Error]', error);
5366 |     }
5367 | 
5368 |     private setupGracefulShutdown(): void {
5369 |         process.on('SIGINT', async () => {
5370 |             console.error("Received SIGINT, shutting down server...");
5371 |             await this.server.close();
5372 |             console.error("Server closed.");
5373 |             process.exit(0);
5374 |         });
5375 |         process.on('SIGTERM', async () => {
5376 |             console.error("Received SIGTERM, shutting down server...");
5377 |             await this.server.close();
5378 |             console.error("Server closed.");
5379 |             process.exit(0);
5380 |         });
5381 |     }
5382 | 
5383 |     private setupRequestHandlers(): void {
5384 |         this.server.setRequestHandler(ListToolsRequestSchema, async () => {
5385 |             console.error("Handling ListTools request");
5386 |             return { tools };
5387 |         });
5388 | 
5389 |         this.server.setRequestHandler(CallToolRequestSchema, async (request): Promise<CallToolResult> => {
5390 |             const toolName = request.params.name;
5391 |             const args = request.params.arguments || {};
5392 |             console.error(`Received CallTool request for: ${toolName}`, args);
5393 | 
5394 |             if (toolName === "doc") {
5395 |                 const requestedToolName = String(args.tool).split('_').pop();
5396 |                 const requestedTool = tools.find(t => t.name === requestedToolName);
5397 |                 if (!requestedTool) {
5398 |                     console.error(`Tool not found: ${requestedToolName}`);
5399 |                     throw new McpError(ErrorCode.MethodNotFound, `Tool '${requestedToolName}' not found.`);
5400 |                 }
5401 |                 return { content: [{ type: 'text', text: JSON.stringify(requestedTool._inputSchema, null, 2) }] };
5402 |             }
5403 | 
5404 |             const tool = tools.find(t => t.name === toolName);
5405 |             if (!tool) {
5406 |                 console.error(`Tool not found: ${toolName}`);
5407 |                 throw new McpError(ErrorCode.MethodNotFound, `Tool '${toolName}' not found.`);
5408 |             }
5409 | 
5410 |             // Retrieve original OpenAPI details attached during generation
5411 |             const originalMethod = (tool as any)._original_method as Method; // Cast to Axios Method type
5412 |             const originalPath = (tool as any)._original_path as string;
5413 |             const originalParameters = (tool as any)._original_parameters as any[] || [];
5414 |             const originalRequestBodyInfo = (tool as any)._original_request_body as { required: boolean, content_type: string | null } | null;
5415 | 
5416 |             if (!originalMethod || !originalPath) {
5417 |                 console.error(`Missing original operation details for tool: ${toolName}`);
5418 |                 throw new McpError(ErrorCode.InternalError, `Internal configuration error for tool '${toolName}'.`);
5419 |             }
5420 | 
5421 |             try {
5422 |                 let targetPath = originalPath;
5423 |                 const queryParams: Record<string, any> = {};
5424 |                 const headers: Record<string, string> = {
5425 |                     'Accept': 'application/json',
5426 |                     'User-Agent': 'ahrefs-mcp-server'
5427 |                 };
5428 |                 let requestData: any = undefined;
5429 |                 let requestBody: any = args.requestBody;
5430 |                 headers["Authorization"] = `Bearer ${API_KEY}`;
5431 | 
5432 |                 // Process parameters based on their 'in' location
5433 |                 for (const param of originalParameters) {
5434 |                     const paramName = param.name;
5435 |                     const paramIn = param.in; // path, query, header
5436 |                     let paramValue = args[paramName];
5437 | 
5438 |                     // Lowercase specific parameters
5439 |                     if (paramValue !== undefined && paramValue !== null && ["us_state", "country", "country_code"].includes(paramName)) {
5440 |                         paramValue = String(paramValue).toLowerCase();
5441 |                     }
5442 | 
5443 |                     if (paramValue !== undefined && paramValue !== null) {
5444 |                         if (paramIn === 'path') {
5445 |                             targetPath = targetPath.replace(`{${paramName}}`, encodeURIComponent(String(paramValue)));
5446 |                         } else if (paramIn === 'query') {
5447 |                             queryParams[paramName] = paramValue;
5448 |                         } else if (paramIn === 'header') {
5449 |                             headers[paramName] = String(paramValue);
5450 |                         } else if (paramIn === 'body') {
5451 |                             if (!requestBody) {
5452 |                                 requestBody = {};
5453 |                             }
5454 |                             requestBody[paramName] = paramValue;
5455 |                         }
5456 |                     } else if (param.required) {
5457 |                         console.error(`Missing required parameter '${paramName}' for tool ${toolName}`);
5458 |                         throw new McpError(ErrorCode.InvalidParams, `Missing required parameter: ${paramName}`);
5459 |                     }
5460 |                 }
5461 | 
5462 |                 // Process requestBody
5463 |                 if (originalRequestBodyInfo && requestBody !== undefined && requestBody !== null) {
5464 |                     requestData = requestBody;
5465 |                     headers['Content-Type'] = originalRequestBodyInfo.content_type || 'application/json';
5466 |                 } else if (originalRequestBodyInfo?.required) {
5467 |                     console.error(`Missing required requestBody for tool ${toolName}`);
5468 |                     throw new McpError(ErrorCode.InvalidParams, `Missing required requestBody`);
5469 |                 } else if (requestData !== undefined) {
5470 |                     headers['Content-Type'] = 'application/json';
5471 |                 }
5472 | 
5473 |                 // Make API Call - Axios combines baseURL and url
5474 |                 const requestUrl = targetPath; // Use the path directly
5475 |                 console.error(`Making API call: ${originalMethod} ${this.axiosInstance.defaults.baseURL}${requestUrl}`);
5476 |                 const response = await this.axiosInstance.request({
5477 |                     method: originalMethod,
5478 |                     url: requestUrl, // Use the relative path; Axios combines it with baseURL
5479 |                     params: queryParams,
5480 |                     headers: headers,
5481 |                     data: requestData,
5482 |                     validateStatus: (status) => status >= 200 && status < 300, // Only 2xx are considered success
5483 |                 });
5484 | 
5485 |                 console.error(`API call successful for ${toolName}, Status: ${response.status}`);
5486 | 
5487 |                 // Format Response for MCP
5488 |                 let responseText: string;
5489 |                 const responseContentType = response.headers['content-type'];
5490 |                 if (responseContentType && responseContentType.includes('application/json') && typeof response.data === 'object') {
5491 |                     try {
5492 |                         responseText = JSON.stringify(response.data, null, 2); // Pretty-print JSON
5493 |                     } catch (e) {
5494 |                         console.error("Failed to stringify JSON response, returning as string.", e);
5495 |                         responseText = String(response.data);
5496 |                     }
5497 |                 } else {
5498 |                     responseText = String(response.data); // Return non-JSON as plain text
5499 |                 }
5500 | 
5501 |                 return { content: [{ type: 'text', text: responseText }] };
5502 | 
5503 |             } catch (error) {
5504 |                 console.error(`Error during API call for tool ${toolName}:`, error);
5505 |                 const mcpError = mapApiErrorToMcpError(error);
5506 |                 return {
5507 |                     content: [{ type: 'text', text: mcpError.message }],
5508 |                     isError: true,
5509 |                     error: mcpError, // Include structured error
5510 |                 };
5511 |             }
5512 |         });
5513 |     }
5514 | }
5515 | 
```
Page 2/2FirstPrevNextLast