TidyTools

Regional price check

POST https://tools.yukai.uk/api/v1/price-check

Compare prices, currency and country site of one URL across regions. Opens one pricing, product or shop page from up to four fixed places at the same time (US Phoenix, Singapore, London, Taiwan) and compares what a visitor there gets: price and currency (page text, JSON-LD offers and price meta tags; "S$", "NT$", "£", "€", ISO codes and bare "$" resolved from structured data, the page and the country site), the country site it redirected to, HTTP status, page language, blocks and walls ("not available in your region", cookie-consent walls, "choose your country" pickers, 404s) and text similarity, plus a price table converted to one currency. These are four fixed vantage points, not any country. Each region's result really comes from that region: a refused region is reported as refused, never silently replaced by another. Honest crawler: one identifying User-Agent, robots.txt honored, no logins, no cookies, no CAPTCHA solving. Typical time 2-6 s; up to 58 s when a Taiwan browser render is needed.

Cost

Credits: 36 per region delivered ($0.0036 per region delivered). 144 credits are reserved before the call; the call is then settled on the real number of items returned. Failed calls are free. Source price: regional-price-check/region-checked.

Input

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

Required: url.

FieldTypeDefaultDescription
url requiredstringPricing, product or store page. A bare domain such as example.com is accepted (https is assumed). Private, local and cloud-metadata addresses are refused.
regionsstring"us,sg,eu,tw"Comma-separated vantage points: us (Phoenix), sg (Singapore), eu (London, UK), tw (Taiwan). Default: all four. Each region is one network fetch; fewer regions = faster.
modestring"auto"auto (default): plain HTTP, and a Taiwan page that is still a JavaScript shell (or refused over HTTP) is rendered once in a Taiwan browser. http: HTTP only (fastest). browser: Taiwan renders in a browser; the other regions have no browser and stay on HTTP.
convertTostring"USD"Convert the price table to this currency with daily exchange rates. none = no conversion.
priceNearstringComma-separated anchor texts (a plan name such as Premium Individual): keep only the prices that follow one of them.
cssSelectorstringRead prices only from the part of the page matching this CSS selector.
compareOnstring"currency,price,redirect,language,availability,consent_wall,content"Comma-separated aspects that count for differs: currency, price, redirect, language, availability, consent_wall, content. Default: all.
similarityThresholdinteger80Text similarity (0-100) below which content counts as different.
includeTextbooleanfalseAlso return each region's visible text (cut at 20,000 characters).
respectRobotsbooleantrueHonor the site's robots.txt for our crawler token.
timeoutMsinteger20000Timeout per region fetch in milliseconds. The whole call is limited to 58 s.
waitUntilstring"load"Browser pages: when the page counts as loaded.

Examples

Replace tt_live_XXXX with your key from the pricing page.

curl

curl -i -X POST "https://tools.yukai.uk/api/v1/price-check" \
  -H "Authorization: Bearer tt_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.spotify.com/premium/"}'

JavaScript (fetch)

const res = await fetch("https://tools.yukai.uk/api/v1/price-check", {
  method: "POST",
  headers: { "Authorization": "Bearer tt_live_XXXX", "Content-Type": "application/json" },
  body: JSON.stringify({"url":"https://www.spotify.com/premium/"}),
});
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/price-check",
    headers={"Authorization": "Bearer tt_live_XXXX"},
    json={"url": "https://www.spotify.com/premium/"},
    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 regional-price-check (its servers entry is the marketplace gateway; call https://tools.yukai.uk with your key).

← All routes · Pricing