{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs Scraper DR, Backlinks, Keywords, Traffic & AI Visibility",
    "description": "Scrape Ahrefs free SEO data — no account. Domain Rating, backlinks & referring domains, broken links, organic traffic, keyword ideas & difficulty, SERP, AI-visibility citations, and the top-websites ranking. Bulk domains, keywords & brands, 188 countries. JSON/CSV/Excel",
    "version": "0.0",
    "x-build-id": "VaPhQhQ0q8estiZ9S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~ahrefs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-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/memo23~ahrefs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-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/memo23~ahrefs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-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": {
          "urls": {
            "title": "Domains / URLs",
            "type": "array",
            "description": "Domains or URLs (e.g. `apify.com`) — each returns Domain Rating, backlinks, broken links, and organic-traffic data (per the Website datasets toggles).",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Seed keywords — each returns keyword ideas, difficulty, SERP overview, and (with a rank domain) a rank check.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands (AI visibility)",
            "type": "array",
            "description": "Brand names — each returns AI-visibility citations across ChatGPT, Gemini, Perplexity, Copilot, Grok, and Google AI.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code for keyword & traffic datasets, e.g. `us`, `gb`, `de`, `in`.",
            "default": "us"
          },
          "mode": {
            "title": "URL scope",
            "enum": [
              "exact",
              "subdomains",
              "prefix",
              "domain"
            ],
            "type": "string",
            "description": "How to scope backlinks / broken links / traffic for a URL. `subdomains` = the domain and its subdomains; `exact` = the single URL; `prefix` = all pages under the path; `domain` = the whole domain.",
            "default": "subdomains"
          },
          "protocol": {
            "title": "Traffic protocol",
            "enum": [
              "both",
              "https",
              "http"
            ],
            "type": "string",
            "description": "Protocol for the traffic dataset.",
            "default": "both"
          },
          "searchEngine": {
            "title": "Keyword search engine",
            "enum": [
              "Google",
              "Bing",
              "YouTube",
              "Amazon",
              "Yahoo",
              "Yandex",
              "Baidu",
              "Naver",
              "Seznam",
              "GoogleImages",
              "GoogleNews",
              "GoogleAIMode",
              "ChatGPT",
              "Gemini",
              "Perplexity",
              "Copilot",
              "Grok"
            ],
            "type": "string",
            "description": "Search engine for keyword ideas. Includes AI engines.",
            "default": "Google"
          },
          "rankDomain": {
            "title": "Rank-check domain (optional)",
            "type": "string",
            "description": "When set, each keyword also returns where this domain ranks for it (best organic position). Leave empty to skip rank checks."
          },
          "includeBacklinks": {
            "title": "Backlinks overview",
            "type": "boolean",
            "description": "Domain Rating, total backlinks, referring domains, and dofollow split.",
            "default": true
          },
          "includeBacklinksList": {
            "title": "Backlinks list (individual)",
            "type": "boolean",
            "description": "The individual top backlinks — source page URL, target URL, anchor text, source Domain Rating, and HTTP status. Reuses the backlinks-overview solve (no extra cost).",
            "default": false
          },
          "includeWebsiteAuthority": {
            "title": "Website authority (Domain Rating only)",
            "type": "boolean",
            "description": "A standalone Domain Rating + backlink-count row. Redundant if the backlinks overview is on (which already includes DR).",
            "default": false
          },
          "includeBrokenLinks": {
            "title": "Broken links",
            "type": "boolean",
            "description": "Broken inbound links pointing at the target — source page, anchor, HTTP status, and source Domain Rating.",
            "default": false
          },
          "includeTraffic": {
            "title": "Traffic overview",
            "type": "boolean",
            "description": "Estimated monthly organic traffic & value, 12-month traffic history, and top pages / countries / keywords.",
            "default": false
          },
          "includeKeywordIdeas": {
            "title": "Keyword ideas",
            "type": "boolean",
            "description": "Related keyword ideas — each with a difficulty label and search-volume band.",
            "default": true
          },
          "includeQuestionIdeas": {
            "title": "Question ideas",
            "type": "boolean",
            "description": "Also include question-style keyword ideas (what / how / why …) alongside the keyword ideas.",
            "default": false
          },
          "includeKeywordDifficulty": {
            "title": "Keyword difficulty (SERP)",
            "type": "boolean",
            "description": "The live SERP scored for keyword difficulty — organic results with Domain Rating, URL Rating, traffic, and referring-domain metrics.",
            "default": false
          },
          "includeSerpOverview": {
            "title": "SERP overview",
            "type": "boolean",
            "description": "The full SERP for a keyword — every organic result with its position, Domain Rating, URL Rating, estimated traffic, and top keyword.",
            "default": false
          },
          "includeTopWebsites": {
            "title": "Top websites ranking",
            "type": "boolean",
            "description": "Scrape the Ahrefs top-websites list (rank, domain, category, estimated monthly visits, and change).",
            "default": false
          },
          "topWebsitesCategory": {
            "title": "Top-websites category (optional)",
            "type": "string",
            "description": "Filter the ranking by category slug, e.g. `finance`, `shopping`, `news`, `health`, `arts-and-entertainment`. Leave empty for all categories."
          },
          "topWebsitesCountry": {
            "title": "Top-websites country (optional)",
            "type": "string",
            "description": "Filter the ranking by country slug, e.g. `united-kingdom`, `india`, `canada`. Combines with the category filter. Leave empty for worldwide."
          },
          "topWebsitesLimit": {
            "title": "Max top-website rows",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on top-website rows. The worldwide list paginates (100/page); category/country-filtered lists are roughly a single page.",
            "default": 100
          },
          "maxBacklinks": {
            "title": "Max backlinks / broken links per URL",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on individual backlink and broken-link rows collected per URL.",
            "default": 100
          },
          "maxKeywordIdeas": {
            "title": "Max keyword ideas per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on keyword-idea rows collected per seed keyword.",
            "default": 100
          },
          "maxSerpResults": {
            "title": "Max SERP results per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on SERP-result rows collected per keyword (difficulty + SERP overview).",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum output rows",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the total number of rows across all inputs.",
            "default": 10000
          },
          "maxConcurrency": {
            "title": "Parallel workers",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many workers run in parallel. Each solves its own Turnstile tokens and uses its own residential exit IP.",
            "default": 3
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies distribute the free-tool calls across exit IPs (the endpoints rate-limit per IP). Defaults to Apify Residential, US.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}