{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs All-in-One SEO Scraper - DR, Backlinks, Keywords",
    "description": "Extract all SEO data from Ahrefs in one Actor: Domain Rating, backlinks, keyword research (20 engines incl. ChatGPT/Gemini/Perplexity), SERP analysis, traffic estimates, AI visibility, keyword rank checker, top 1000 websites ranking, competitors & more. No subscription needed. Bulk URL support.",
    "version": "1.1",
    "x-build-id": "mO0BYZ5S3IxQEh2lJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pro100chok~ahrefs-seo-tools/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pro100chok-ahrefs-seo-tools",
        "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/pro100chok~ahrefs-seo-tools/runs": {
      "post": {
        "operationId": "runs-sync-pro100chok-ahrefs-seo-tools",
        "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/pro100chok~ahrefs-seo-tools/run-sync": {
      "post": {
        "operationId": "run-sync-pro100chok-ahrefs-seo-tools",
        "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",
        "required": [
          "searchType"
        ],
        "properties": {
          "searchType": {
            "title": "🎯 Search Type",
            "enum": [
              "website_authority",
              "backlinks_overview",
              "backlinks_list",
              "broken_links",
              "traffic_overview",
              "ai_visibility",
              "ai_mode_tracker",
              "ai_overviews_tracker",
              "sitemap",
              "website_details",
              "keyword_ideas",
              "keyword_difficulty",
              "keyword_metrics",
              "keyword_rank",
              "serp_overview",
              "top_websites"
            ],
            "type": "string",
            "description": "Select what data to extract. Open the matching section below to configure parameters.",
            "default": "website_authority"
          },
          "urls": {
            "title": "🌐 URLs or Domains",
            "type": "array",
            "description": "For Search Type: Website Authority, Backlinks Overview, Backlinks List, Broken Links, Traffic Overview, AI Visibility, AI Mode Tracker, AI Overviews Tracker, XML Sitemap, Website Details, or Keyword Rank Checker. Enter one or more domains/URLs to analyze. Supports bulk processing.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "🔑 Keyword",
            "type": "string",
            "description": "For Search Type: Keyword Ideas, Keyword Difficulty, Keyword Metrics, Keyword Rank Checker, SERP Overview, or AI Visibility. Enter a keyword or phrase to research."
          },
          "topWebsitesLimit": {
            "title": "🔢 Results Limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For Search Type: Top Websites. Maximum number of websites to return (max 1000).",
            "default": 100
          },
          "mode": {
            "title": "🔧 URL Mode",
            "enum": [
              "exact",
              "subdomains",
              "prefix",
              "domain"
            ],
            "type": "string",
            "description": "How to analyze the URL. <b>Exact</b> = single page, <b>Subdomains</b> = include subdomains, <b>Prefix</b> = all pages with this prefix, <b>Domain</b> = entire domain.",
            "default": "subdomains"
          },
          "country": {
            "title": "🌍 Country",
            "type": "string",
            "description": "ISO 2-letter country code for keyword research (e.g. us, gb, de, fr).",
            "default": "us"
          },
          "searchEngine": {
            "title": "🔎 Search Engine",
            "enum": [
              "Google",
              "Bing",
              "YouTube",
              "Amazon",
              "Yahoo",
              "Yandex",
              "Baidu",
              "ChatGPT",
              "Gemini",
              "Perplexity",
              "Copilot",
              "Grok",
              "GoogleAIMode",
              "GoogleImages",
              "GoogleNews",
              "GoogleVideos",
              "Daum",
              "Naver",
              "Seznam",
              "Yep"
            ],
            "type": "string",
            "description": "Search engine for <b>Keyword Ideas</b> only. Includes AI engines (ChatGPT, Gemini, Perplexity).",
            "default": "Google"
          },
          "topWebsitesMode": {
            "title": "📊 Mode",
            "enum": [
              "ranking",
              "trending"
            ],
            "type": "string",
            "description": "Select ranking (by Ahrefs rank) or trending (fastest growing).",
            "default": "ranking"
          },
          "topWebsitesCountry": {
            "title": "🌎 Country Filter",
            "type": "string",
            "description": "Filter by country (e.g. 'united-states', 'germany'). Use 'worldwide' for all.",
            "default": "worldwide"
          },
          "topWebsitesCategory": {
            "title": "🗂️ Category Filter",
            "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",
              "people-and-society",
              "pets-and-animals",
              "real-estate",
              "reference",
              "science",
              "shopping",
              "social-networks",
              "sports",
              "travel-and-transportation"
            ],
            "type": "string",
            "description": "Filter by website category.",
            "default": "all"
          },
          "includeDetails": {
            "title": "📋 Include Website Details",
            "type": "boolean",
            "description": "Scrape each website's detail page for full data (traffic, keywords, competitors, backlinks). Slower but more data.",
            "default": false
          },
          "maxRetries": {
            "title": "🔁 Max Retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts for connection errors.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}