# Similarweb Rankings Scraper (`axiomworks/similarweb-top-websites-scraper`) Actor

Scrape Similarweb's public website rankings into structured records with domain, rank, rank change, category, subcategory, average visit duration, pages per visit and bounce rate. Select worldwide, country or category pages, and collect results using plain HTTP requests without a login or browser.

- **URL**: https://apify.com/axiomworks/similarweb-top-websites-scraper.md
- **Developed by:** [Axiom Works](https://apify.com/axiomworks) (community)
- **Categories:** SEO tools
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.98 / 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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Similarweb Top Websites Scraper

**Returns:** one row per ranked website with domain, rank, rankChange, category, avgVisitDuration, avgVisitDurationSeconds, pagesPerVisit, bounceRate.
**Input:** `{"countries": ["united-states"], "categories": [], "maxItems": 50}`
**Best for:** market research on the biggest sites per country, rank tracking over time, and checking where specific domains rank (Similarweb scraper / Similarweb API alternative for public rankings).

```json
{
  "id": "united-states|all-categories|google.com",
  "domain": "google.com",
  "rank": 1,
  "rankChange": 0,
  "category": "computers_electronics_and_technology",
  "avgVisitDuration": "00:09:54",
  "avgVisitDurationSeconds": 594,
  "bounceRate": 0.2854679742286687
}
```

### What does Similarweb Top Websites Scraper do?

Similarweb Top Websites Scraper reads the public "Top Websites" ranking pages on Similarweb and turns each row into a clean dataset record. For every ranked site you get the domain, its position in the list, how far it moved since the previous period, its category and subcategory, the average visit duration, pages per visit and the bounce rate.

You choose which rankings to read. A ranking can be worldwide, for one country, for one category, or for a country and category together. The Actor visits one page per ranking, so a run is fast and cheap. It needs no login and no browser, and it works with plain HTTP requests through Apify Proxy.

Typical uses:

- Track which sites rise or fall in a country's ranking from one month to the next.
- Build a list of the biggest sites in a niche, such as technology or news, for outreach or market research.
- Compare engagement numbers (visit duration, pages per visit, bounce rate) between the leading sites in a market.
- Feed a dashboard or spreadsheet with a repeatable, scheduled export of the public rankings.
- Optionally label each site with a business type (ecommerce, media, social, SaaS, search, government, other) using an AI step.

This project is independent. It is not made by, endorsed by or connected to Similarweb.

#### Important limits

Similarweb shows only the first 50 rows of each ranking to visitors who are not signed in. This Actor returns those 50 rows per ranking page. To collect more sites, add more countries or categories: every country and category pair is its own ranking with its own 50 rows. Some country and category pairs list fewer than 50 sites, so the count per page can be lower.

The ranking rows do not contain visit counts, traffic sources, audience geography or keywords. Those live on per-site profile pages that require a login or are blocked for automated access, so this Actor does not return them. The `profileUrl` field links to the public profile page for each domain so you can open it yourself.

### What data can you get?

| Field | Type | Description |
|---|---|---|
| `id` | string | Stable unique ID made of country, category filter and domain |
| `domain` | string | Website domain, for example `google.com` |
| `rank` | number | Position in the ranking page, 1 is the top |
| `country` | string | Country URL code of the ranking, or `worldwide` |
| `rankChange` | number | Change in rank compared with the previous period, positive means the site moved up |
| `isNewRank` | boolean | True when the site is new in the ranking |
| `category` | string | Top-level Similarweb category of the site |
| `subcategory` | string | Similarweb subcategory of the site |
| `avgVisitDuration` | string | Average visit duration as HH:MM:SS |
| `pagesPerVisit` | number | Average pages viewed per visit |
| `bounceRate` | number | Share of single-page visits, from 0 to 1 |
| `avgVisitDurationSeconds` | number | Average visit duration converted to seconds |
| `categoryPath` | string | Category and subcategory in the form accepted by the `categories` input |
| `faviconUrl` | string | Favicon image URL for the site |
| `profileUrl` | string | Similarweb profile page URL for the domain |
| `sourceUrl` | string | Ranking page the record came from |
| `siteType` | string | Optional AI label: ecommerce, media, social, saas, search, government or other |

Fields that Similarweb does not publish for a row are returned as `null`.

### How to use Similarweb Top Websites Scraper

1. Open the Actor in Apify Console and go to the Input tab.
2. Add one or more country codes, for example `united-states` or `germany`. Leave the list empty for the worldwide ranking.
3. Optionally add category paths such as `computers-electronics-and-technology`. Leave empty for all categories.
4. Set `maxItems` to the number of records you want in total.
5. Click Start. Results appear in the Output tab as a table you can download as JSON, CSV, Excel or HTML.

Country and category codes are the same words that appear in the Similarweb URL. For example `https://www.similarweb.com/top-websites/united-kingdom/computers-electronics-and-technology/` uses the country `united-kingdom` and the category `computers-electronics-and-technology`. You can also paste whole ranking page URLs into `startUrls`.

The Actor requests about one page per second and retries with a growing delay when Similarweb answers with a temporary block or an empty response. It stops as soon as `maxItems` records are saved.

If an input is wrong, for example a country code with spaces, the run fails straight away with a message that explains what to change. If none of the requested pages can be loaded, the run also fails with an explicit error instead of finishing with an empty dataset.

### Input

| Field | Type | Description |
|---|---|---|
| `countries` | array of strings | Country URL codes, for example `united-states`. Empty means worldwide. |
| `categories` | array of strings | Category paths, for example `computers-electronics-and-technology`. Empty means all categories. |
| `startUrls` | array of strings | Optional explicit ranking page URLs. When set, countries and categories are ignored. |
| `maxItems` | integer | Maximum records to save, 1 to 10000, default 50. |
| `domains` | array of strings | Optional filter: keep only these domains (for example `google.com`) from the fetched rankings. Empty keeps all. |
| `enrichWithAI` | boolean | Add a `siteType` label to each record, default false. |
| `proxyConfiguration` | object | Apify Proxy settings. Datacenter proxy is the default. |

Example input:

```json
{
  "countries": ["united-states", "united-kingdom"],
  "categories": ["computers-electronics-and-technology"],
  "maxItems": 100,
  "enrichWithAI": false,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

The Actor reads every country and category combination in order, so the example above reads two ranking pages. The same site can appear under several combinations; each record has its own `id`, so there are no duplicates inside one ranking and records from different rankings stay distinct.

### Output

Each record is one row of one ranking. Example from a real run on the United States ranking:

```json
{
  "id": "united-states|all-categories|google.com",
  "domain": "google.com",
  "rank": 1,
  "country": "united-states",
  "rankChange": 0,
  "isNewRank": false,
  "category": "computers_electronics_and_technology",
  "subcategory": "search_engines",
  "avgVisitDuration": "00:09:54",
  "avgVisitDurationSeconds": 594,
  "categoryPath": "computers-electronics-and-technology/search-engines",
  "pagesPerVisit": 8.704421225101038,
  "bounceRate": 0.2854679742286687,
  "profileUrl": "https://www.similarweb.com/website/google.com/",
  "sourceUrl": "https://www.similarweb.com/top-websites/united-states/"
}
```

The `rank` value is the position on the ranking page you requested. When you filter by category, rank is the position inside that category's list.

### How much does it cost?

The Actor uses pay per event pricing. You are charged once for each record saved (the `result` event). When you turn on `enrichWithAI` and a site is successfully labelled, one additional `enriched-result` event is charged for that record. Records whose AI label failed are not charged for enrichment. See the Pricing tab of the Actor for the current rates. Platform usage such as proxy traffic is small because each ranking is a single page request.

### Use with AI agents (MCP)

You can call this Actor from any MCP-compatible assistant through the Apify MCP server. Add this to your MCP client configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=axiomworks/similarweb-top-websites-scraper"
    }
  }
}
```

Example prompts:

- "List the top 20 websites in Germany by Similarweb rank with their bounce rates."
- "Get the United Kingdom technology ranking and tell me which sites are new this period."
- "Compare average visit duration for the top 10 sites in the United States and Canada."

### Integrations and API

You can start the Actor from code, schedule it, or connect it to other tools with Apify integrations and webhooks.

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("axiomworks/similarweb-top-websites-scraper").call(
    run_input={"countries": ["united-states"], "maxItems": 50}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["rank"], item["domain"])
```

JavaScript:

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

const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('axiomworks/similarweb-top-websites-scraper').call({
    countries: ['united-states'],
    maxItems: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => `${i.rank} ${i.domain}`));
```

cURL:

```bash
curl -X POST "https://api.apify.com/v2/acts/axiomworks~similarweb-top-websites-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"countries": ["united-states"], "maxItems": 50}'
```

### FAQ

**How many sites can I get per ranking?**
Up to 50. That is the number of rows Similarweb shows publicly. Combine several countries and categories to collect more.

**Why are some country and category pairs short?**
Similarweb lists fewer rows for some narrow pairs. The Actor returns what the page lists.

**Does it return monthly visits or traffic sources?**
No. Those numbers are not part of the public ranking rows, so the Actor does not invent or estimate them.

**What does enrichWithAI do?**
It sends the domain and its category to a third-party AI processor, which picks one of seven site types. The label is optional, off by default, and limited to a fixed number of calls per run. If the AI service is unavailable, records are still saved without `siteType` and without the extra charge.

**The run failed with "No ranking page could be loaded". What now?**
The site answered every attempt with a block or an empty page, or the country or category code does not exist. Check the code against the Similarweb URL, then retry. Switching the proxy group to residential in `proxyConfiguration` can help.

**How fresh is the data?**
Whatever Similarweb currently publishes on the page. The Actor reads the page live on every run.

### Is it legal to scrape Similarweb?

This Actor is not affiliated with, endorsed by or sponsored by Similarweb; it is an independent tool. It reads only publicly visible ranking pages that load without an account. It does not sign in, solve CAPTCHAs or read private data. The rankings describe websites, not individuals. Laws and site terms differ by country and use case, and the site's terms may restrict automated access, so review them and get legal advice if you plan commercial or large-scale use. You are responsible for how you use the data.

### Feedback

If a field is missing, a ranking fails to load or you need another field, open an issue from the Actor page in Apify Console with the input you used and the run link.

# Actor input Schema

## `countries` (type: `array`):

Similarweb country URL codes to rank, e.g. \['united-states','united-kingdom','germany']. Empty list means worldwide. Each country is a separate ranking of up to 50 sites. Ignored when startUrls is set.

## `categories` (type: `array`):

Similarweb category URL paths, e.g. \['computers-electronics-and-technology'] or a subcategory like 'computers-electronics-and-technology/search-engines'. Empty list means all categories. Ignored when startUrls is set.

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

Optional explicit ranking page URLs, e.g. \['https://www.similarweb.com/top-websites/germany/']. Must start with https://www.similarweb.com/top-websites/. When set, countries and categories are ignored.

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

Optional list of domains to keep, e.g. \['google.com','amazon.com']. Only matching sites found in the fetched rankings are saved; empty keeps all. Useful to check where specific sites rank per country or category.

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

Maximum records to save across all rankings, 1-10000, default 50. Each ranking page holds at most 50 sites, so use several countries or categories for more.

## `enrichWithAI` (type: `boolean`):

If true, each site gets a siteType (ecommerce, media, social, saas, search, government, other) from a third-party AI processor, billed as an extra enriched-result event. Default false.

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

Apify Proxy settings. Datacenter proxy is the default and works for ranking pages.

## Actor input object example

```json
{
  "countries": [
    "united-states"
  ],
  "categories": [],
  "startUrls": [],
  "domains": [],
  "maxItems": 50,
  "enrichWithAI": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "countries": [
        "united-states"
    ],
    "categories": [],
    "maxItems": 50,
    "enrichWithAI": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("axiomworks/similarweb-top-websites-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 = {
    "countries": ["united-states"],
    "categories": [],
    "maxItems": 50,
    "enrichWithAI": False,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("axiomworks/similarweb-top-websites-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 '{
  "countries": [
    "united-states"
  ],
  "categories": [],
  "maxItems": 50,
  "enrichWithAI": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call axiomworks/similarweb-top-websites-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axiomworks/similarweb-top-websites-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/7rzFmWS4IflBSORp4/builds/v4LMft4TGIYNcvCjD/openapi.json
