{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs Scraper",
    "description": "Scrape Ahrefs SEO data: Domain Rating, backlinks, organic traffic, keyword ideas, keyword difficulty, SERP, rank checks, AI search visibility, competitors and top websites. Export JSON, CSV, Excel.",
    "version": "1.1",
    "x-build-id": "qklyKvtrpsVIIlvJq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~ahrefs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-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/parsebird~ahrefs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-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/parsebird~ahrefs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-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": "URL or domain",
            "type": "string",
            "description": "Enter one website, domain or page to analyze, e.g. <code>make.com</code> or <code>https://www.make.com/en/pricing</code>. Used by authority, traffic, backlinks, broken links, competitors, sitemap and keyword ranking."
          },
          "urls": {
            "title": "More URLs or domains",
            "type": "array",
            "description": "Add more websites for bulk analysis. Every search type you switch on runs for each one.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Enter a keyword, topic or brand, e.g. <code>ai agent</code>. Used by keyword ideas, keyword difficulty, SERP, keyword ranking and the AI search tools."
          },
          "keywords": {
            "title": "More keywords",
            "type": "array",
            "description": "Add more keywords for bulk keyword research.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Keyword country",
            "enum": [
              "us",
              "af",
              "al",
              "dz",
              "as",
              "ad",
              "ao",
              "ai",
              "ag",
              "ar",
              "am",
              "aw",
              "au",
              "at",
              "az",
              "bs",
              "bh",
              "bd",
              "bb",
              "by",
              "be",
              "bz",
              "bj",
              "bm",
              "bt",
              "bo",
              "ba",
              "bw",
              "br",
              "bn",
              "bg",
              "bf",
              "bi",
              "kh",
              "cm",
              "ca",
              "cv",
              "ky",
              "cf",
              "td",
              "cl",
              "cn",
              "co",
              "cg",
              "cd",
              "ck",
              "cr",
              "ci",
              "hr",
              "cu",
              "cy",
              "cz",
              "dk",
              "dj",
              "dm",
              "do",
              "ec",
              "eg",
              "sv",
              "gq",
              "ee",
              "et",
              "fo",
              "fj",
              "fi",
              "fr",
              "gf",
              "pf",
              "ga",
              "gm",
              "ge",
              "de",
              "gh",
              "gi",
              "gr",
              "gl",
              "gd",
              "gp",
              "gu",
              "gt",
              "gg",
              "gn",
              "gy",
              "ht",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "ir",
              "iq",
              "ie",
              "im",
              "il",
              "it",
              "jm",
              "jp",
              "je",
              "jo",
              "kz",
              "ke",
              "ki",
              "kw",
              "kg",
              "la",
              "lv",
              "lb",
              "ls",
              "lr",
              "ly",
              "li",
              "lt",
              "lu",
              "mg",
              "mw",
              "my",
              "mv",
              "ml",
              "mt",
              "mq",
              "mr",
              "mu",
              "yt",
              "mx",
              "fm",
              "md",
              "mc",
              "mn",
              "me",
              "ms",
              "ma",
              "mz",
              "mm",
              "na",
              "nr",
              "np",
              "nl",
              "nc",
              "nz",
              "ni",
              "ne",
              "ng",
              "nu",
              "mk",
              "no",
              "om",
              "pk",
              "pw",
              "ps",
              "pa",
              "pg",
              "py",
              "pe",
              "ph",
              "pn",
              "pl",
              "pt",
              "pr",
              "qa",
              "ye",
              "re",
              "ro",
              "ru",
              "rw",
              "sh",
              "kn",
              "lc",
              "vc",
              "ws",
              "sm",
              "st",
              "sa",
              "sn",
              "rs",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "so",
              "za",
              "kr",
              "es",
              "lk",
              "sr",
              "sz",
              "se",
              "ch",
              "sy",
              "tw",
              "tj",
              "tz",
              "th",
              "tl",
              "tg",
              "tk",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "tv",
              "ug",
              "ua",
              "ae",
              "gb",
              "uy",
              "uz",
              "vu",
              "ve",
              "vn",
              "vg",
              "vi",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Country database for keyword ideas, keyword difficulty, SERP and keyword ranking.",
            "default": "us"
          },
          "mode": {
            "title": "Search scope",
            "enum": [
              "subdomains",
              "domain",
              "prefix",
              "exact"
            ],
            "type": "string",
            "description": "How Ahrefs matches the URL. <b>Subdomains</b> = the domain with all its subdomains (*.domain.com/*). <b>Domain</b> = the domain without subdomains. <b>Prefix</b> = every URL that starts with the path. <b>Exact</b> = only that exact URL.",
            "default": "subdomains"
          },
          "include_web_authority": {
            "title": "Website authority (Domain Rating)",
            "type": "boolean",
            "description": "Domain Rating, backlinks, referring domains and dofollow metrics.",
            "default": true
          },
          "include_traffic": {
            "title": "Website traffic",
            "type": "boolean",
            "description": "Organic traffic, traffic value, traffic history, top pages, top countries and top keywords. Sites listed on AhrefsTop also get all-time monthly history, exact traffic by country and traffic rank.",
            "default": true
          },
          "include_backlinks": {
            "title": "Backlinks",
            "type": "boolean",
            "description": "Backlink and referring-domain totals plus the top 20 backlinks with anchor text, source page and Domain Rating.",
            "default": true
          },
          "include_broken_links": {
            "title": "Broken links",
            "type": "boolean",
            "description": "Broken inbound links (links to 404 pages on the site) and broken outbound links found on the site.",
            "default": false
          },
          "include_competitors": {
            "title": "Organic competitors",
            "type": "boolean",
            "description": "Top competing websites with traffic and page counts. Only for sites listed on AhrefsTop (roughly the top sites by organic traffic).",
            "default": false
          },
          "include_xml_sitemap": {
            "title": "XML sitemap URLs",
            "type": "boolean",
            "description": "Up to 1,000 URLs Ahrefs has crawled for the site, with last-modified dates.",
            "default": false
          },
          "traffic_country": {
            "title": "Traffic country",
            "enum": [
              "",
              "us",
              "af",
              "al",
              "dz",
              "as",
              "ad",
              "ao",
              "ai",
              "ag",
              "ar",
              "am",
              "aw",
              "au",
              "at",
              "az",
              "bs",
              "bh",
              "bd",
              "bb",
              "by",
              "be",
              "bz",
              "bj",
              "bm",
              "bt",
              "bo",
              "ba",
              "bw",
              "br",
              "bn",
              "bg",
              "bf",
              "bi",
              "kh",
              "cm",
              "ca",
              "cv",
              "ky",
              "cf",
              "td",
              "cl",
              "cn",
              "co",
              "cg",
              "cd",
              "ck",
              "cr",
              "ci",
              "hr",
              "cu",
              "cy",
              "cz",
              "dk",
              "dj",
              "dm",
              "do",
              "ec",
              "eg",
              "sv",
              "gq",
              "ee",
              "et",
              "fo",
              "fj",
              "fi",
              "fr",
              "gf",
              "pf",
              "ga",
              "gm",
              "ge",
              "de",
              "gh",
              "gi",
              "gr",
              "gl",
              "gd",
              "gp",
              "gu",
              "gt",
              "gg",
              "gn",
              "gy",
              "ht",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "ir",
              "iq",
              "ie",
              "im",
              "il",
              "it",
              "jm",
              "jp",
              "je",
              "jo",
              "kz",
              "ke",
              "ki",
              "kw",
              "kg",
              "la",
              "lv",
              "lb",
              "ls",
              "lr",
              "ly",
              "li",
              "lt",
              "lu",
              "mg",
              "mw",
              "my",
              "mv",
              "ml",
              "mt",
              "mq",
              "mr",
              "mu",
              "yt",
              "mx",
              "fm",
              "md",
              "mc",
              "mn",
              "me",
              "ms",
              "ma",
              "mz",
              "mm",
              "na",
              "nr",
              "np",
              "nl",
              "nc",
              "nz",
              "ni",
              "ne",
              "ng",
              "nu",
              "mk",
              "no",
              "om",
              "pk",
              "pw",
              "ps",
              "pa",
              "pg",
              "py",
              "pe",
              "ph",
              "pn",
              "pl",
              "pt",
              "pr",
              "qa",
              "ye",
              "re",
              "ro",
              "ru",
              "rw",
              "sh",
              "kn",
              "lc",
              "vc",
              "ws",
              "sm",
              "st",
              "sa",
              "sn",
              "rs",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "so",
              "za",
              "kr",
              "es",
              "lk",
              "sr",
              "sz",
              "se",
              "ch",
              "sy",
              "tw",
              "tj",
              "tz",
              "th",
              "tl",
              "tg",
              "tk",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "tv",
              "ug",
              "ua",
              "ae",
              "gb",
              "uy",
              "uz",
              "vu",
              "ve",
              "vn",
              "vg",
              "vi",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Optional. Limit top pages and top keywords in the traffic results to one country. Leave empty for worldwide.",
            "default": ""
          },
          "include_keywords": {
            "title": "Keyword ideas",
            "type": "boolean",
            "description": "Keyword ideas and question ideas with difficulty and volume range.",
            "default": false
          },
          "include_keywords_difficulty": {
            "title": "Keyword difficulty",
            "type": "boolean",
            "description": "Ahrefs Keyword Difficulty (0-100), estimated referring domains needed for the top 10, and the SERP with page metrics.",
            "default": false
          },
          "include_serp": {
            "title": "SERP results",
            "type": "boolean",
            "description": "Top Google results for the keyword: organic results, AI Overview, discussions, videos and other SERP features, with Ahrefs metrics for the top pages.",
            "default": false
          },
          "include_keywords_ranking": {
            "title": "Keyword ranking",
            "type": "boolean",
            "description": "Where each URL or domain ranks for each keyword, plus the SERP with your results marked.",
            "default": false
          },
          "include_ai_visibility": {
            "title": "AI visibility",
            "type": "boolean",
            "description": "AI citations for the keyword or brand across ChatGPT, Gemini, Perplexity, Copilot, Grok, Google AI Overviews and AI Mode, with top cited domains, pages and topics. Uses the domain when no keyword is given.",
            "default": false
          },
          "include_ai_overview": {
            "title": "Google AI Overviews",
            "type": "boolean",
            "description": "Google AI Overview mentions for the keyword or brand, monthly citation history, top cited domains and pages.",
            "default": false
          },
          "include_ai_mode": {
            "title": "Google AI Mode",
            "type": "boolean",
            "description": "Google AI Mode mentions for the keyword or brand, monthly citation history, top cited domains and pages.",
            "default": false
          },
          "include_top_websites": {
            "title": "Top websites ranking",
            "type": "boolean",
            "description": "AhrefsTop ranking of the most visited websites by organic search traffic, plus trending up and down sites.",
            "default": false
          },
          "category_top_websites": {
            "title": "Category",
            "enum": [
              "all",
              "arts-and-entertainment",
              "autos-and-vehicles",
              "beauty-and-fitness",
              "books-and-literature",
              "business",
              "computers-and-electronics",
              "finance",
              "food-and-drink",
              "games",
              "health",
              "hobbies-and-leisure",
              "home-and-garden",
              "internet-and-telecom",
              "jobs-and-education",
              "law-and-government",
              "news",
              "social-networks",
              "people-and-society",
              "pets-and-animals",
              "real-estate",
              "reference",
              "science",
              "shopping",
              "sports",
              "travel-and-transportation"
            ],
            "type": "string",
            "description": "Category of the top websites ranking.",
            "default": "all"
          },
          "country_top_websites": {
            "title": "Country",
            "enum": [
              "worldwide",
              "afghanistan",
              "albania",
              "algeria",
              "andorra",
              "angola",
              "antigua-and-barbuda",
              "argentina",
              "armenia",
              "australia",
              "austria",
              "azerbaijan",
              "bahamas",
              "bahrain",
              "bangladesh",
              "belarus",
              "belgium",
              "belize",
              "benin",
              "bhutan",
              "bolivia",
              "bosnia-and-herzegovina",
              "botswana",
              "brazil",
              "brunei-darussalam",
              "bulgaria",
              "burkina-faso",
              "burundi",
              "cambodia",
              "cameroon",
              "canada",
              "cape-verde",
              "central-african-republic",
              "chad",
              "chile",
              "colombia",
              "congo",
              "congo-democratic-republic",
              "costa-rica",
              "cote-divoire",
              "croatia",
              "cyprus",
              "czech-republic",
              "denmark",
              "djibouti",
              "dominican-republic",
              "ecuador",
              "egypt",
              "el-salvador",
              "estonia",
              "ethiopia",
              "fiji",
              "finland",
              "france",
              "gabon",
              "gambia",
              "georgia",
              "germany",
              "ghana",
              "gibraltar",
              "greece",
              "greenland",
              "guadeloupe",
              "guatemala",
              "guernsey",
              "guyana",
              "haiti",
              "honduras",
              "hong-kong",
              "hungary",
              "iceland",
              "india",
              "indonesia",
              "iraq",
              "ireland",
              "isle-of-man",
              "israel",
              "italy",
              "jamaica",
              "japan",
              "jersey",
              "jordan",
              "kazakhstan",
              "kenya",
              "kuwait",
              "kyrgyzstan",
              "lao-peoples-democratic-republic",
              "latvia",
              "lebanon",
              "lesotho",
              "libyan-arab-jamahiriya",
              "liechtenstein",
              "lithuania",
              "luxembourg",
              "madagascar",
              "malawi",
              "malaysia",
              "maldives",
              "mali",
              "malta",
              "mauritius",
              "mexico",
              "moldova",
              "mongolia",
              "montenegro",
              "morocco",
              "mozambique",
              "myanmar",
              "namibia",
              "nepal",
              "netherlands",
              "new-zealand",
              "nicaragua",
              "niger",
              "nigeria",
              "north-macedonia",
              "norway",
              "oman",
              "pakistan",
              "palestine",
              "panama",
              "papua-new-guinea",
              "paraguay",
              "peru",
              "philippines",
              "poland",
              "portugal",
              "puerto-rico",
              "qatar",
              "romania",
              "russian-federation",
              "rwanda",
              "saint-vincent-and-grenadines",
              "saudi-arabia",
              "senegal",
              "serbia",
              "seychelles",
              "sierra-leone",
              "singapore",
              "slovakia",
              "slovenia",
              "somalia",
              "south-africa",
              "korea",
              "spain",
              "sri-lanka",
              "suriname",
              "sweden",
              "switzerland",
              "taiwan",
              "tajikistan",
              "tanzania",
              "thailand",
              "timor-leste",
              "togo",
              "trinidad-and-tobago",
              "tunisia",
              "turkey",
              "turkmenistan",
              "uganda",
              "ukraine",
              "united-arab-emirates",
              "united-kingdom",
              "united-states",
              "uruguay",
              "uzbekistan",
              "venezuela",
              "vietnam",
              "virgin-islands-us",
              "zambia",
              "zimbabwe"
            ],
            "type": "string",
            "description": "Country of the top websites ranking.",
            "default": "worldwide"
          },
          "max_top_websites": {
            "title": "Max websites",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many ranked websites to return. Worldwide with all categories goes up to 1,000; country or category rankings have up to 100.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed in most cases. Use a proxy only if lookups start failing.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}