{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs Scraper — Backlinks, Traffic, Keywords & AI Visibility",
    "description": "Scrape Ahrefs for any domain or keyword — no login. The extras other scrapers skip: AI Search Visibility (citations in ChatGPT & Google AI Overviews / AI Mode), SERP rank tracking, broken links & sitemaps. Plus DR, backlinks, traffic & value, keyword difficulty & ideas. Filters, CSV/JSON.",
    "version": "0.1",
    "x-build-id": "tKuz6NfewvqiZaqOW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~ahrefs-seo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-ahrefs-seo-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/trakk~ahrefs-seo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-ahrefs-seo-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/trakk~ahrefs-seo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-ahrefs-seo-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 to analyse (e.g. ahrefs.com). Returns Domain Rating, backlinks, referring domains and traffic.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords to analyse — difficulty, SERP overview and keyword ideas.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "URL mode",
            "enum": [
              "exact",
              "prefix",
              "domain",
              "subdomains"
            ],
            "type": "string",
            "description": "Scope for the domain/URL tools.",
            "default": "subdomains"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code for traffic & keyword data (e.g. us, gb, de).",
            "default": "us"
          },
          "protocol": {
            "title": "Protocol",
            "enum": [
              "both",
              "https",
              "http"
            ],
            "type": "string",
            "description": "Which protocol to count traffic for (site-level tools).",
            "default": "both"
          },
          "searchEngine": {
            "title": "Search engine",
            "enum": [
              "Google",
              "Bing",
              "YouTube",
              "Amazon",
              "Yahoo",
              "Yandex",
              "Baidu",
              "Naver",
              "Seznam"
            ],
            "type": "string",
            "description": "Search engine for keyword ideas.",
            "default": "Google"
          },
          "includeWebsiteAuthority": {
            "title": "Domain Rating & backlinks overview",
            "type": "boolean",
            "description": "Domain Rating, backlinks, referring domains (per URL).",
            "default": true
          },
          "includeTraffic": {
            "title": "Organic traffic",
            "type": "boolean",
            "description": "Estimated monthly organic traffic and its history.",
            "default": true
          },
          "includeBacklinks": {
            "title": "Top backlinks list",
            "type": "boolean",
            "description": "Save the top backlinks per URL to a separate Backlinks dataset.",
            "default": false
          },
          "includeBrokenLinks": {
            "title": "Broken backlinks",
            "type": "boolean",
            "description": "Save broken inbound links per URL to a separate Broken Links dataset.",
            "default": false
          },
          "includeKeywordIdeas": {
            "title": "Keyword ideas",
            "type": "boolean",
            "description": "Keyword suggestions (with volume & difficulty labels) for each keyword.",
            "default": true
          },
          "withQuestionIdeas": {
            "title": "Include question keywords",
            "type": "boolean",
            "description": "Also return question-style keyword ideas.",
            "default": false
          },
          "enrichKeywordIdeas": {
            "title": "Add real difficulty to keyword ideas",
            "type": "boolean",
            "description": "The free ideas tool only labels difficulty (Low/High). Turn this on to fetch a real numeric keyword difficulty for the top ideas of each seed. Adds extra calls per seed (one shared captcha token covers them).",
            "default": false
          },
          "maxEnrichedIdeas": {
            "title": "Max enriched ideas per seed",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many top ideas per seed keyword get a real numeric difficulty when the option above is on.",
            "default": 10
          },
          "includeKeywordDifficulty": {
            "title": "Keyword difficulty & SERP",
            "type": "boolean",
            "description": "SERP overview and top-10 competitiveness per keyword.",
            "default": true
          },
          "minDomainRating": {
            "title": "Min Domain Rating",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only domains with DR at or above this (0–100)."
          },
          "maxDomainRating": {
            "title": "Max Domain Rating",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only domains with DR at or below this (0–100)."
          },
          "minBacklinks": {
            "title": "Min backlinks",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only domains with at least this many backlinks."
          },
          "minRefDomains": {
            "title": "Min referring domains",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only domains with at least this many referring domains."
          },
          "minOrganicTraffic": {
            "title": "Min organic traffic",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only domains with at least this much monthly organic traffic."
          },
          "minTrafficValueUsd": {
            "title": "Min traffic value ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only domains whose monthly organic traffic value is at least this."
          },
          "minKeywordDifficulty": {
            "title": "Min keyword difficulty",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only keywords with KD at or above this (0–100)."
          },
          "maxKeywordDifficulty": {
            "title": "Max keyword difficulty",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only keywords with KD at or below this (0–100)."
          },
          "rankDomain": {
            "title": "Rank position for domain",
            "type": "string",
            "description": "Optional: a domain to check the ranking position of, for each keyword."
          },
          "brand": {
            "title": "Brand (for AI tools)",
            "type": "string",
            "description": "Brand name to measure in AI answers. Required for the AI visibility/overviews/mode tools."
          },
          "includeAiVisibility": {
            "title": "AI visibility (citations by model)",
            "type": "boolean",
            "description": "Per keyword: total AI citations and a breakdown by ChatGPT, Gemini, Perplexity, Copilot, etc. Needs a brand.",
            "default": false
          },
          "includeAiOverviews": {
            "title": "AI overviews tracker",
            "type": "boolean",
            "description": "Per keyword: Google AI Overviews mentions, top topics and cited domains. Needs a brand.",
            "default": false
          },
          "includeAiMode": {
            "title": "AI mode tracker",
            "type": "boolean",
            "description": "Per keyword: Google AI Mode mentions, top topics and cited domains. Needs a brand.",
            "default": false
          },
          "includeSitemap": {
            "title": "Sitemap (URL list)",
            "type": "boolean",
            "description": "Per URL: crawl a sitemap and save its URLs to a separate Sitemap dataset.",
            "default": false
          },
          "maxSitemapUrls": {
            "title": "Max sitemap URLs per domain",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound on sitemap URLs exported (and billed) per domain. Only applies when the Sitemap add-on is on. Raise it to export very large sitemaps in full.",
            "default": 1000
          },
          "includeTopWebsites": {
            "title": "Top websites ranking",
            "type": "boolean",
            "description": "Scrape Ahrefs' global Top Websites ranking — the top sites by estimated organic search traffic, with category and monthly change. Works on its own, no urls or keywords needed.",
            "default": false
          },
          "topWebsitesCategory": {
            "title": "Top websites: category",
            "enum": [
              "",
              "Arts & Entertainment",
              "Autos & Vehicles",
              "Beauty & Fitness",
              "Books & Literature",
              "Business & Industrial",
              "Computers & Electronics",
              "Entertainment",
              "Finance",
              "Food & Drink",
              "Games",
              "Health",
              "Hobbies & Leisure",
              "Home & Garden",
              "Internet & Telecom",
              "Jobs & Education",
              "Law & Government",
              "News",
              "Online Communities",
              "People & Society",
              "Pets & Animals",
              "Real Estate",
              "Reference",
              "Science",
              "Shopping",
              "Sports",
              "Travel"
            ],
            "type": "string",
            "description": "Only return Top Websites in this category. Leave as 'All categories' for the full ranking.",
            "default": ""
          },
          "topWebsitesLimit": {
            "title": "Top websites: limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many top websites to return (max 100 — the ranking page lists the top 100).",
            "default": 100
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Global cap on primary rows saved. Duplicates and empty rows are never counted or charged.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many targets to process in parallel.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Retry budget per request for a temporary source or captcha error.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy configuration.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}