{
  "openapi": "3.0.1",
  "info": {
    "title": "Semrush Scraper — Traffic, Authority, Backlinks & Top Websites",
    "description": "Turn any domain into structured Semrush SEO data — Authority Score, traffic, global/country/category ranks, backlinks, referring domains, top keywords and AI-search traffic. Or pull the top websites by country + industry. Bulk domains or URLs in, one row each. No Semrush seat or API key.",
    "version": "0.0",
    "x-build-id": "BAFFXXjjZeEtxgbdp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~semrush-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-semrush-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/memo23~semrush-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-semrush-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/memo23~semrush-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-semrush-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "domains",
              "top_websites"
            ],
            "type": "string",
            "description": "Choose 'Domain overview' to look up specific domains, or 'Top websites' to list the top-ranked sites for a country and industry.",
            "default": "domains"
          },
          "domains": {
            "title": "Domains or URLs",
            "type": "array",
            "description": "List of websites to look up on Semrush. Accepts bare domains (e.g. stripe.com), full site URLs (e.g. https://stripe.com/pricing), or Semrush overview URLs (e.g. https://www.semrush.com/website/stripe.com/overview/). www. and paths are stripped automatically. Add in bulk via the Bulk edit tab.",
            "items": {
              "type": "string"
            }
          },
          "topWebsitesCountry": {
            "title": "Country",
            "type": "string",
            "description": "Country for the ranking. Use a 2-letter code (us, gb, de, in, br…) or the full Semrush slug (united-states). Defaults to the United States.",
            "default": "us"
          },
          "topWebsitesIndustry": {
            "title": "Industry",
            "type": "string",
            "description": "Industry to rank within. Use 'all' for every industry, or a Semrush industry slug such as finance, retail, news, travel-and-tourism, real-estate, healthcare, education, computer-software-and-development, online-services, advertising-and-marketing.",
            "default": "all"
          },
          "topWebsitesLimit": {
            "title": "Number of top websites",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many ranked domains to return (1-100).",
            "default": 100
          },
          "enrichTopWebsites": {
            "title": "Enrich each ranked domain with full overview",
            "type": "boolean",
            "description": "When on, each ranked domain is also run through the full domain-overview scrape (Authority Score, backlinks, competitors, keywords, etc.). Adds one request and one richer row per domain. Off by default — the ranking alone is a single request for up to 100 rows.",
            "default": false
          },
          "includeHistory": {
            "title": "Include monthly history",
            "type": "boolean",
            "description": "Month-by-month history arrays for visits, organic/paid traffic, backlinks and referring domains.",
            "default": true
          },
          "includeTrafficByCountry": {
            "title": "Include traffic by country",
            "type": "boolean",
            "description": "Per-country traffic breakdown with desktop/mobile split and traffic share.",
            "default": true
          },
          "includeTrafficByDevice": {
            "title": "Include traffic by device",
            "type": "boolean",
            "description": "Desktop vs mobile visit history.",
            "default": true
          },
          "includeTrafficJourney": {
            "title": "Include traffic journey",
            "type": "boolean",
            "description": "Inbound and outbound referral hosts (where visitors come from and go next).",
            "default": true
          },
          "includeCompetitors": {
            "title": "Include competitors",
            "type": "boolean",
            "description": "Top organic + paid competitor domains with relevance and estimated visits.",
            "default": true
          },
          "includeKeywords": {
            "title": "Include top keywords",
            "type": "boolean",
            "description": "Top organic keywords with search volume, CPC, position, decoded intent and traffic share.",
            "default": true
          },
          "includeAiTraffic": {
            "title": "Include AI traffic",
            "type": "boolean",
            "description": "AI / LLM traffic sources (ChatGPT, Gemini, Grok, etc.) with share of total AI traffic.",
            "default": true
          },
          "includeSiteAudit": {
            "title": "Include SEO site audit",
            "type": "boolean",
            "description": "On-page SEO audit block (health score, crawled/broken pages). Usually empty unless Semrush has already crawled the domain, so it is off by default.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum domains to scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the number of domains processed in one run.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of domains fetched in parallel.",
            "default": 10
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used to reach Semrush. Residential proxies are recommended — datacenter IPs can be throttled by Semrush.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}