{
  "openapi": "3.0.1",
  "info": {
    "title": "Semrush Scraper — Traffic, Backlinks, Keyword Ideas & Top Sites",
    "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. Also: top websites by country + industry, and keyword ideas from any seed. No Semrush seat or API key.",
    "version": "0.0",
    "x-build-id": "SNuGkJfvlYg1jcF2S"
  },
  "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",
              "keywords"
            ],
            "type": "string",
            "description": "Choose 'Domain overview' to look up specific domains, 'Top websites' to list the top-ranked sites for a country and industry, or 'Keyword ideas' to expand seed phrases into related keyword suggestions.",
            "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
          },
          "seeds": {
            "title": "Seed keywords",
            "type": "array",
            "description": "Seed phrases to expand. Short head terms work far better than long-tail ones: 'coffee' returns hundreds of ideas, 'seo tools' returns almost none. Add in bulk via the Bulk edit tab.",
            "items": {
              "type": "string"
            }
          },
          "keywordExpansion": {
            "title": "Expansion depth",
            "enum": [
              "none",
              "letters",
              "questions",
              "full"
            ],
            "type": "string",
            "description": "How many autocomplete queries to run per seed. 'Seed only' = 1 query. 'Letters' adds '<seed> a' through '<seed> z' (27 queries). 'Questions' adds 'how/what/best/vs/... <seed>' (21 queries). 'Full' does both (47 queries) and yields the most ideas.",
            "default": "full"
          },
          "maxKeywordsPerSeed": {
            "title": "Max keywords per seed",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on how many unique keyword ideas to keep for each seed.",
            "default": 500
          },
          "flattenKeywords": {
            "title": "One row per keyword",
            "type": "boolean",
            "description": "Off (default): one result row per seed, carrying the whole keyword list — a seed that expands to 200 ideas costs ONE result. On: one row per keyword, which multiplies the number of billed results.",
            "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": "Crawl the domain homepage ourselves: status, title, meta description, H1 count, word count, internal/external links, images missing alt, robots.txt and sitemap. Semrush's own audit block on the public page is usually empty, so this does not use it. Off by default — one extra fetch per domain.",
            "default": false
          },
          "includeMoz": {
            "title": "Include Moz metrics (DA, Spam Score)",
            "type": "boolean",
            "description": "Adds Moz Domain Authority, Spam Score, linking root domains and ranking keywords as columns, plus Moz's top pages and top linking domains and the 60-day count of linking domains gained and lost. One extra request per domain. Moz also covers many sites Semrush has no public page for (webflow.com, zapier.com): with this on, those domains return a Moz-only row instead of nothing, and that row is billed as one result.",
            "default": false
          },
          "includeDomainAge": {
            "title": "Include domain age",
            "type": "boolean",
            "description": "Adds the domain's registration date, expiry date, age in years and registrar, from the public RDAP registry. One extra request per domain. A few country domains (for example .so) publish no RDAP data and come back empty.",
            "default": false
          },
          "minVisits": {
            "title": "Minimum monthly visits",
            "minimum": 0,
            "type": "integer",
            "description": "Drop sites with fewer monthly visits than this.",
            "default": 0
          },
          "maxVisits": {
            "title": "Maximum monthly visits",
            "minimum": 0,
            "type": "integer",
            "description": "Drop sites with more monthly visits than this. Handy for finding sites small enough to approach.",
            "default": 0
          },
          "minAuthorityScore": {
            "title": "Minimum Authority Score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0-100.",
            "default": 0
          },
          "maxAuthorityScore": {
            "title": "Maximum Authority Score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0-100.",
            "default": 0
          },
          "filterCountries": {
            "title": "Keep only these countries",
            "type": "array",
            "description": "2-letter country codes (us, gb, de...) matched against the site's main audience country.",
            "items": {
              "type": "string"
            }
          },
          "filterCategories": {
            "title": "Keep only these categories",
            "type": "array",
            "description": "Words matched against the site's Semrush categories, for example finance or retail.",
            "items": {
              "type": "string"
            }
          },
          "onlyWithTrafficEstimate": {
            "title": "Only sites with a current traffic estimate",
            "type": "boolean",
            "description": "Drop sites whose newest month has no visits estimate yet. Off by default: those rows still carry Authority Score, ranks and backlinks.",
            "default": false
          },
          "monthsOfHistory": {
            "title": "Months of history",
            "minimum": 0,
            "type": "integer",
            "description": "How many of the most recent months to keep in each history list.",
            "default": 0
          },
          "countriesPerDomain": {
            "title": "Countries per domain",
            "minimum": 0,
            "type": "integer",
            "description": "How many countries to keep in the traffic-by-country list.",
            "default": 0
          },
          "keywordsPerDomain": {
            "title": "Keywords per domain",
            "minimum": 0,
            "type": "integer",
            "description": "How many top organic keywords to keep.",
            "default": 0
          },
          "competitorsPerDomain": {
            "title": "Competitors per domain",
            "minimum": 0,
            "type": "integer",
            "description": "How many competitors to keep.",
            "default": 0
          },
          "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. The default Apify Proxy works — leave it as is. Only switch to RESIDENTIAL if you have that group on your plan and hit throttling on a very large run.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}