TidyTools

Website traffic rank (batch)

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

Website traffic rank of up to 50 domains. The same answer for up to 50 domains in one call, in the order sent. A domain that is in no list or a line that is not a domain is reported in its own result (found: false, note or error); the call itself is still a success. Billed as one batch call.

Cost

Credits: 14 per domain found ($0.0014 per domain found). 140 credits are reserved before the call; the call is then settled on the real number of items returned. 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: domains.

FieldTypeDefaultDescription
domains requiredarray of stringUp to 50 domains or website addresses: a JSON array in the POST body, or comma- or space-separated in the query string (GET). Duplicates are dropped. A line that is not a domain is reported in its own result (error), not as a failed call.
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/batch" \
  -H "Authorization: Bearer tt_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{"domains":["stripe.com","apify.com","bbc.co.uk"]}'

JavaScript (fetch)

const res = await fetch("https://tools.yukai.uk/api/v1/traffic-rank/batch", {
  method: "POST",
  headers: { "Authorization": "Bearer tt_live_XXXX", "Content-Type": "application/json" },
  body: JSON.stringify({"domains":["stripe.com","apify.com","bbc.co.uk"]}),
});
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/batch",
    headers={"Authorization": "Bearer tt_live_XXXX"},
    json={"domains": ["stripe.com", "apify.com", "bbc.co.uk"]},
    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