# Similarweb Scraper — Website Analytics & Ranking (`thenetaji/similarweb-scraper`) Actor

Both Similarweb datasets behind one mode picker. Read the full monthly profile for a list of domains — traffic, engagement, ranks, countries, channels, competitors, audience, search, social, technologies and company context — or export the current global top-website ranking.

- **URL**: https://apify.com/thenetaji/similarweb-scraper.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** Marketing, SEO tools, Business
- **Stats:** 3 total users, 2 monthly users, 90.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.43 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

Both Similarweb datasets in one Actor. Pick a mode with `scraperType`: read the full monthly profile for a list of domains, or export the current global top-website ranking.

| `scraperType` | What a row is | What you supply |
| --- | --- | --- |
| `websiteAnalytics` | One complete monthly profile per domain | `domains` |
| `topWebsites` | One website from the global ranking | nothing |

### Website analytics

Paste hostnames or complete page links:

```json
{
  "scraperType": "websiteAnalytics",
  "domains": [
    "openai.com",
    "https://github.com/features"
  ],
  "maxItems": 0
}
```

Links are reduced to their hostnames and duplicate domains are read once.

| Field | What it records |
| --- | --- |
| `domain`, `url`, `snapshot_date` | Website identity and the month represented by the estimates |
| `engagement` | Visits, monthly change, bounce rate, pages per visit, duration, and history |
| `rankings` | Global, country, and category ranks with previous values and histories |
| `top_countries`, `traffic_sources` | Geographic and acquisition-channel shares |
| `competitors` | Related domains with category rank and affinity where published |
| `demographics`, `audience_interests` | Published age, gender, website, topic, and category interests |
| `search`, `social`, `referrals` | Search mix and keywords, social networks, and referral sites |
| `technologies` | Public technology-category counts |
| `company` | Name, founding year, headquarters, employee and revenue ranges, and parent domain |

A measured July 2026 profile for `openai.com` included this engagement and ranking context:

```json
{
  "domain": "openai.com",
  "snapshot_date": "2026-07-01T00:00:00+00:00",
  "engagement": {
    "visits": 197235347,
    "visits_change": 0.03595051048290677,
    "bounce_rate": 0.5786326520050872,
    "pages_per_visit": 2.966191555517269,
    "average_visit_duration": "00:02:31"
  },
  "rankings": {
    "global": { "rank": 212, "previous_rank": 200, "change": -12 },
    "country": { "rank": 261, "previous_rank": 250, "country_code": "US" },
    "category": { "rank": 5, "previous_rank": 5, "change": 0 }
  }
}
```

### Global ranking

The ranking mode needs no websites at all:

```json
{
  "scraperType": "topWebsites",
  "maxItems": 0
}
```

Rows carry `rank`, `domain`, `rank_change`, `new_to_ranking`, `category_id`, `average_visit_duration`, `pages_per_visit`, `bounce_rate`, `icon_url`, `snapshot_date`, and `scope`. The measured ranking page began with:

```json
{
  "rank": 1,
  "domain": "google.com",
  "rank_change": 0,
  "category_id": "computers_electronics_and_technology/search_engines",
  "average_visit_duration": "00:09:58",
  "pages_per_visit": 8.676456201759066,
  "bounce_rate": 0.28492742035110014,
  "new_to_ranking": false,
  "scope": "global"
}
```

### Things worth knowing before the first run

**How many rows does the ranking return?** The public surface currently contains the global top 50, so `maxItems: 0` saves those 50 and a positive value takes a smaller slice from the top. The ranking mode ignores `domains` entirely.

**Why does the ranking mode need a mode at all — can it not just run when `domains` is empty?** Because the two datasets answer different questions and one of them costs nothing to ask. Choosing explicitly means a run never quietly produces the ranking when a domain list was meant to be filled in, or demands a domain list to read a table that takes none.

**What does `maxItems: 0` mean in the analytics mode?** The whole supplied list, however long. A domain with no public profile is skipped without cancelling the rest of the batch.

**Are these first-party analytics?** No. They are third-party estimates tied to `snapshot_date`. Some values on an anonymous profile are unavailable; missing values stay null, and locked referral entries remain explicitly locked rather than being converted to zero.

**Can one run measure rank movement over time?** No — both modes return a snapshot. Schedule the Actor and retain each run, then join on `snapshot_date`.

Prefer a narrower form? Both modes also ship on their own: [Similarweb Website Analytics Scraper](https://apify.com/thenetaji/similarweb-website-analytics-scraper) and [Similarweb Top Websites Scraper](https://apify.com/thenetaji/similarweb-top-websites-scraper).

# Actor input Schema

## `scraperType` (type: `string`):

Choose the dataset for this run, then fill in the section for that mode below.

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

Website domains or page links, one per line. Links are reduced to their hostnames and duplicate domains are read once.

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

Maximum rows to save. Set 0 to read every supplied website.

## Actor input object example

```json
{
  "scraperType": "websiteAnalytics",
  "domains": [
    "openai.com",
    "github.com"
  ],
  "maxItems": 0
}
```

# Actor output Schema

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

All records scraped by this run

# 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 = {
    "scraperType": "websiteAnalytics",
    "domains": [
        "openai.com"
    ],
    "maxItems": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/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 = {
    "scraperType": "websiteAnalytics",
    "domains": ["openai.com"],
    "maxItems": 0,
}

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

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

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

```

## CLI example

```bash
echo '{
  "scraperType": "websiteAnalytics",
  "domains": [
    "openai.com"
  ],
  "maxItems": 0
}' |
apify call thenetaji/similarweb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thenetaji/similarweb-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8OFMSxgOaGpcxfYTQ/builds/GiwJmJK9wBUqjCt5w/openapi.json
