{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs Scraper - Backlink & Anchor Detail",
    "description": "Ahrefs Scraper: Extract backlink and anchor text details, including referring domains, target URLs, link types, anchor text, domain metrics, and backlink data. Analyze link profiles, compare competitors, identify valuable links, and uncover SEO opportunities.",
    "version": "0.2",
    "x-build-id": "XTJqyrqR3haS5PRwI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~ahrefs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-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/scrapier~ahrefs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-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/scrapier~ahrefs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-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": {
          "url": {
            "title": "🔗 Target Domain or URL",
            "type": "string",
            "description": "The domain or URL whose backlinks you want (e.g. make.com). For many targets at once, use the bulk field below."
          },
          "urls": {
            "title": "🔗 Target Domains / URLs (Bulk)",
            "type": "array",
            "description": "A list of domains or URLs to pull backlinks for. Add one by one or paste in bulk. When set, this overrides the single target above.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "🔑 Keyword / Brand (optional)",
            "type": "string",
            "description": "Optional keyword (or brand, for AI Visibility) — only used by the keyword/SERP/AI add-ons below, not required for backlinks."
          },
          "country": {
            "title": "🌍 Localisation 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 used to localise keyword, SERP and traffic results (backlinks are global).",
            "default": "us"
          },
          "mode": {
            "title": "🎯 Link Scope",
            "enum": [
              "subdomains",
              "exact"
            ],
            "type": "string",
            "description": "Scope of the analysis: 'subdomains' (whole site incl. subdomains) or 'exact' (just the exact URL/host).",
            "default": "subdomains"
          },
          "include_backlinks": {
            "title": "🔗 Backlink & Referring-Domain Report",
            "type": "boolean",
            "description": "The core of this actor. If checked, returns the backlink & referring-domain overview PLUS (below) the individual top backlink rows with anchor detail.",
            "default": true
          },
          "fetchBacklinkList": {
            "title": "🔗 Fetch Individual Backlink List",
            "type": "boolean",
            "description": "Wire in Ahrefs' free Backlink Checker LIST surface: each top backlink as its own row — source page URL & title, target URL, anchor text, anchor-type flag and linking Domain Rating. Rolls up top anchors & top linking pages. The free surface returns a top sample (~20 rows).",
            "default": true
          },
          "includeAnchorText": {
            "title": "⚓ Include Anchor Text",
            "type": "boolean",
            "description": "Include the raw anchor text of each backlink and build the top-anchors roll-up. Turn off to keep only the derived anchor-type flag (brand/exact/partial/generic/url/empty).",
            "default": true
          },
          "minLinkingDR": {
            "title": "📊 Minimum Linking Domain Rating",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop individual backlinks whose linking (referring) Domain Rating is below this value. 0 keeps every backlink.",
            "default": 0
          },
          "include_web_authority": {
            "title": "🏆 Add Domain Rating & Authority",
            "type": "boolean",
            "description": "Needs a Domain/URL. If checked, includes Domain Rating, backlinks & referring-domain counts.",
            "default": true
          },
          "include_traffic": {
            "title": "📈 Add Traffic Estimates",
            "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": "🤖 Add AI Visibility",
            "type": "boolean",
            "description": "Needs a Brand/Keyword. If checked, includes AI citations across LLMs, top cited domains/pages & topics.",
            "default": false
          },
          "include_keywords": {
            "title": "💡 Add Keyword Ideas",
            "type": "boolean",
            "description": "Needs a Keyword and Country. If checked, includes keyword ideas + question ideas with volumes.",
            "default": false
          },
          "include_keywords_difficulty": {
            "title": "⚙️ Add Keyword Difficulty",
            "type": "boolean",
            "description": "Needs a Keyword and Country. If checked, includes the Keyword Difficulty score + ranking SERP.",
            "default": false
          },
          "include_keywords_ranking": {
            "title": "🎯 Add Keyword Ranking",
            "type": "boolean",
            "description": "Needs a Keyword, Domain and Country. If checked, includes where the domain ranks for the keyword.",
            "default": false
          },
          "include_serp": {
            "title": "🔎 Add SERP Overview",
            "type": "boolean",
            "description": "Needs a Keyword and Country. If checked, includes the full SERP overview for the keyword.",
            "default": false
          },
          "include_broken_links": {
            "title": "🧩 Add Broken-Link Audit",
            "type": "boolean",
            "description": "Needs a Domain/URL. If checked, includes broken inbound & outbound links.",
            "default": false
          },
          "include_top_websites": {
            "title": "🌐 Add AhrefsTop Trending Websites",
            "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": "🗂️ Trending Category (Top Websites)",
            "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": "🌎 Trending Country (Top Websites)",
            "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"
          },
          "captchaApiKey": {
            "title": "🔐 Captcha Solver API Key",
            "type": "string",
            "description": "Your CapSolver (or 2Captcha) API key. Ahrefs gates every free tool behind Cloudflare Turnstile, so a solver key is required to collect data. Stored encrypted; never logged."
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}