TidyTools

Website traffic rank

POST https://tools.yukai.uk/api/v1/traffic-rank

Website traffic rank of one domain. How popular a website is with Chrome users, from Google's public Chrome UX Report (CrUX) rank lists: the global popularity bucket over the last 12 months (Top 1K, 5K, 10K, 50K, 100K, 500K, 1M), the 6-month trend, the rank bucket in each of about 238 countries for the latest month, and the monthly history. These are rank buckets of origins with enough Chrome traffic, not visit counts or exact positions: a site outside the lists is not listed in any bucket. Data: Chrome UX Report, CC BY 4.0, refreshed monthly.

Cost

Credits: 14 ($0.0014) per successful call. Failed calls are free. Source price: website-traffic-rank/domain-checked.

Input

Send a JSON body (POST) or the same fields as a query string (GET).

Required: domain.

FieldTypeDefaultDescription
domain requiredstringA domain or website address: stripe.com, https://www.stripe.com/pricing, shop.example.co.uk (the parent domain is used when the exact name is not in the dataset, unless exact=true). Alias: url.
countriesstringComma-separated two-letter country codes (us,gb,tw; uk is accepted): the answer gets rankIn with the bucket in each, null when not listed there.
maxCountriesinteger10How many countries to list in countryRanks, most relevant first (0 = all).
includeHistorybooleantrueInclude the global bucket of each of the last 12 months in globalHistory.
exactbooleanfalsetrue: look up exactly this host (no fallback to the parent domain, e.g. shop.example.com does not become example.com).

Examples

Replace tt_live_XXXX with your key from the pricing page.

curl

curl -i -X POST "https://tools.yukai.uk/api/v1/traffic-rank" \
  -H "Authorization: Bearer tt_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{"domain":"stripe.com"}'

JavaScript (fetch)

const res = await fetch("https://tools.yukai.uk/api/v1/traffic-rank", {
  method: "POST",
  headers: { "Authorization": "Bearer tt_live_XXXX", "Content-Type": "application/json" },
  body: JSON.stringify({"domain":"stripe.com"}),
});
console.log(res.status, res.headers.get("x-credits-charged"), res.headers.get("x-credits-balance"));
console.log(await res.json());

Python (requests)

import requests

r = requests.post(
    "https://tools.yukai.uk/api/v1/traffic-rank",
    headers={"Authorization": "Bearer tt_live_XXXX"},
    json={"domain": "stripe.com"},
    timeout=120,
)
print(r.status_code, r.headers.get("x-credits-charged"), r.headers.get("x-credits-balance"))
print(r.json())

Response

JSON with "success": true and the result fields; on failure {"success": false, "error": {"code", "message", "retryable"}} and no credits are used. Every answer carries x-credits-charged (credits used) and x-credits-balance (balance after the call); check the balance any time with GET https://tools.yukai.uk/v1/billing/balance.

Full field list and response schema: OpenAPI spec website-traffic-rank (its servers entry is the marketplace gateway; call https://tools.yukai.uk with your key).

← All routes · Pricing