{
  "openapi": "3.0.1",
  "info": {
    "title": "Ahrefs Domain Rating, Backlinks & Traffic Lookup",
    "description": "Look up a domain's public Ahrefs Domain Rating, linking-website count, global rank, and estimated organic traffic, with a mode to fetch just authority or just backlink metrics.",
    "version": "1.1",
    "x-build-id": "1er5MI6BnUASyOt8P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~ahrefs-domain-rating-backlinks-and-traffic-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-ahrefs-domain-rating-backlinks-and-traffic-lookup",
        "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/vexaloom-labs~ahrefs-domain-rating-backlinks-and-traffic-lookup/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-ahrefs-domain-rating-backlinks-and-traffic-lookup",
        "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/vexaloom-labs~ahrefs-domain-rating-backlinks-and-traffic-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-ahrefs-domain-rating-backlinks-and-traffic-lookup",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "domain",
              "authority",
              "backlinks",
              "traffic",
              "competitors",
              "topWebsites",
              "full",
              "authority_only",
              "backlinks_only"
            ],
            "type": "string",
            "description": "What to fetch. `domain` returns the full public profile; `competitors` returns one row per competitor; `topWebsites` returns the AhrefsTop ranking without needing domains. Legacy values `full`, `authority_only` and `backlinks_only` are accepted and mapped to `domain`, `authority` and `backlinks`.",
            "default": "domain"
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Domains or full URLs (mode=domain/authority/backlinks/traffic/competitors). `www` and non-`www` forms are both tried. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "includeHistory": {
            "title": "Include history",
            "type": "boolean",
            "description": "Include monthly traffic, traffic-value and linking-website history (mode=domain/authority/backlinks/traffic).",
            "default": true
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "boolean",
            "description": "Include the top 5 keywords table (mode=domain/traffic).",
            "default": true
          },
          "includeCountries": {
            "title": "Include countries",
            "type": "boolean",
            "description": "Include the top 5 traffic countries (mode=domain/traffic).",
            "default": true
          },
          "includeCompetitors": {
            "title": "Include competitors",
            "type": "boolean",
            "description": "Include the top 5 competing websites on the profile (mode=domain).",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted rows across all requested domains or ranking pages.",
            "default": 50
          },
          "topWebsitesCountry": {
            "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": "(mode=topWebsites) Country ranking. `worldwide` uses the global top 1000; any other value uses that country's top 100.",
            "default": "worldwide"
          },
          "topWebsitesCategory": {
            "title": "Top websites category",
            "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"
            ],
            "type": "string",
            "description": "(mode=topWebsites) Category filter. Combine with a country for that country's category ranking.",
            "default": "all"
          },
          "topWebsitesRanking": {
            "title": "Top websites ranking type",
            "enum": [
              "ranking",
              "trending_up",
              "trending_down"
            ],
            "type": "string",
            "description": "(mode=topWebsites) Position ranking or the monthly trending up/down list.",
            "default": "ranking"
          },
          "topWebsitesPage": {
            "title": "Top websites page",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "(mode=topWebsites) Starting global ranking page (1 = ranks 1-100, 10 = ranks 901-1000). Country, category and trending rankings expose one page only.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}