# Similarweb Scraper (`scrapeai/similarweb-scraper`) Actor

Scrape Similarweb website analytics including traffic, pages per visit, average time on site, bounce rate, rankings, and more.

- **URL**: https://apify.com/scrapeai/similarweb-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:** Developer tools, Automation, SEO tools
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Similarweb Scraper

**Similarweb Scraper** is a powerful Apify Actor designed to extract comprehensive website analytics and market intelligence from Similarweb. Easily retrieve global/country/category rankings, monthly traffic volumes, engagement metrics (bounce rate, pages per visit, average visit duration), traffic acquisition sources, geographic demographics, competitors, and top search keywords.

***

### 🚀 Features

- **Comprehensive Traffic Analytics**: Extract total monthly visits, bounce rates, pages per visit, and average visit duration.
- **Global & Regional Rankings**: Scrape global rank, country rank, and category rank.
- **Company & Domain Profile**: Extract company name, founding year, employee size range, headquarters location, annual revenue bracket, and industry category.
- **Traffic Acquisition Channels**: Direct, referrals, search, social, email, and display ad traffic distribution.
- **Geographic Breakdown**: Top country traffic shares with ISO country codes.
- **Competitors & Keywords**: Discover top competitors, similar websites, and organic/paid keywords.
- **Zero Null Guarantee**: Multi-layer extraction strategy (Next.js server state + DOM fallbacks + smart defaults) ensuring clean, comprehensive output datasets without empty null fields.

***

### 📥 Input Parameters

The Actor accepts input via Apify Console or JSON API.

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `domains` | Array of strings | No | `["google.com", "github.com", "wikipedia.org"]` | List of target domain names to scrape. |
| `startUrls` | Array of objects | No | `[]` | List of Similarweb URLs (`https://www.similarweb.com/website/google.com/`). |
| `maxItems` | Integer | No | `100` | Maximum number of domains to process. |
| `maxConcurrency` | Integer | No | `2` | Number of parallel browser instances. |
| `proxyConfiguration` | Object | No | `auto` | Apify Proxy settings for anti-bot protection. |

#### Example Input JSON

```json
{
  "domains": [
    "google.com",
    "github.com",
    "wikipedia.org"
  ],
  "maxItems": 10,
  "maxConcurrency": 2
}
```

***

### 📤 Output Dataset Format

The extracted data is pushed directly to the default Apify Dataset in JSON, CSV, Excel, or XML formats.

#### Sample Output Item

```json
{
  "domain": "github.com",
  "url": "https://www.similarweb.com/website/github.com/",
  "title": "GitHub",
  "description": "GitHub is where over 100 million developers shape the future of software, together.",
  "companyName": "GITHUB",
  "yearFounded": 2008,
  "employeeRange": "1000 - 5000",
  "headquarters": "San Francisco, California, United States",
  "annualRevenue": "$500.0M - $1.0B",
  "mainCategory": "Computers Electronics and Technology > Software",
  "globalRank": 74,
  "countryRank": 53,
  "categoryRank": 6,
  "totalVisits": "485.4M",
  "bounceRate": "38.2%",
  "pagesPerVisit": "5.8",
  "avgVisitDuration": "00:06:45",
  "topCountryShares": [
    {
      "country": "United States",
      "countryCode": "US",
      "share": "24.2%"
    },
    {
      "country": "China",
      "countryCode": "CN",
      "share": "8.5%"
    }
  ],
  "trafficSources": {
    "direct": "65.4%",
    "referrals": "4.2%",
    "search": "24.8%",
    "social": "3.1%",
    "mail": "1.8%",
    "display": "0.7%"
  },
  "competitors": [
    "gitlab.com",
    "bitbucket.org",
    "sourceforge.net"
  ],
  "topKeywords": [
    "github",
    "github copilot",
    "git"
  ],
  "scrapedAt": "2026-08-05T10:40:00.000Z"
}
```

***

### 💼 Use Cases

1. **Competitor Intelligence & Benchmarking**: Compare your website traffic and engagement against industry leaders.
2. **Market Research**: Analyze audience demographics, regional distribution, and top traffic channels.
3. **SEO & Content Strategy**: Discover high-performing search keywords and referral domains.
4. **Lead Generation & Sales Intelligence**: Identify fast-growing web platforms and assess company size and revenue tier.

***

### ⚙️ How to Run Locally

```bash
## Install dependencies
npm install

## Run locally
npm start
## or
apify run
```

***

### 🛡️ License

ISC License

# Actor input Schema

## `domains` (type: `array`):

List of domain names to scrape website analytics for (e.g., google.com, github.com, wikipedia.org).

## `startUrls` (type: `array`):

List of Similarweb URLs to scrape (e.g., https://www.similarweb.com/website/google.com/).

## `maxItems` (type: `integer`):

Maximum number of domains to process.

## `proxyConfiguration` (type: `object`):

Proxy configuration for bypassing anti-bot protections.

## `maxConcurrency` (type: `integer`):

Maximum number of parallel scraping browser instances.

## Actor input object example

```json
{
  "domains": [
    "google.com",
    "github.com",
    "wikipedia.org"
  ],
  "startUrls": [],
  "maxItems": 100,
  "maxConcurrency": 2
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing website traffic, rankings, engagements, and market insights.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "google.com",
        "github.com",
        "wikipedia.org"
    ],
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/similarweb-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "domains": [
        "google.com",
        "github.com",
        "wikipedia.org",
    ],
    "startUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeai/similarweb-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "google.com",
    "github.com",
    "wikipedia.org"
  ],
  "startUrls": []
}' |
apify call scrapeai/similarweb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapeai/similarweb-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/AJIJJ38ZD3tLtr2Lz/builds/3FhzlZNYCFfl57WZ5/openapi.json
