Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: tilwhen date Oembed API
version: 1.0.0
description: 'Free, read-only date calculations with auditable receipts. Every response includes a receipt: the normalized operation, pinned inputs, IANA timezone, counting convention (whole calendar days, today = day 0, exclusive; business days exclude the start day and include the end day), workweek, holiday jurisdiction with excluded holidays, engine and holiday-dataset versions, warnings, sources, and a stable result ID (deterministic hash of inputs + versions). Same inputs and versions always reproduce the same ID. Holiday jurisdictions are ISO 3166-1/-2 codes: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (legacy alias UK accepted). There is no default jurisdiction. Holiday-aware spans are limited to 100000 days between the two dates; plain calendar-day arithmetic is not. Errors are always JSON: {"error":{"code","message"}}. The API is rate limited per IP at 300 requests per 60 seconds and returns 429 with Retry-After when exceeded; no key, quota or signup is required below that.'
contact:
url: https://tilwhen.com/about
servers:
- url: https://tilwhen.com
tags:
- name: Oembed
paths:
/oembed:
get:
summary: oEmbed provider for days-until pages
parameters:
- name: url
in: query
required: true
schema:
type: string
description: A tilwhen.com/days-until/{slug} page URL.
- name: format
in: query
schema:
type: string
enum:
- json
- name: maxwidth
in: query
schema:
type: integer
maximum: 600
- name: maxheight
in: query
schema:
type: integer
maximum: 260
responses:
'200':
description: oEmbed rich response
'404':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/RateLimited'
'501':
$ref: '#/components/responses/Error'
tags:
- Oembed
operationId: getOembed
x-operation-id-source: derived
components:
responses:
RateLimited:
description: Rate limited. The API is free and unauthenticated, so requests are metered per IP at 300 per 60 seconds. Counters are per Cloudflare location and eventually consistent, so this is an abuse brake rather than an exact quota. Retry-After gives the window.
headers:
Retry-After:
schema:
type: integer
description: Seconds to wait before retrying.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
required:
- error
Error:
description: Machine-readable error
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
required:
- error