Anvil › Docs
Anvil API docs and code examples
Every endpoint has its own page with a live form, a parameter table, a real example response, copy-ready code in curl, JavaScript and Python, and answers to the questions people actually ask.
Quick start
- Base URL:
https://api.oddlathe.com. Everything is aGETunder/v1. - No key and no sign-up. CORS is open, so you can call it straight from a web page.
- 60 requests a minute and 5,000 a day per client. Every response carries
RateLimit-Remaining; over the limit you get429withRetry-After. - Errors are JSON with a stable
codeand a humanmessage. Addcompactto any query for one-line JSON. - Calling from a script? Send any
User-Agentheader. A few bare library defaults (Python'surllib, for one) are refused by the edge network with403; curl, browsers, Node andrequestswork as they are. - Machine-readable spec: /openapi.json (OpenAPI 3.1). List of endpoints as JSON: /v1.
A tiny client you can paste anywhere (JavaScript)
async function anvil(path, params = {}) {
const res = await fetch(`https://api.oddlathe.com${path}?${new URLSearchParams(params)}`);
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
return data;
}
const { uuids } = await anvil("/v1/uuid", { version: 7, count: 3 });
const next = await anvil("/v1/holidays/next", { region: "gb-eng" });Identifiers
/v1/uuidUUID generator API: random v4 and time-ordered v7 UUIDs/v1/ulidULID generator API: sortable 26-character IDs/v1/nanoidNano ID API: short URL-safe random IDs
Random
/v1/passwordRandom password generator API with entropy estimate/v1/randomRandom number API: integers, dice rolls and coin flips
Time
/v1/timeCurrent time API for any time zone, with next DST change/v1/time/convertTime zone converter API: convert a local time to other zones/v1/timezonesList of IANA time zones API with current UTC offsets/v1/cron/nextCron next run API: when will this cron expression run?/v1/cron/explainCron explainer API: plain-English schedule + next runs/v1/date/diffDate difference API: age, duration and ISO week maths/v1/countdownCountdown API: days until a date, sleeps, weekdays and weekend days
Calendar
/v1/holidaysBank holidays API: UK, IE, US, DE(+states), FR, NL, CA(+provinces), AU(+states), NZ/v1/holidays.icsBank holidays calendar feed (iCal): subscribe in Google, Apple or Outlook/v1/holidays/nextNext bank holiday API: how many days until the next holiday/v1/workdaysWorking days calculator API: count or add business days
Convert
/v1/unitsUnit converter API: length, mass, temperature, data sizes and Mbps to MB/s/v1/percentPercentage calculator API: of, is, change, apply, reverse/v1/batteryPower bank calculator API: real charges, mAh to Wh, flight rule, gadget plan/v1/stream-dataStreaming data usage API: GB per hour, monthly allowance planner, film size/v1/video-sizeVideo file size API: MB per minute, what fits in free space, bitrate for a target size/v1/input-lagInput lag API: milliseconds from button press to picture, and what would help most/v1/broadband-needBroadband speed API: how many Mb/s a household needs, which plan, and does yours cope
Text
/v1/loremLorem ipsum API: placeholder paragraphs, sentences or words/v1/hashHash API: MD5, SHA-1, SHA-256, SHA-512, SHA3 and BLAKE2b/v1/slugSlugify API: turn any title into a clean URL slug
Design
/v1/qr.svgQR code SVG API: encode text as a scannable SVG image/v1/qrQR code JSON API: SVG string plus encode metadata/v1/colorColour API: hex to RGB, HSL and OKLCH, plus WCAG contrast check
Web
/v1/http-statusHTTP status code API: what 404, 429, 502 and every other code means/v1/url/inspectLink checker API: find who really owns a URL and spot phishing tricks/v1/cookie/parseSet-Cookie checker API: why isn't my cookie being set?/v1/csp/parseCSP header checker API: grade a Content-Security-Policy and see what it blocks/v1/frame/checkClickjacking header API: X-Frame-Options and frame-ancestors checker/v1/text/inspectText X-ray API: code points, graphemes, UTF-8/16 and invisible characters
Meta
Updated