{
  "openapi": "3.0.1",
  "info": {
    "title": "SimilarWeb Website Scraper - Traffic, WHOIS & Ranking",
    "description": "Extract SimilarWeb traffic analytics for any domain: global, country and category rankings, 3 months of visits, bounce rate, the full traffic source split, top keywords with search volume and CPC, and AI chatbot referrals. Plus RDAP WHOIS and 1-to-5-word keyword density. $3 per 1,000 results.",
    "version": "0.3",
    "x-build-id": "y18EkXamsbyQn0YVI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~similarweb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-similarweb-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/sourabhbgp~similarweb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-similarweb-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/sourabhbgp~similarweb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-similarweb-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": "Scraping Mode",
            "enum": [
              "traffic",
              "domainAnalysis"
            ],
            "type": "string",
            "description": "Choose what to scrape. Both modes are billed the same flat rate of $0.001 per result ($1 per 1,000).",
            "default": "traffic"
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "List of domains to analyze (e.g., google.com, amazon.com).",
            "items": {
              "type": "string",
              "maxLength": 253
            }
          },
          "maxItems": {
            "title": "Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of domains to process. Leave empty for no limit."
          },
          "includeAiBreakdown": {
            "title": "Include AI Breakdown (traffic mode)",
            "type": "boolean",
            "description": "Currently has no effect. SimilarWeb no longer exposes AI referral data publicly, so aiTrafficDetails and aiChatbotsRanked return null. The flag is kept so existing saved tasks keep working.",
            "default": true
          },
          "includeIcons": {
            "title": "Include Icon URLs (traffic mode)",
            "type": "boolean",
            "description": "Currently has no effect. Kept so existing saved tasks keep working. Competitor entries always include icon URLs.",
            "default": false
          },
          "proxyCountry": {
            "title": "Proxy Country (traffic mode)",
            "type": "string",
            "description": "Residential proxy country used to load the SimilarWeb site (e.g. US, GB, DE). Default US.",
            "default": "US"
          },
          "waitMs": {
            "title": "Page settle wait ms (no longer used)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "No longer used. Kept so existing saved tasks keep working. Pages are now fetched directly instead of rendered, so there is nothing to wait for.",
            "default": 12000
          },
          "maxRunSecs": {
            "title": "Soft time budget seconds (traffic mode)",
            "minimum": 60,
            "type": "integer",
            "description": "Exit with partial results before this many seconds, instead of hitting the hard timeout. Default 3300."
          },
          "debugDumpRaw": {
            "title": "Debug: dump raw HTML + parsed SSR",
            "type": "boolean",
            "description": "Internal debug flag: persist raw page HTML and parsed data to the key-value store for auditing.",
            "default": false
          },
          "includeWhois": {
            "title": "Include WHOIS (domainAnalysis mode)",
            "type": "boolean",
            "description": "Run RDAP lookup against rdap.org. Default true.",
            "default": true
          },
          "includeKeywordDensity": {
            "title": "Include Keyword Density (domainAnalysis mode)",
            "type": "boolean",
            "description": "Fetch the target homepage and compute 1-to-5-word n-gram counts. Default true.",
            "default": true
          },
          "keywordDensityNGrams": {
            "title": "N-Gram Sizes",
            "type": "array",
            "description": "Which n-gram sizes to compute. Default [1,2,3,4,5].",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 8
            },
            "default": [
              1,
              2,
              3,
              4,
              5
            ]
          },
          "keywordDensityTopN": {
            "title": "Top N Per Size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many top n-grams to return per size. Default 50.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many domains to load in parallel (default 2, cap 4). domainAnalysis mode can go higher.",
            "default": 2
          },
          "forceFresh": {
            "title": "Force fresh fetch (traffic mode)",
            "type": "boolean",
            "description": "Skip the shared monthly cache and always load live data from SimilarWeb. SimilarWeb updates its public data once a month, so the default (off) returns identical data faster.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy used for outbound requests. This site rejects datacenter IP ranges, so residential IPs are always used regardless of the group selected here. Supply your own proxy URLs to route the run through a pool of your own instead, and they will be used exactly as given with no substitution.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}