Skip to main content
ScrapingRabbit

Blog · · 4 min read

Estimate Website Traffic With an API

Estimate a site's organic search traffic and ranking keywords as JSON. Working code to compare competitors, and why small sites show zero.

Before you plan content, buy a link or pitch a partner, it helps to know how strong a site is in search. This guide shows how to get an estimate of a site's organic search traffic and the number of keywords it ranks for with a single GET request, and how to compare several sites. It also shows what the numbers look like for a small site, because that is where people get confused.

Request an estimate

Send a domain. Links are cleaned up for you, so a full address works too. Every call needs an API key. New accounts get 100 free credits and a first key is created automatically on sign-up (it is shown once on the dashboard). Sign in at scrapingrabbit.com/login, then send the key in the x-api-key header (a Bearer token also works). The code below reads it from the SCRAPINGRABBIT_API_KEY environment variable, so no key is ever written into your code.

curl -H "x-api-key: $SCRAPINGRABBIT_API_KEY" "https://api.scrapingrabbit.com/v1/seo/website-traffic?domain=github.com"

A successful call costs 1 credit, as the OpenAPI file lists it.

A real answer, read on 3 December 2026:

{
  "success": true,
  "data": [
    {
      "domain_name": "github.com",
      "metrics": {
        "etv": 9435200,
        "etv_format": "9.44M",
        "total_keywords": 1960050,
        "total_keywords_format": "1.96M"
      }
    }
  ]
}

And the answer for a small, young site, our own scrapingrabbit.com, read the same day:

{
  "success": true,
  "data": [
    {
      "domain_name": "scrapingrabbit.com",
      "metrics": {
        "etv": 0,
        "etv_format": 0,
        "total_keywords": 0,
        "total_keywords_format": 0
      }
    }
  ]
}

A zero here does not mean the site has no visitors. It means the estimate has no data for it yet, because the model works from the keywords a site ranks for.

What the fields mean

FieldMeaning
domain_nameThe domain the estimate is for
metrics.etvThe estimate of organic search traffic, as a number
metrics.etv_formatThe same number in short form, such as 9.44M
metrics.total_keywordsHow many keywords the site ranks for
metrics.total_keywords_formatThe keyword count in short form

Use the plain numbers for math and the _format fields for display. When a site has no data, the _format fields are 0 as a number, not text, so do not assume they are always strings.

Compare several sites in code

The endpoint takes one domain per call, so loop over the domains you care about:

async function trafficOf(domain) {
  const url = `https://api.scrapingrabbit.com/v1/seo/website-traffic?domain=${encodeURIComponent(domain)}`;
  const res = await fetch(url, { headers: { "x-api-key": process.env.SCRAPINGRABBIT_API_KEY } });
  const body = await res.json();
  if (!body.success) return null;
  const row = body.data[0];
  return { domain: row.domain_name, traffic: row.metrics?.etv ?? 0, keywords: row.metrics?.total_keywords ?? 0 };
}

const domains = ["github.com", "scrapingrabbit.com"];
const rows = (await Promise.all(domains.map(trafficOf))).filter(Boolean);
rows.sort((a, b) => b.traffic - a.traffic);
console.table(rows);

The code reads the numbers safely, using 0 when the metrics are missing, runs the calls together, drops any that failed and sorts by the estimate. Note that a failed call returns null and a site with no data returns zeros, so you can tell the two apart.

The same in Python:

import os
import requests

def traffic_of(domain):
    res = requests.get(
        "https://api.scrapingrabbit.com/v1/seo/website-traffic",
        params={"domain": domain},
        headers={"x-api-key": os.environ["SCRAPINGRABBIT_API_KEY"]},
        timeout=60,
    )
    body = res.json()
    if not body.get("success"):
        return None
    row = body["data"][0]
    metrics = row.get("metrics") or {}
    return row["domain_name"], metrics.get("etv", 0), metrics.get("total_keywords", 0)

for domain in ["github.com", "scrapingrabbit.com"]:
    print(traffic_of(domain))

Pair it with other checks

Traffic is one signal. A domain's age and its authority score tell you different things: how long it has existed and how many other sites point to it. Run the domain age and domain authority endpoints for the same list to build a small scorecard. Each call costs 1 credit.

Things to plan for

  • It is an estimate. It comes from the keywords a site ranks for and is not the site's own analytics.
  • Small and new sites often show zero. Treat zero as "no data", not "no visitors".
  • Organic search only. Direct, social and paid traffic are not included.
  • The numbers move. Store the date you read them and compare month to month, not day to day.
  • One domain per call. Loop over your list and cache each result.
  • Rate limits and credits. Each key is limited per minute: 10 requests on the free plan, 60 on Starter, 120 on Pro and 300 on Scale. Every successful call costs credits.
  • Always check success. A failed request returns success: false, a code such as RATE_LIMITED or INVALID_API_KEY, and a message. Failed calls are not charged.

Try it without code

The free website traffic checker works in the browser with no key and shows these numbers for any domain you type. The free domain authority checker adds the authority score.

Try it yourself

Frequently asked questions

Is this the site's real traffic?

No. It is an estimate built from the keywords a site ranks for, not the site's own analytics. It is useful for comparing sites, and less reliable for the exact visit count of one small site.

Why does a site show zero?

Brand-new sites and very small sites often show no data. Our own site is an example: it came back with zero traffic and zero keywords on the day we read it.

Does it include direct, social or paid traffic?

No. The estimate is for organic search only.

More guides