{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs Scraper",
    "description": "Ahrefs Scraper SD - Ahrefs Scraper is an SEO tool that extracts Ahrefs Domain Rating, organic traffic and value with monthly history, linking websites, rank, top countries, top keywords, competitors and the AhrefsTop top 1,000 websites lists. No login.",
    "version": "1.0",
    "x-build-id": "Vc8Z7xJ69PFVObAZn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~ahrefs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-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/neuro-scraper~ahrefs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-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/neuro-scraper~ahrefs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-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": "URLs or domains",
            "type": "array",
            "description": "Domains or website URLs, one per line, e.g. github.com or https://www.make.com/en (the domain is used). AhrefsTop page URLs also work: https://ahrefs.com/websites/github.com, or a list such as https://ahrefstop.com/websites/united-states/finance. AhrefsTop covers registrable domains only (docs.github.com is not in its index).",
            "items": {
              "type": "string"
            }
          },
          "includeTopWebsites": {
            "title": "Include AhrefsTop top websites",
            "type": "boolean",
            "description": "Also scrape the AhrefsTop ranking of the most visited websites (by organic search traffic) for the country and category below.",
            "default": false
          },
          "topWebsitesCountry": {
            "title": "Top websites: country",
            "type": "string",
            "description": "worldwide, or a country name, AhrefsTop slug or two-letter code, e.g. United States, united-states or us. Several, comma-separated: us, gb, de. Checked against AhrefsTop's own country list on every run.",
            "default": "worldwide"
          },
          "topWebsitesCategory": {
            "title": "Top websites: category",
            "type": "string",
            "description": "all, or a category name or slug, e.g. Finance, computers-and-electronics, Shopping. Several, comma-separated. Checked against AhrefsTop's own category list on every run.",
            "default": "all"
          },
          "topWebsitesMode": {
            "title": "Top websites: list",
            "enum": [
              "ranking",
              "trending",
              "both"
            ],
            "type": "string",
            "description": "ranking = websites ordered by Ahrefs rank; trending = the 10 biggest risers and 10 biggest fallers of the month; both = both.",
            "default": "ranking"
          },
          "topWebsitesLimit": {
            "title": "Top websites: max rows per list",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Ranking rows per country/category list. The worldwide all-categories list follows AhrefsTop's next-page link up to rank 1,000 (10 pages of 100); every country or category list has one page of 100.",
            "default": 100
          },
          "includeDetails": {
            "title": "Top websites: include website details",
            "type": "boolean",
            "description": "Open the AhrefsTop page of every top-website row and add its Domain Rating, exact traffic and value, history, countries, keywords and competitors (one more request per row).",
            "default": false
          },
          "includeTraffic": {
            "title": "Include traffic",
            "type": "boolean",
            "description": "Organic search traffic, traffic value (USD) and organic keyword count. Output switch only: AhrefsTop sends every section on one page.",
            "default": true
          },
          "includeHistory": {
            "title": "Include monthly history",
            "type": "boolean",
            "description": "Monthly organic traffic + traffic value history since 2015 and monthly linking-websites history (exact numbers).",
            "default": true
          },
          "includeCountries": {
            "title": "Include top countries",
            "type": "boolean",
            "description": "The 5 countries that send the most organic traffic, with exact visits, last month's visits and share.",
            "default": true
          },
          "includeKeywords": {
            "title": "Include top keywords",
            "type": "boolean",
            "description": "The domain's top 5 organic keywords (volume, traffic, position and their changes) in the country AhrefsTop shows them for.",
            "default": true
          },
          "includeCompetitors": {
            "title": "Include competitors",
            "type": "boolean",
            "description": "Top 5 organic competitors (traffic, pages) and the 5 similarly ranked websites.",
            "default": true
          },
          "includeBacklinks": {
            "title": "Include Domain Rating and linking websites",
            "type": "boolean",
            "description": "Ahrefs Domain Rating (DR) and linking websites (referring domains) with the month-over-month change.",
            "default": true
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows in total (domains + top-website rows).",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is the default. AhrefsTop answered direct requests without a challenge in our tests; any country works.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}