{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs SEO Scraper: Domain Rating, Traffic & AI Visibility",
    "description": "Ahrefs website data without an account: Domain Rating, organic traffic, traffic value, keywords, top countries, competitors and monthly history since 2015, plus top websites by country and category and AI visibility leaderboards. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "yB9tI0vmSNQcSD5bY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nice_dev~ahrefs-seo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nice_dev-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/nice_dev~ahrefs-seo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nice_dev-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/nice_dev~ahrefs-seo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nice_dev-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": {
          "domains": {
            "title": "Domains",
            "maxItems": 10000,
            "type": "array",
            "description": "Domains to analyse, one per line: `zapier.com`, `www.zapier.com` or a full URL (`https://zapier.com/apps`) — the domain is read. AhrefsTop publishes about 200,000 established websites; a domain it does not track comes back as `found: false` and is not billed. Up to 10,000 domains.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "AhrefsTop / Ahrefs URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Pages pasted from your browser: a website page (`https://ahrefstop.com/websites/zapier.com`, also `/competitors`, or `https://ahrefs.com/websites/zapier.com`) or a ranking page (`https://ahrefstop.com/websites/united-states/finance`, `https://ahrefstop.com/websites/3`). Added to the domains and rankings below. Max 1,000 URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "allTrackedDomains": {
            "title": "Every website AhrefsTop tracks",
            "type": "boolean",
            "description": "Read the full list of websites AhrefsTop publishes (about 200,000 domains, from its sitemaps) and deliver one website row each, up to **Max rows**. Combine with **Domain endings** (e.g. `.fr`) and the filters below to get, for example, every French website with a Domain Rating of 50 or more.",
            "default": false
          },
          "domainSuffixes": {
            "title": "Domain endings",
            "maxItems": 100,
            "type": "array",
            "description": "Keep only domains that end with one of these (`.fr`, `.co.uk`, `.de`, `.io`…). Checked before any page is read, so it also saves cost. Applies to every domain of the run (your list, rankings, every tracked website). Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Top websites: 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": "Fill to get the AhrefsTop ranking of the most visited websites by organic search traffic (latest month): `Worldwide` lists up to 1,000 websites, a country or a category up to 100. Leave empty for domains only."
          },
          "locations": {
            "title": "Top websites: more countries",
            "maxItems": 171,
            "type": "array",
            "description": "More countries as AhrefsTop names them in its URLs (`united-states`, `france`, `germany`…, or `worldwide`), added to the country above. Each country is crossed with each category below, then with each list chosen: 500 rankings per run at most (countries × categories × lists).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "topWebsitesCategories": {
            "title": "Top websites: categories",
            "type": "array",
            "description": "Categories of the ranking (`all` = every website). Empty = `all`.",
            "items": {
              "type": "string",
              "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"
              ],
              "enumTitles": [
                "All categories",
                "Entertainment",
                "Vehicles",
                "Beauty & Fitness",
                "Books & Literature",
                "Business & Industrial",
                "Computers & Electronics",
                "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"
              ]
            },
            "default": [
              "all"
            ]
          },
          "topWebsitesMode": {
            "title": "Top websites: list",
            "enum": [
              "ranking",
              "trending",
              "both"
            ],
            "type": "string",
            "description": "`Ranking` = the websites with the most organic search traffic; `Trending` = the 10 biggest climbers and the 10 biggest fallers of the month (a country's categories show the country's list, read once; each worldwide category has its own); `Both` = the two lists.",
            "default": "ranking"
          },
          "enrichTopWebsites": {
            "title": "Full website data for each top website",
            "type": "boolean",
            "description": "Also read the full website page of every website found in the rankings (exact traffic, traffic value, Domain Rating, countries, keywords, history; one more page per website, delivered and billed as a website row that keeps its rank).",
            "default": false
          },
          "aiPlatforms": {
            "title": "AI leaderboards: platforms",
            "type": "array",
            "description": "Fill to get the Ahrefs AI visibility leaderboards: the 10 brands AI assistants mention most and the 10 websites they cite most, per platform and month (US data). A platform Ahrefs does not publish separately comes back flagged `platformPublished: false` (it shows the combined board). Empty = no leaderboards.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "google-ai-overviews",
                "google-ai-mode",
                "chatgpt",
                "gemini",
                "perplexity",
                "copilot",
                "grok",
                "claude",
                "google-ai-overviews-keywords",
                "google-ai-mode-keywords"
              ],
              "enumTitles": [
                "All AI platforms combined",
                "Google AI Overviews",
                "Google AI Mode",
                "ChatGPT",
                "Gemini",
                "Perplexity",
                "Copilot",
                "Grok",
                "Claude",
                "Google AI Overviews (keyword-based)",
                "Google AI Mode (keyword-based)"
              ]
            },
            "default": []
          },
          "aiMonths": {
            "title": "AI leaderboards: months",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many months back from the latest published month (Ahrefs publishes 12).",
            "default": 1
          },
          "aiLeaderboard": {
            "title": "AI leaderboards: boards",
            "enum": [
              "both",
              "brands",
              "sources"
            ],
            "type": "string",
            "description": "`Brands` = names AI assistants mention; `Sources` = websites they cite; `Both`.",
            "default": "both"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of rows (websites + top websites + AI leaderboard rows) for the whole run. 0 = no limit.",
            "default": 1000
          },
          "maxItemsPerQuery": {
            "title": "Max rows per list",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of rows taken from each country × category ranking (top first), each trending list, each AI platform (all its months and boards together) and the list of tracked websites (**Every website AhrefsTop tracks**). 0 = the whole list.",
            "default": 0
          },
          "includeHistory": {
            "title": "Monthly history",
            "type": "boolean",
            "description": "Keep the monthly history arrays (organic traffic and traffic value since June 2015, linking websites since April 2015). Free — off only to get lighter rows.",
            "default": true
          },
          "includeCompetitorDetails": {
            "title": "Competitor details (paid option)",
            "type": "boolean",
            "description": "Read the AhrefsTop competitors page of each website: 10 competing websites with description, Domain Rating, organic traffic, traffic value, pages and their worldwide, country and category ranks. One more page per website; billed per competitor delivered (up to 10 per website).",
            "default": false
          },
          "includeCrawlStatus": {
            "title": "AhrefsBot crawl status (paid option)",
            "type": "boolean",
            "description": "Ask Ahrefs whether its crawler (AhrefsBot) is allowed on each website, per host (with / without `www`) and port (443 / 80), with the date Ahrefs last checked the website's crawl rules. One more request per website; billed per website checked.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude domains containing",
            "maxItems": 50,
            "type": "array",
            "description": "Skip any domain whose name contains one of these words (case-insensitive), e.g. `casino`, `porn`. Applied to every domain of the run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minDomainRating": {
            "title": "Minimum Domain Rating",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only websites whose Ahrefs Domain Rating (0-100) is at least this value. 0 = no filter. Read on the website page (top website rows without **Full website data** have no Domain Rating and are kept).",
            "default": 0
          },
          "maxDomainRating": {
            "title": "Maximum Domain Rating",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only websites whose Domain Rating is at most this value (link prospecting: skip the giants). 100 = no filter.",
            "default": 100
          },
          "minOrganicTraffic": {
            "title": "Minimum monthly organic traffic",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Keep only websites with at least this many estimated organic search visits in the latest month (worldwide; for a top website row, the figure of its ranking). 0 = no filter.",
            "default": 0
          },
          "onlyCategories": {
            "title": "Only these categories",
            "type": "array",
            "description": "Keep only websites of these AhrefsTop categories (read on the website page or the ranking row). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "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"
              ],
              "enumTitles": [
                "Entertainment",
                "Vehicles",
                "Beauty & Fitness",
                "Books & Literature",
                "Business & Industrial",
                "Computers & Electronics",
                "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"
              ]
            },
            "default": []
          },
          "onlyNew": {
            "title": "Only new rows",
            "type": "boolean",
            "description": "Skip websites, top websites and AI leaderboard rows already delivered by a previous run with the same memory key (monitoring a ranking: only newcomers are delivered — with a row limit below the size of the list, the next rows down the list instead).",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the memory used by **Only new rows**. Give each schedule / task its own key (e.g. `top-fr-finance`) so that they do not share their memory. Letters, digits, `-` and `_`.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget what previous runs delivered before this run starts.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or your own proxies. Keep the default: it is included in the price. The residential Apify proxy is not available in this Actor.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Pages read in parallel.",
            "default": 8
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Upper bound of the request rate.",
            "default": 600
          },
          "minRequestIntervalMs": {
            "title": "Min delay between requests",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum delay in milliseconds between two requests.",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries per request before it is marked as failed. Behind a proxy, a request the site turns away is also retried on a new proxy session up to 10 times without using up these retries.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Verbose log.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}