Ahrefs API v3

REST API over the Ahrefs data set — Site Explorer, Keywords Explorer, Site Audit, Rank Tracker, SERP Overview, Batch Analysis, Brand Radar, Web Analytics, GSC Insights, Social Media Management, Management, Subscription Information and free Public endpoints. 148 operations, bearer API key auth, JSON or XML responses, metered in API units.

Documentation

Specifications

OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/_original/ahrefs-openapi-original.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-site-explorer-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-keywords-explorer-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-site-audit-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-rank-tracker-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-serp-overview-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-batch-analysis-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-subscription-info-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-management-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-brand-radar-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-web-analytics-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-gsc-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-social-media-openapi.json
OpenAPI
https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/ahrefs-public-openapi.json

Other Resources

OpenAPI Specification

ahrefs-openapi-original.json Raw ↑
{
  "openapi": "3.2.0",
  "info": {
    "title": "Ahrefs API",
    "description": "Ahrefs API v3 gives programmatic access to Ahrefs' SEO, marketing, and AI-search data — backlinks, organic and paid traffic, keywords, SERPs, rank tracking, site audits, brand/AI-search visibility, web and social analytics, and account management. This is the full spec for every tool; each tool also has its own spec under /reference/.",
    "termsOfService": "https://ahrefs.com/terms",
    "contact": {
      "name": "Ahrefs",
      "url": "https://ahrefs.com/",
      "email": "support@ahrefs.com"
    },
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://api.ahrefs.com/v3",
      "description": "Ahrefs API v3"
    }
  ],
  "security": [
    {
      "http": [
        "read"
      ]
    }
  ],
  "tags": [
    {
      "name": "Site Explorer",
      "description": "Fetch data from Site Explorer reports"
    },
    {
      "name": "Keywords Explorer",
      "description": "Fetch data from Keywords Explorer reports"
    },
    {
      "name": "Site Audit",
      "description": "Site audit."
    },
    {
      "name": "Rank Tracker",
      "description": "Rank tracker."
    },
    {
      "name": "SERP Overview",
      "description": "Fetch data from SERP Overview report"
    },
    {
      "name": "Batch Analysis",
      "description": "Batch analysis."
    },
    {
      "name": "Subscription Information",
      "description": "Subscription information."
    },
    {
      "name": "Management",
      "description": "Project management."
    },
    {
      "name": "Brand Radar",
      "description": "Brand radar."
    },
    {
      "name": "Web Analytics",
      "description": "Web_analytics."
    },
    {
      "name": "GSC Insights",
      "description": "Fetch data from GSC Insights reports"
    },
    {
      "name": "Social Media",
      "description": "Social Media Management."
    },
    {
      "name": "Public",
      "description": "Free endpoints that don't require an Ahrefs subscription, or require a free/public APIv3 key"
    }
  ],
  "paths": {
    "/site-explorer/domain-rating": {
      "get": {
        "tags": [
          "Site Explorer"
        ],
        "summary": "Domain rating",
        "operationId": "site-explorer.domain-rating",
        "parameters": [
          {
            "description": "A date to report metrics on in YYYY-MM-DD format.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date",
            "in": "query"
          },
          {
            "description": "The target of the search: a domain or a URL.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "url"
            },
            "name": "target",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/site-explorer.output"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.domain-rating"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.domain-rating"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/site-explorer.error_400"
          },
          "401": {
            "$ref": "#/components/responses/site-explorer.error_401"
          },
          "403": {
            "$ref": "#/components/responses/site-explorer.error_403"
          },
          "429": {
            "$ref": "#/components/responses/site-explorer.error_429"
          },
          "500": {
            "$ref": "#/components/responses/site-explorer.error_500"
          }
        }
      }
    },
    "/site-explorer/backlinks-stats": {
      "get": {
        "tags": [
          "Site Explorer"
        ],
        "summary": "Backlinks stats",
        "operationId": "site-explorer.backlinks-stats",
        "parameters": [
          {
            "description": "The protocol of your target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "both",
                "http",
                "https"
              ],
              "default": "both"
            },
            "name": "protocol",
            "in": "query"
          },
          {
            "description": "The target of the search: a domain or a URL.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "url"
            },
            "name": "target",
            "in": "query"
          },
          {
            "description": "The scope of the search based on the target you entered.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "exact",
                "prefix",
                "domain",
                "subdomains"
              ],
              "default": "subdomains"
            },
            "name": "mode",
            "in": "query"
          },
          {
            "description": "A date to report metrics on in YYYY-MM-DD format.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/site-explorer.output"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.backlinks-stats"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.backlinks-stats"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/site-explorer.error_400"
          },
          "401": {
            "$ref": "#/components/responses/site-explorer.error_401"
          },
          "403": {
            "$ref": "#/components/responses/site-explorer.error_403"
          },
          "429": {
            "$ref": "#/components/responses/site-explorer.error_429"
          },
          "500": {
            "$ref": "#/components/responses/site-explorer.error_500"
          }
        }
      }
    },
    "/site-explorer/outlinks-stats": {
      "get": {
        "tags": [
          "Site Explorer"
        ],
        "summary": "Outlinks stats",
        "description": "**This is a beta version of the endpoint. The data it returns may not always exactly match the corresponding values in Ahrefs UI. Data accuracy will be improved soon.**",
        "operationId": "site-explorer.outlinks-stats",
        "parameters": [
          {
            "description": "The target of the search: a domain or a URL.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "url"
            },
            "name": "target",
            "in": "query"
          },
          {
            "description": "The scope of the target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "exact",
                "prefix",
                "domain",
                "subdomains"
              ],
              "default": "subdomains"
            },
            "name": "mode",
            "in": "query"
          },
          {
            "description": "The protocol of your target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "both",
                "http",
                "https"
              ],
              "default": "both"
            },
            "name": "protocol",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/site-explorer.output"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.outlinks-stats"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.outlinks-stats"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/site-explorer.error_400"
          },
          "401": {
            "$ref": "#/components/responses/site-explorer.error_401"
          },
          "403": {
            "$ref": "#/components/responses/site-explorer.error_403"
          },
          "429": {
            "$ref": "#/components/responses/site-explorer.error_429"
          },
          "500": {
            "$ref": "#/components/responses/site-explorer.error_500"
          }
        }
      }
    },
    "/site-explorer/metrics": {
      "get": {
        "tags": [
          "Site Explorer"
        ],
        "summary": "Metrics",
        "operationId": "site-explorer.metrics",
        "parameters": [
          {
            "description": "A date to report metrics on in YYYY-MM-DD format.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date",
            "in": "query"
          },
          {
            "description": "The scope of the target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "exact",
                "prefix",
                "domain",
                "subdomains"
              ],
              "default": "subdomains"
            },
            "name": "mode",
            "in": "query"
          },
          {
            "description": "The target of the search: a domain or a URL.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "url"
            },
            "name": "target",
            "in": "query"
          },
          {
            "description": "The protocol of your target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "both",
                "http",
                "https"
              ],
              "default": "both"
            },
            "name": "protocol",
            "in": "query"
          },
          {
            "description": "A two-letter country code (ISO 3166-1 alpha-2).",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "ad",
                "ae",
                "af",
                "ag",
                "ai",
                "al",
                "am",
                "ao",
                "ar",
                "as",
                "at",
                "au",
                "aw",
                "az",
                "ba",
                "bb",
                "bd",
                "be",
                "bf",
                "bg",
                "bh",
                "bi",
                "bj",
                "bn",
                "bo",
                "br",
                "bs",
                "bt",
                "bw",
                "by",
                "bz",
                "ca",
                "cd",
                "cf",
                "cg",
                "ch",
                "ci",
                "ck",
                "cl",
                "cm",
                "cn",
                "co",
                "cr",
                "cu",
                "cv",
                "cy",
                "cz",
                "de",
                "dj",
                "dk",
                "dm",
                "do",
                "dz",
                "ec",
                "ee",
                "eg",
                "es",
                "et",
                "fi",
                "fj",
                "fm",
                "fo",
                "fr",
                "ga",
                "gb",
                "gd",
                "ge",
                "gf",
                "gg",
                "gh",
                "gi",
                "gl",
                "gm",
                "gn",
                "gp",
                "gq",
                "gr",
                "gt",
                "gu",
                "gy",
                "hk",
                "hn",
                "hr",
                "ht",
                "hu",
                "id",
                "ie",
                "il",
                "im",
                "in",
                "iq",
                "is",
                "it",
                "je",
                "jm",
                "jo",
                "jp",
                "ke",
                "kg",
                "kh",
                "ki",
                "kn",
                "kr",
                "kw",
                "ky",
                "kz",
                "la",
                "lb",
                "lc",
                "li",
                "lk",
                "ls",
                "lt",
                "lu",
                "lv",
                "ly",
                "ma",
                "mc",
                "md",
                "me",
                "mg",
                "mk",
                "ml",
                "mm",
                "mn",
                "mq",
                "mr",
                "ms",
                "mt",
                "mu",
                "mv",
                "mw",
                "mx",
                "my",
                "mz",
                "na",
                "nc",
                "ne",
                "ng",
                "ni",
                "nl",
                "no",
                "np",
                "nr",
                "nu",
                "nz",
                "om",
                "pa",
                "pe",
                "pf",
                "pg",
                "ph",
                "pk",
                "pl",
                "pn",
                "pr",
                "ps",
                "pt",
                "py",
                "qa",
                "re",
                "ro",
                "rs",
                "ru",
                "rw",
                "sa",
                "sb",
                "sc",
                "se",
                "sg",
                "sh",
                "si",
                "sk",
                "sl",
                "sm",
                "sn",
                "so",
                "sr",
                "st",
                "sv",
                "td",
                "tg",
                "th",
                "tj",
                "tk",
                "tl",
                "tm",
                "tn",
                "to",
                "tr",
                "tt",
                "tw",
                "tz",
                "ua",
                "ug",
                "us",
                "uy",
                "uz",
                "vc",
                "ve",
                "vg",
                "vi",
                "vn",
                "vu",
                "ws",
                "ye",
                "yt",
                "za",
                "zm",
                "zw"
              ]
            },
            "name": "country",
            "in": "query"
          },
          {
            "description": "The search volume calculation mode: monthly or average. It affects volume, traffic, and traffic value.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "monthly",
                "average"
              ],
              "default": "monthly"
            },
            "name": "volume_mode",
            "in": "query"
          },
          {
            "description": "The organic traffic calculation mode: static or adaptive. It affects organic traffic and traffic value.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "static",
                "adaptive"
              ],
              "default": "static"
            },
            "name": "traffic_mode",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/site-explorer.output"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.metrics"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.metrics"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/site-explorer.error_400"
          },
          "401": {
            "$ref": "#/components/responses/site-explorer.error_401"
          },
          "403": {
            "$ref": "#/components/responses/site-explorer.error_403"
          },
          "429": {
            "$ref": "#/components/responses/site-explorer.error_429"
          },
          "500": {
            "$ref": "#/components/responses/site-explorer.error_500"
          }
        }
      }
    },
    "/site-explorer/ai-responses-count": {
      "get": {
        "tags": [
          "Site Explorer"
        ],
        "summary": "AI Responses Count",
        "operationId": "site-explorer.ai-responses-count",
        "parameters": [
          {
            "description": "A comma-separated list of fields to return.\n\n- `chatgpt` (15 units)\n- `copilot` (15 units)\n- `gemini` (15 units)\n- `google_ai_mode` (15 units)\n- `google_ai_overviews` (15 units)\n- `google_ai_overviews_keywords` (15 units)\n- `grok` (15 units)\n- `perplexity` (15 units)",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string"
            },
            "name": "select",
            "in": "query"
          },
          {
            "description": "The date to report on in YYYY-MM-DD format.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date",
            "in": "query"
          },
          {
            "description": "The scope of the target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "exact",
                "prefix",
                "domain",
                "subdomains"
              ],
              "default": "subdomains"
            },
            "name": "mode",
            "in": "query"
          },
          {
            "description": "The target of the search: a domain or a URL.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "url"
            },
            "name": "target",
            "in": "query"
          },
          {
            "description": "The protocol of your target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "both",
                "http",
                "https"
              ],
              "default": "both"
            },
            "name": "protocol",
            "in": "query"
          },
          {
            "description": "A two-letter country code (ISO 3166-1 alpha-2).",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "ad",
                "ae",
                "af",
                "ag",
                "ai",
                "al",
                "am",
                "ao",
                "ar",
                "as",
                "at",
                "au",
                "aw",
                "az",
                "ba",
                "bb",
                "bd",
                "be",
                "bf",
                "bg",
                "bh",
                "bi",
                "bj",
                "bn",
                "bo",
                "br",
                "bs",
                "bt",
                "bw",
                "by",
                "bz",
                "ca",
                "cd",
                "cf",
                "cg",
                "ch",
                "ci",
                "ck",
                "cl",
                "cm",
                "cn",
                "co",
                "cr",
                "cu",
                "cv",
                "cy",
                "cz",
                "de",
                "dj",
                "dk",
                "dm",
                "do",
                "dz",
                "ec",
                "ee",
                "eg",
                "es",
                "et",
                "fi",
                "fj",
                "fm",
                "fo",
                "fr",
                "ga",
                "gb",
                "gd",
                "ge",
                "gf",
                "gg",
                "gh",
                "gi",
                "gl",
                "gm",
                "gn",
                "gp",
                "gq",
                "gr",
                "gt",
                "gu",
                "gy",
                "hk",
                "hn",
                "hr",
                "ht",
                "hu",
                "id",
                "ie",
                "il",
                "im",
                "in",
                "iq",
                "is",
                "it",
                "je",
                "jm",
                "jo",
                "jp",
                "ke",
                "kg",
                "kh",
                "ki",
                "kn",
                "kr",
                "kw",
                "ky",
                "kz",
                "la",
                "lb",
                "lc",
                "li",
                "lk",
                "ls",
                "lt",
                "lu",
                "lv",
                "ly",
                "ma",
                "mc",
                "md",
                "me",
                "mg",
                "mk",
                "ml",
                "mm",
                "mn",
                "mq",
                "mr",
                "ms",
                "mt",
                "mu",
                "mv",
                "mw",
                "mx",
                "my",
                "mz",
                "na",
                "nc",
                "ne",
                "ng",
                "ni",
                "nl",
                "no",
                "np",
                "nr",
                "nu",
                "nz",
                "om",
                "pa",
                "pe",
                "pf",
                "pg",
                "ph",
                "pk",
                "pl",
                "pn",
                "pr",
                "ps",
                "pt",
                "py",
                "qa",
                "re",
                "ro",
                "rs",
                "ru",
                "rw",
                "sa",
                "sb",
                "sc",
                "se",
                "sg",
                "sh",
                "si",
                "sk",
                "sl",
                "sm",
                "sn",
                "so",
                "sr",
                "st",
                "sv",
                "td",
                "tg",
                "th",
                "tj",
                "tk",
                "tl",
                "tm",
                "tn",
                "to",
                "tr",
                "tt",
                "tw",
                "tz",
                "ua",
                "ug",
                "us",
                "uy",
                "uz",
                "vc",
                "ve",
                "vg",
                "vi",
                "vn",
                "vu",
                "ws",
                "ye",
                "yt",
                "za",
                "zm",
                "zw"
              ]
            },
            "name": "country",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/site-explorer.output"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.ai-responses-count"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.ai-responses-count"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/site-explorer.error_400"
          },
          "401": {
            "$ref": "#/components/responses/site-explorer.error_401"
          },
          "403": {
            "$ref": "#/components/responses/site-explorer.error_403"
          },
          "429": {
            "$ref": "#/components/responses/site-explorer.error_429"
          },
          "500": {
            "$ref": "#/components/responses/site-explorer.error_500"
          }
        }
      }
    },
    "/site-explorer/refdomains-history": {
      "get": {
        "tags": [
          "Site Explorer"
        ],
        "summary": "Refdomains history",
        "operationId": "site-explorer.refdomains-history",
        "parameters": [
          {
            "description": "The scope of the target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "exact",
                "prefix",
                "domain",
                "subdomains"
              ],
              "default": "subdomains"
            },
            "name": "mode",
            "in": "query"
          },
          {
            "description": "The target of the search: a domain or a URL.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "url"
            },
            "name": "target",
            "in": "query"
          },
          {
            "description": "The protocol of your target.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "both",
                "http",
                "https"
              ],
              "default": "both"
            },
            "name": "protocol",
            "in": "query"
          },
          {
            "description": "The start date of the historical period in YYYY-MM-DD format.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date_from",
            "in": "query"
          },
          {
            "description": "The end date of the historical period in YYYY-MM-DD format.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date_to",
            "in": "query"
          },
          {
            "description": "The time interval used to group historical data.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly"
              ],
              "default": "monthly"
            },
            "name": "history_grouping",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/site-explorer.output"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.refdomains-history"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.refdomains-history"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/site-explorer.error_400"
          },
          "401": {
            "$ref": "#/components/responses/site-explorer.error_401"
          },
          "403": {
            "$ref": "#/components/responses/site-explorer.error_403"
          },
          "429": {
            "$ref": "#/components/responses/site-explorer.error_429"
          },
          "500": {
            "$ref": "#/components/responses/site-explorer.error_500"
          }
        }
      }
    },
    "/site-explorer/domain-rating-history": {
      "get": {
        "tags": [
          "Site Explorer"
        ],
        "summary": "Domain Rating history",
        "operationId": "site-explorer.domain-rating-history",
        "parameters": [
          {
            "description": "The target of the search: a domain or a URL.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "url"
            },
            "name": "target",
            "in": "query"
          },
          {
            "description": "The start date of the historical period in YYYY-MM-DD format.",
            "required": true,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date_from",
            "in": "query"
          },
          {
            "description": "The end date of the historical period in YYYY-MM-DD format.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "name": "date_to",
            "in": "query"
          },
          {
            "description": "The time interval used to group historical data.",
            "required": false,
            "explode": false,
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly"
              ],
              "default": "monthly"
            },
            "name": "history_grouping",
            "in": "query"
          },
          {
            "$ref": "#/components/parameters/site-explorer.output"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.domain-rating-history"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/site-explorer.domain-rating-history"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/site-explorer.error_400"
          },
        

# --- truncated at 32 KB (2048 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ahrefs/refs/heads/main/openapi/_original/ahrefs-openapi-original.json