{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs Scraper",
    "description": "🔎 Ahrefs Scraper automates extraction of SEO insights from Ahrefs—backlinks, keywords, top pages & domains—so you can speed up competitive research, link building, and reporting. 🚀 Clean, efficient, API-ready. 📈",
    "version": "0.2",
    "x-build-id": "rgYFnIPWJnQ141NRd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~ahrefs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-ahrefs-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapio~ahrefs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-ahrefs-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapio~ahrefs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-ahrefs-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "title": "💡 Keyword or Brand",
            "type": "string",
            "description": "The keyword (or brand, for AI Visibility) to research on Ahrefs."
          },
          "url": {
            "title": "🌐 URL or Domain",
            "type": "string",
            "description": "The single URL or domain to analyse on Ahrefs (e.g. make.com). For many targets at once, use the bulk field below."
          },
          "country": {
            "title": "🗺️ Country",
            "enum": [
              "af",
              "al",
              "dz",
              "as",
              "ad",
              "ao",
              "ai",
              "ag",
              "ar",
              "am",
              "au",
              "at",
              "az",
              "bs",
              "bh",
              "bd",
              "by",
              "be",
              "bz",
              "bj",
              "bt",
              "bo",
              "ba",
              "bw",
              "br",
              "bn",
              "bg",
              "bf",
              "bi",
              "kh",
              "cm",
              "ca",
              "cv",
              "cf",
              "td",
              "cl",
              "co",
              "cg",
              "cd",
              "ck",
              "cr",
              "ci",
              "hr",
              "cy",
              "cz",
              "dk",
              "dj",
              "dm",
              "do",
              "ec",
              "eg",
              "sv",
              "ee",
              "et",
              "fj",
              "fi",
              "fr",
              "ga",
              "gm",
              "ge",
              "de",
              "gh",
              "gi",
              "gr",
              "gl",
              "gp",
              "gt",
              "gg",
              "gy",
              "ht",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "iq",
              "ie",
              "il",
              "it",
              "jm",
              "jp",
              "je",
              "jo",
              "kz",
              "ke",
              "ki",
              "kr",
              "kw",
              "kg",
              "la",
              "lv",
              "lb",
              "ls",
              "ly",
              "li",
              "lt",
              "lu",
              "mk",
              "mg",
              "mw",
              "my",
              "mv",
              "ml",
              "mt",
              "mu",
              "mx",
              "fm",
              "md",
              "mn",
              "me",
              "ms",
              "ma",
              "mz",
              "mm",
              "na",
              "nr",
              "np",
              "nl",
              "nz",
              "ni",
              "ne",
              "ng",
              "nu",
              "no",
              "om",
              "pk",
              "ps",
              "pa",
              "pg",
              "py",
              "pe",
              "ph",
              "pn",
              "pl",
              "pt",
              "pr",
              "qa",
              "ro",
              "ru",
              "rw",
              "sh",
              "vc",
              "ws",
              "sm",
              "st",
              "sa",
              "sn",
              "rs",
              "sc",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "so",
              "za",
              "es",
              "lk",
              "sr",
              "se",
              "ch",
              "tw",
              "tj",
              "tz",
              "th",
              "tl",
              "tg",
              "tk",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "ug",
              "ua",
              "ae",
              "gb",
              "us",
              "uy",
              "uz",
              "vu",
              "ve",
              "vn",
              "vg",
              "vi",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Country to localise keyword, SERP and traffic results.",
            "default": "us"
          },
          "mode": {
            "title": "🎚️ Mode",
            "enum": [
              "subdomains",
              "exact"
            ],
            "type": "string",
            "description": "Scope of the domain analysis: 'subdomains' (whole site incl. subdomains) or 'exact' (just the exact URL/host).",
            "default": "subdomains"
          },
          "urls": {
            "title": "📚 Multiple URLs or Domains (Bulk)",
            "type": "array",
            "description": "A list of URLs or domains to analyse on Ahrefs. Add them one by one or paste in bulk. When set, this overrides the single URL field above.",
            "items": {
              "type": "string"
            }
          },
          "include_web_authority": {
            "title": "🏆 Include Domain Overview / Website Authority",
            "type": "boolean",
            "description": "Needs a Domain/URL. If checked, includes Domain Rating, backlinks & referring-domain counts.",
            "default": true
          },
          "include_traffic": {
            "title": "📊 Include Web-Traffic",
            "type": "boolean",
            "description": "Needs a Domain/URL. If checked, includes estimated monthly visits, traffic value, history, top pages/countries/keywords.",
            "default": true
          },
          "include_ai_visibility": {
            "title": "🤖 Include AI Visibility Search (New)",
            "type": "boolean",
            "description": "Needs a Brand/Keyword. If checked, includes AI citations across LLMs, top cited domains/pages & topics.",
            "default": false
          },
          "include_keywords": {
            "title": "💡 Include Keywords Search",
            "type": "boolean",
            "description": "Needs a Keyword and Country. If checked, includes keyword ideas + question ideas with volumes.",
            "default": false
          },
          "include_keywords_difficulty": {
            "title": "⚙️ Include Keywords Difficulty Search",
            "type": "boolean",
            "description": "Needs a Keyword and Country. If checked, includes the Keyword Difficulty score + ranking SERP.",
            "default": false
          },
          "include_keywords_ranking": {
            "title": "🎯 Include Keywords Ranking Search",
            "type": "boolean",
            "description": "Needs a Keyword, Domain and Country. If checked, includes where the domain ranks for the keyword.",
            "default": false
          },
          "include_serp": {
            "title": "🔎 Include SERP Search",
            "type": "boolean",
            "description": "Needs a Keyword and Country. If checked, includes the full SERP overview for the keyword.",
            "default": false
          },
          "include_backlinks": {
            "title": "🔗 Include Backlinks Search",
            "type": "boolean",
            "description": "Needs a Domain/URL. If checked, includes the backlink & referring-domain overview.",
            "default": true
          },
          "include_broken_links": {
            "title": "🧩 Include Broken Links Search",
            "type": "boolean",
            "description": "Needs a Domain/URL. If checked, includes broken inbound & outbound links.",
            "default": false
          },
          "include_top_websites": {
            "title": "🌍 Include AhrefsTop Trending Websites Search",
            "type": "boolean",
            "description": "If checked, includes the top trending websites from AhrefsTop.com — the Top 1000 (worldwide + all categories) or Top 100 when filtered by category/country. Does not need a Keyword or Domain.",
            "default": false
          },
          "category_top_websites": {
            "title": "🗂️ Category (Top Websites Search Only)",
            "enum": [
              "all",
              "beauty-and-fitness",
              "books-and-literature",
              "business",
              "computers-and-electronics",
              "arts-and-entertainment",
              "finance",
              "food-and-drink",
              "games",
              "health",
              "hobbies-and-leisure",
              "home-and-garden",
              "internet-and-telecom",
              "jobs-and-education",
              "law-and-government",
              "news",
              "people-and-society",
              "pets-and-animals",
              "real-estate",
              "reference",
              "science",
              "shopping",
              "social-networks",
              "sports",
              "travel-and-transportation",
              "autos-and-vehicles"
            ],
            "type": "string",
            "description": "Category to filter the AhrefsTop trending websites ranking.",
            "default": "all"
          },
          "country_top_websites": {
            "title": "🌎 Country (Top Websites Search Only)",
            "enum": [
              "worldwide",
              "af",
              "al",
              "dz",
              "as",
              "ad",
              "ao",
              "ai",
              "ag",
              "ar",
              "am",
              "au",
              "at",
              "az",
              "bs",
              "bh",
              "bd",
              "by",
              "be",
              "bz",
              "bj",
              "bt",
              "bo",
              "ba",
              "bw",
              "br",
              "bn",
              "bg",
              "bf",
              "bi",
              "kh",
              "cm",
              "ca",
              "cv",
              "cf",
              "td",
              "cl",
              "co",
              "cg",
              "cd",
              "ck",
              "cr",
              "ci",
              "hr",
              "cy",
              "cz",
              "dk",
              "dj",
              "dm",
              "do",
              "ec",
              "eg",
              "sv",
              "ee",
              "et",
              "fj",
              "fi",
              "fr",
              "ga",
              "gm",
              "ge",
              "de",
              "gh",
              "gi",
              "gr",
              "gl",
              "gp",
              "gt",
              "gg",
              "gy",
              "ht",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "iq",
              "ie",
              "il",
              "it",
              "jm",
              "jp",
              "je",
              "jo",
              "kz",
              "ke",
              "ki",
              "kr",
              "kw",
              "kg",
              "la",
              "lv",
              "lb",
              "ls",
              "ly",
              "li",
              "lt",
              "lu",
              "mk",
              "mg",
              "mw",
              "my",
              "mv",
              "ml",
              "mt",
              "mu",
              "mx",
              "fm",
              "md",
              "mn",
              "me",
              "ms",
              "ma",
              "mz",
              "mm",
              "na",
              "nr",
              "np",
              "nl",
              "nz",
              "ni",
              "ne",
              "ng",
              "nu",
              "no",
              "om",
              "pk",
              "ps",
              "pa",
              "pg",
              "py",
              "pe",
              "ph",
              "pn",
              "pl",
              "pt",
              "pr",
              "qa",
              "ro",
              "ru",
              "rw",
              "sh",
              "vc",
              "ws",
              "sm",
              "st",
              "sa",
              "sn",
              "rs",
              "sc",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "so",
              "za",
              "es",
              "lk",
              "sr",
              "se",
              "ch",
              "tw",
              "tj",
              "tz",
              "th",
              "tl",
              "tg",
              "tk",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "ug",
              "ua",
              "ae",
              "gb",
              "us",
              "uy",
              "uz",
              "vu",
              "ve",
              "vn",
              "vg",
              "vi",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Country to filter the AhrefsTop trending websites ranking.",
            "default": "worldwide"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "The scraper starts on a DIRECT connection and only escalates to a datacenter, then residential proxy if Ahrefs blocks it. Pick a country here to localise residential fallback.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}