  [Home](https://scrapfly.io/)/[Scrapers](https://scrapfly.io/scrapers)/**Similarweb**

Website traffic · rankings · competitors · top sites

# // Similarweb Scraper API

Get the public data on Similarweb's website pages as clean JSON: global, country and category rank, Similarweb's visit estimate and engagement, top countries, similar sites and top-website rankings. Scrapfly gets each page past Similarweb's bot check, so you send a URL and read the data.

- **Clone it and run it.** An open-source Similarweb scraper for website profiles, side-by-side comparisons and top-website rankings, tested against live Similarweb every night.
- **Estimates, kept as estimates.** Every figure is Similarweb's own model of a site's traffic for one month. Store it with that month and use it to compare sites, not as a site's own analytics.
 
 [Get free API key](https://scrapfly.io/register) [View GitHub scraper](https://github.com/scrapfly/scrapfly-scrapers/tree/main/similarweb-scraper) [Read the API docs](https://scrapfly.io/docs/scrape-api/getting-started) 

**$3.00 per 1,000 pages** on the Pro plan: 30 credits a page at $0.10 per 1,000 credits.

1,000 free credits. No credit card required.

 [  ](https://scrapeway.com/web-scraping-api/scrapfly) [  ](https://www.capterra.com/p/212653/Scrapfly/reviews/)  

 4.8/5 from 248 reviews 

 

 

 

 

 Similarweb pages · illustration

  

 

 Website profile JSON**Output**

```
{
  <span class="c-str">"domain"</span>: <span class="c-str">"github.com"</span>,
  <span class="c-str">"month"</span>: <span class="c-str">"2026-10"</span>,
  <span class="c-str">"global_rank"</span>: <span class="c-num">41</span>,
  <span class="c-str">"country"</span>: <span class="c-str">"US"</span>,
  <span class="c-str">"country_rank"</span>: <span class="c-num">62</span>,
  <span class="c-str">"category_rank"</span>: <span class="c-num">4</span>,
  <span class="c-str">"visits_estimate"</span>: <span class="c-num">745628929</span>,
  <span class="c-str">"visits_change"</span>: <span class="c-num">0.16</span>,
  <span class="c-str">"bounce_rate"</span>: <span class="c-num">0.36</span>,
  <span class="c-str">"pages_per_visit"</span>: <span class="c-num">5.7</span>,
  <span class="c-str">"avg_visit"</span>: <span class="c-str">"00:06:28"</span>,
  <span class="c-str">"top_source"</span>: <span class="c-str">"direct"</span>,
  <span class="c-str">"top_source_share"</span>: <span class="c-num">0.52</span>
}
```

Printed by the Python request below[See the request ↓](#implementation)

   

  

What you can scrape from Similarweb

Four kinds of Similarweb data you can scrape with Scrapfly, no Similarweb account required.

 

## // Scrape Similarweb website profiles

A website page embeds its profile as JSON: global, country and category rank with the change from the month before, Similarweb's estimate of the site's visits for the month and how it moved, bounce rate, pages per visit and average visit duration, and the site's leading traffic source with its share.

- global\_rank
- country\_rank
- category\_rank
- visits
- bounce\_rate
- pages\_per\_visit
- top\_source

  

## // Scrape audience and competitor data

The same profile lists the top countries by share of traffic, the age and gender split of the audience, similar sites with an affinity score, the leading search keywords, and how search traffic splits between organic and paid.

- top\_countries
- age
- gender
- similar\_sites
- keywords
- organic\_vs\_paid

  

## // Scrape Similarweb website comparisons

Similarweb serves a comparison page at `/website/site-a.com/vs/site-b.com/` for some pairs of sites, with both sites' overview, traffic, traffic sources, ranks, audience and top countries in one response. For other pairs it sends you to the first site's profile, so the open-source scraper checks that the second site is in the data before it parses it.

- overview
- traffic
- sources
- ranking
- audience

  

## // Scrape Similarweb top website rankings

Top-websites pages rank sites for the month by country or by category. Each row gives the site, its rank change, its category, average visit duration, pages per visit and bounce rate, with a link to the site's own profile.

- country
- category
- rank\_change
- bounce\_rate
- profile\_url

  

 

  

Reliability

## // Get Similarweb pages past the bot check

Similarweb answers a plain request with a JavaScript challenge page instead of the profile. With the Unblocker, Scrapfly passes the check and returns the page with its data. Similarweb also caps how many profiles one visitor can open: past the cap, the page still loads, but every figure in it reads zero. Check the rank before you store anything.

 `unblocker=true`

Routes the request through residential proxies and runs a browser when the check needs one. Scrapfly reaches Similarweb from the US, Canada, Mexico and the EU countries, so set `country` to one of them.

 

 `window.__APP_DATA__`

Profiles, comparisons and rankings carry their data in this script tag. Read it instead of the charts: it holds the numbers the charts draw.

 

 `"globalRank": 0`

A zero rank and zero visits mean the request hit Similarweb's view cap. Retry until the rank is set: Scrapfly rotates residential IPs between requests.

 

 

 

  

Choose your tools

## // Scrapfly products for Similarweb scraping

Start with the Web Scraping API. Add an extraction prompt, screenshots or a browser session as your workflow needs them, or start from the open-source scraper. One API key covers every product.

 

### Web Scraping API for Similarweb pages

Send a Similarweb profile, comparison or ranking URL with the Unblocker and get the page back as HTML, data script included.

Render profile pages and give them a few seconds, then read `window.__APP_DATA__` and check the rank before you parse.

```
GET /scrape?url=https://www.similarweb.com/website/github.com/&unblocker=true&country=US&render_js=true&rendering_wait=5000
```

 [Explore Web Scraping API →](https://scrapfly.io/products/web-scraping-api)  

### Data Extraction API for Similarweb profiles

Add an `extraction_prompt` to a profile request and get the fields you name back as JSON, with no parser to write.

Ask for ranks, visits, engagement and top countries. If the request hits the view cap, the fields come back as dashes, so check the rank before you store the result.

```
GET /scrape?url=https://www.similarweb.com/website/stackoverflow.com/&unblocker=true&country=US&render_js=true&rendering_wait=5000&extraction_prompt=Return%20JSON%20for%20this%20website%20profile%3A%20domain%2C%20global%20rank%2C%20country%20rank%2C%20category%20rank%2C%20total%20visits%2C%20bounce%20rate%2C%20pages%20per%20visit%2C%20average%20visit%20duration%2C%20and%20the%20top%20countries%20with%20their%20traffic%20share.
```

 [Explore Data Extraction API →](https://scrapfly.io/products/extraction-api)  

### Screenshot API for Similarweb rankings

Capture a Similarweb ranking page as visitors see it: rank, site, category, visit duration, pages per visit and bounce rate.

Keep a dated visual record of a category or country ranking next to your JSON.

```
GET /screenshot?url=https://www.similarweb.com/top-websites/computers-electronics-and-technology/programming-and-developer-software/&country=us&format=jpg&resolution=1920x1080&rendering_wait=5000
```

 [Explore Screenshot API →](https://scrapfly.io/products/screenshot-api)  

### Cloud Browser API for Similarweb sessions

Call the Cloud Browser Unblock API with a Similarweb URL to get a hosted Chromium session that is already past the check.

Connect Playwright or Puppeteer to the returned `ws_url` and work with the ranking page in a real browser.

```
POST https://browser.scrapfly.io/unblock?key=KEY {"url": "https://www.similarweb.com/top-websites/computers-electronics-and-technology/programming-and-developer-software/", "country": "us"}
```

 [Explore Cloud Browser API →](https://scrapfly.io/products/cloud-browser-api)  

### Open-source Similarweb scraper on GitHub

Clone the maintained Python scraper for website profiles, comparisons and top-website rankings.

It runs on the Web Scraping API with the Unblocker, reads each page's data script, collects page URLs from Similarweb's sitemaps, and is tested against live Similarweb every night.

- scrape\_website
- scrape\_website\_compare
- scrape\_trendings
- scrape\_sitemaps

 [View the scraper on GitHub →](https://github.com/scrapfly/scrapfly-scrapers/tree/main/similarweb-scraper)  

 

  

One request

## // Read a website's rank, visits and engagement

The JSON at the top is sample output from November 25, 2026, for github.com: one request through a US residential IP, the profile's data script read from the page, then the site's ranks, Similarweb's visit estimate for October 2026, its engagement and its leading traffic source. Similarweb publishes these figures by month, so yours may differ.

Install `scrapfly-sdk` and `parsel`, then replace the key below. Change the domain in the URL to read any site's public profile. The script stops if the rank is zero, which means the request hit Similarweb's view cap: run it again.

**Prefer the full scraper?** The open-source [Similarweb scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/similarweb-scraper) scrapes website profiles, comparisons, top-website rankings and sitemap URLs, in Python 3.12. It runs against live Similarweb every night. Clone it, set `SCRAPFLY_KEY`, and point it at your own domains or categories.

 

 Python · scrapfly-sdkscrape + parse

```
<span class="c-key">import</span> json, re
<span class="c-key">from</span> scrapfly <span class="c-key">import</span> ScrapeConfig, ScrapflyClient

client = ScrapflyClient(key=<span class="c-str">"YOUR_SCRAPFLY_KEY"</span>)
result = client.scrape(ScrapeConfig(
    <span class="c-str">"https://www.similarweb.com/website/github.com/"</span>,
    unblocker=<span class="c-key">True</span>, country=<span class="c-str">"US"</span>,
    render_js=<span class="c-key">True</span>, rendering_wait=<span class="c-num">5000</span>,
))

<span class="c-com"># the page embeds its data as window.__APP_DATA__</span>
script = result.selector.xpath(
    <span class="c-str">"//script[contains(., 'window.__APP_DATA__')]/text()"</span>
).get()
payload = re.search(
    <span class="c-str">r"(\{.*?)(?=window\.__APP_META__)"</span>, script, re.S).group(<span class="c-num">1</span>)
site = json.loads(payload)[<span class="c-str">"layout"</span>][<span class="c-str">"data"</span>]
overview = site[<span class="c-str">"overview"</span>]
<span class="c-key">if</span> <span class="c-key">not</span> overview[<span class="c-str">"globalRank"</span>]:
    <span class="c-key">raise</span> RuntimeError(<span class="c-str">"Zero data: view cap hit, retry"</span>)

traffic = site[<span class="c-str">"traffic"</span>]
change = traffic[<span class="c-str">"visitsTotalCountChange"</span>]
<span class="c-com"># only the leading traffic source's share is public</span>
top = next(s <span class="c-key">for</span> s <span class="c-key">in</span> site[<span class="c-str">"trafficSources"</span>] <span class="c-key">if</span> s[<span class="c-str">"rank"</span>] == <span class="c-num">1</span>)
output = {
    <span class="c-str">"domain"</span>: site[<span class="c-str">"domain"</span>],
    <span class="c-str">"month"</span>: site[<span class="c-str">"snapshotDate"</span>][:<span class="c-num">7</span>],
    <span class="c-str">"global_rank"</span>: overview[<span class="c-str">"globalRank"</span>],
    <span class="c-str">"country"</span>: overview[<span class="c-str">"countryAlpha2Code"</span>],
    <span class="c-str">"country_rank"</span>: overview[<span class="c-str">"countryRank"</span>],
    <span class="c-str">"category_rank"</span>: overview[<span class="c-str">"categoryRank"</span>],
    <span class="c-str">"visits_estimate"</span>: traffic[<span class="c-str">"visitsTotalCount"</span>],
    <span class="c-str">"visits_change"</span>: round(change, <span class="c-num">2</span>),
    <span class="c-str">"bounce_rate"</span>: round(traffic[<span class="c-str">"bounceRate"</span>], <span class="c-num">2</span>),
    <span class="c-str">"pages_per_visit"</span>: round(traffic[<span class="c-str">"pagesPerVisit"</span>], <span class="c-num">1</span>),
    <span class="c-str">"avg_visit"</span>: traffic[<span class="c-str">"visitsAvgDurationFormatted"</span>],
    <span class="c-str">"top_source"</span>: top[<span class="c-str">"source"</span>],
    <span class="c-str">"top_source_share"</span>: round(top[<span class="c-str">"percentage"</span>], <span class="c-num">2</span>),
}
print(json.dumps(output, indent=<span class="c-num">2</span>))
```

 

 

 

  

What the data is used for

## // Common Similarweb scraping use cases

### Competitor benchmarking

Compare the estimated traffic, engagement and traffic sources of the sites you compete with, month by month.

 

### Market research

Size a market by the sites that lead it, using Similarweb's estimates for each one.

 

### Lead scoring

Add rank and estimated visits to a list of company domains as a quick signal of size.

 

### Rank tracking

Record a site's global, country and category rank every month and watch the trend.

 

### Category research

See which sites lead a category or a country, and how their engagement compares.

 

### Website data for AI agents

Give an assistant a site's public traffic profile when a user asks how big a website is.

 

 

 

  

Common questions

## // Similarweb scraping FAQ

 Is scraping Similarweb legal?

There is no universal answer. Legality depends on your jurisdiction, the data, the access method and how you use the result. Keep the workflow to public website pages, stay signed out, review Similarweb's terms of use, credit Similarweb when you publish its figures, and get legal advice for commercial use.

 Does Similarweb have an API?

Similarweb sells access to its own API as part of its business packages or on its own, priced by quote. The requests on this page read Similarweb's public website pages signed out, so you only need a Scrapfly API key, and you get the data those pages show.

 Are Similarweb traffic numbers exact?

No. Similarweb models its figures from several data sources, so visits, engagement and traffic shares are estimates, not a site's own analytics. Use them to compare sites and follow trends, and store the month each figure describes.

 Why does a Similarweb page return zeros?

Similarweb caps how many profiles one visitor can open. Past the cap, the page still loads, but the rank, visits and engagement in its data read zero, and the page shows a search limit notice. Check that `globalRank` is above zero before you store a result, and retry until it is.

 Can I compare two websites on Similarweb?

For some pairs of sites. Request `https://www.similarweb.com/website/site-a.com/vs/site-b.com/` and, where Similarweb has a comparison page, read both sites from the same data script: overview, traffic, traffic sources, ranks, audience and top countries. For other pairs Similarweb sends you to the first site's profile, so check that the second site is in the data before you parse it.

 Can I scrape Similarweb top websites by country or category?

Yes. Request `/top-websites/united-kingdom/` for a country or `/top-websites/finance/investing/` for a category. Each row holds the site, its rank change, category, visit duration, pages per visit and bounce rate, with a link to its profile.

 How much does scraping Similarweb cost?

A Similarweb page through the Unblocker costs 30 credits: 25 for residential proxies and 5 for the browser. An extraction prompt adds 5 credits per started 500 KB of page, and profile pages run past 1 MB. A Screenshot API capture of a Similarweb page costs 60 credits. The free plan includes 1,000 credits a month.

 What are the rate limits when scraping Similarweb?

Scrapfly sets no Similarweb-specific limit. Your maximum parallelism is the concurrency quota on your plan, or a lower cap configured for the project. Each in-flight request uses one slot until it finishes.

 

 

  

Start with one request

## Send the URL. Read the profile.

Web Scraping API with the Unblocker, one call per Similarweb URL.

Proxies across 75+ countries

[Similarweb scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/similarweb-scraper)[How to scrape Similarweb](https://scrapfly.io/blog/posts/how-to-scrape-similarweb)[Crunchbase Scraper API](https://scrapfly.io/scrapers/crunchbase)[G2 Scraper API](https://scrapfly.io/scrapers/g2)[All scraper pages](https://scrapfly.io/scrapers)

 

[Get free API key](https://scrapfly.io/register)[Read the docs](https://scrapfly.io/docs/scrape-api/getting-started)