{
  "openapi": "3.0.1",
  "info": {
    "title": "SimilarWeb Traffic Analytics & US Agency Reports",
    "description": "Turn authorized traffic CSV/JSON exports into US agency competitor reports, monthly change alerts and country-scope audits. No API key for imports and no public-page scraping. Optional Similarweb API mode needs your key/credits. Saved-domain and start fees apply.",
    "version": "1.1",
    "x-build-id": "RXwKyGaOJzYxcXOa5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fascinating_lentil~similarweb-traffic-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fascinating_lentil-similarweb-traffic-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/fascinating_lentil~similarweb-traffic-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fascinating_lentil-similarweb-traffic-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/fascinating_lentil~similarweb-traffic-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fascinating_lentil-similarweb-traffic-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": "Data workflow",
            "enum": [
              "demo",
              "import",
              "official-api"
            ],
            "type": "string",
            "description": "Demo writes labeled synthetic report previews only: zero dataset results or website-result events; Actor Start and usage can apply. Import needs your permitted data. Official API needs your key/credits. No default is injected, preserving legacy API tasks. Demo never processes supplied data or credentials."
          },
          "demoPreset": {
            "title": "US agency demo example",
            "enum": [
              "us-agency-comparison",
              "us-traffic-change-alerts",
              "us-scope-audit"
            ],
            "type": "string",
            "description": "Demo mode only. Developer-authored synthetic examples, not real Similarweb data. Zero dataset results or website-result events. Actor Start and usage can apply. Ignored by import/API workflows."
          },
          "authorizedData": {
            "title": "I have permission to process this imported data",
            "type": "boolean",
            "description": "Required to be explicitly true for imports. Confirm only for data you own or are permitted to process through this Actor. This confirmation does not grant Similarweb data redistribution rights."
          },
          "importSource": {
            "title": "Export provider label",
            "maxLength": 100,
            "type": "string",
            "description": "Required for import: identify the provider of this one export, for example your own analytics export or a Similarweb export you are authorized to process. The label is user-provided, not independently verified. Do not mix providers in one import."
          },
          "importRecords": {
            "title": "JSON observations",
            "type": "array",
            "description": "Paste 1–1,000 observation objects, at most 2 MiB. Required domain and month (YYYY-MM), plus at least one numeric metric. Include country, trafficType and measurementType for comparisons. Provide JSON OR CSV, not both. No URLs are fetched.",
            "items": {
              "type": "object"
            }
          },
          "importCsv": {
            "title": "CSV observations",
            "type": "string",
            "description": "Paste CSV contents, not a file URL. Header plus up to 1,000 observations; 2 MiB maximum. Columns: domain,month,country,trafficType,measurementType,monthlyVisits,globalRank,categoryRank,category,pagesPerVisit,avgVisitDuration,bounceRate. JSON OR CSV, not both."
          },
          "reportFocusCountry": {
            "title": "Agency report focus country",
            "type": "string",
            "description": "Import/demo reporting focus, US if omitted. Use world or a two-letter scope. This only labels matching, different and unknown supplied scopes; it does not filter observations, change imported country values or prove US audience location."
          },
          "visitChangeAlertPercent": {
            "title": "Monthly visit change threshold (%)",
            "minimum": 0.1,
            "maximum": 1000,
            "type": "number",
            "description": "Import/demo only: flag supplied adjacent-month visit rises or drops at or above this absolute percentage threshold. Omitted means 20%. Matching provider, country, traffic type and basis are required. No signal with zero/unknown visit baseline or a period gap. These are review findings, not notifications or causal conclusions."
          },
          "bounceIncreaseAlertPoints": {
            "title": "Bounce increase threshold (percentage points)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Import/demo only: supplied adjacent-month bounce-rate increase threshold, default 5 percentage points. A change from 45% to 52% is +7 points, not +7%. Matching context and both metrics are required."
          },
          "rankWorseningAlertPercent": {
            "title": "Global rank worsening threshold (%)",
            "minimum": 0.1,
            "maximum": 1000,
            "type": "number",
            "description": "Import/demo only: flag a numerical increase in global rank above this adjacent-month percentage threshold, default 20%. Rank 100 to 130 is +30% (worse). No estimates or comparisons across differing context."
          },
          "apiKey": {
            "title": "Similarweb API key",
            "type": "string",
            "description": "Required only for experimental official-api mode; not needed for imports. Bring your own Similarweb key/credits. Live key/plan access and API-mode profitability are unverified; import/demo tests do not establish them. Public pages are never scraped."
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Website domains to look up, for example openai.com. Enter domains without https:// or www.",
            "default": [
              "openai.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max domains",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum whole website analyses to save. Import keeps all supplied months for each selected domain and applies one result event per saved domain, not per observation. Official API mode consumes your API credits. Start with 1.",
            "default": 1
          },
          "country": {
            "title": "Country scope",
            "type": "string",
            "description": "Official API mode only: country scope for traffic/engagement, world or a two-letter ISO code such as us. Must be covered by your Similarweb subscription. Import country comes from each supplied observation, not this setting.",
            "default": "world"
          },
          "startDate": {
            "title": "Start month (YYYY-MM)",
            "type": "string",
            "description": "Optional start month for traffic and engagement metrics in YYYY-MM format. Leave empty to use a recent default month range. Similarweb data usually lags by one to two months."
          },
          "endDate": {
            "title": "End month (YYYY-MM)",
            "type": "string",
            "description": "Optional end month for traffic and engagement metrics in YYYY-MM format. Leave empty to use the default recent month. The Actor keeps the latest available value in the range."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}