DEVELOPER API

Build with How Long Until X

Free, public JSON endpoints for countdown timers and site search. Pull live data into your own app, dashboard, Discord bot, or blog — no signup, no API key, just fetch.

Base URL

howlonguntilx.com

Format

JSON

Auth

None on Free · API key on paid tiers

Rate limit

Credit-based, see pricing

USAGE & PRICING

Free to start, pay only for scale

Every request against Countdown or Search consumes 1 credit. Credits reset monthly. The Free tier is enough for a personal site or a low-traffic widget; once you're past that, pick the tier that matches your volume — no per-call surprises.

Free

$0/mo

1,000 credits / mo

No signup required. Identified by IP address.

  • ~30 requests/day average
  • Countdown + Search
  • No API key needed
  • Community support
Start building
MOST POPULAR

Growth

$10/mo

20,000 credits / mo

For a live widget on a real site or small app.

  • API key required
  • Countdown + Search
  • Usage dashboard
  • Email support

Scale

$100/mo

250,000 credits / mo

For high-traffic apps, bots, or multiple integrations.

  • API key required
  • Countdown + Search
  • Usage dashboard
  • Priority support

Once a tier's monthly credits are used, further calls return 402 Payment Required until your credits reset or you upgrade. We'll email you at 80% and 100% usage so nothing breaks silently.

Authentication

The Free tier needs nothing — just call the endpoint. On Growth and Scale, pass your API key as a Bearer token. Requests with a valid key are billed to your plan's credits instead of the shared IP-based Free pool.

With an API key
curl "https://howlonguntilx.com/api/countdown?event=christmas" \
  -H "Authorization: Bearer hlx_live_xxxxxxxxxxxxxxxx"

Subscribe to Growth or Scale above to get a key instantly via PayPal — a full key-management dashboard is coming soon, in the meantime your key is available at GET /api/keys while signed in.

Rate limits

Beyond the monthly credit cap for your tier, requests are also rate-limited per IP/key to prevent bursts from affecting other users. If you're throttled you'll get back429 Too Many Requestswith { "error": "Rate limit exceeded" }. For steady embedding (e.g. a widget on your own site), cache the response client-side and refetch every 30–60 seconds rather than on every render — that alone will keep almost any real widget on Free.

GET/api/countdown

Countdown

Returns the live time remaining until any event. Pass a known event slug from our database (e.g. a specific date already tracked on the site), or plain text — the API understands both shortcuts like christmas and natural dates like 2027-06-01 or "next friday".

Query parameters

eventrequiredstringEvent slug or free-text date, e.g. "christmas", "halloween", "new year", or "2027-06-01".

Example request

curl
curl "https://howlonguntilx.com/api/countdown?event=christmas"
JavaScript (fetch)
const res = await fetch("https://howlonguntilx.com/api/countdown?event=christmas");
const data = await res.json();
console.log(data.days_left, "days left until", data.event);
Python
import requests

r = requests.get("https://howlonguntilx.com/api/countdown", params={"event": "christmas"})
data = r.json()
print(f"{data['days_left']} days left until {data['event']}")

Example response

200 OK
{
  "event": "Christmas",
  "target_date": "2026-12-25T00:00:00.000Z",
  "days_left": 147,
  "hours_left": 14,
  "minutes_left": 2,
  "seconds_left": 58,
  "progress_percent": 60,
  "is_past": false
}

Response fields

eventstringHuman-readable event name.
target_dateISO 8601 stringThe resolved target datetime in UTC.
days_left / hours_left / minutes_left / seconds_leftintegerTime remaining, broken down. Recompute client-side for a live tick — don't poll every second.
progress_percentinteger 0–100How far elapsed a tracked event's countdown is, where applicable.
is_pastbooleanTrue once the target date has passed.

Errors

404Event not foundThe event slug isn't in our database and couldn't be parsed as a date.
429Rate limit exceededToo many requests from your IP — back off and retry.

Try it live

GETPOST/api/calendarAuthenticated · Pro plan

Calendar

Unlike Countdown and Search, this endpoint is not public. It reads and writes a signed-in Pro user's own saved calendar days on howlonguntilx.com, authenticated via session cookie — it's what powers the "save this day" feature inside your own account, not something an outside site can call anonymously.

We're documenting it here for transparency and for anyone building an internal tool against their own account. If you're looking to pull public countdown data into your app, use Countdown instead.

Requests (must include a valid session cookie)

GET — read saved days
curl "https://howlonguntilx.com/api/calendar" \
  -H "Cookie: next-auth.session-token=<your-session-token>"

# → 200 { "days": [...] }  if Pro
# → 200 { "days": null }   if signed in but not Pro
# → 401 { "error": "Unauthorized" } if not signed in
POST — save days
curl -X POST "https://howlonguntilx.com/api/calendar" \
  -H "Content-Type: application/json" \
  -H "Cookie: next-auth.session-token=<your-session-token>" \
  -d '{ "days": ["2026-12-25", "2027-01-01"] }'

# → 200 { "ok": true, "updatedAt": "..." }
# → 403 { "error": "Pro required" } if not on Pro plan

Want a drop-in widget instead of raw JSON?

The embed generator gives you a ready-to-paste iframe — no fetch code required.

Explore embeddable widgets →

Questions, or need a custom endpoint? Get in touch.