xkcd
The webcomic's own JSON endpoint — comic number, title, alt text, and image URL. Tiny, stable, and unchanged for over a decade, which makes it the standard smoke-test API for tutorials.
🟢 Online · 29 ms
100%
Unlimited, no key, no credit card
No key required
Is xkcd down right now?
No — xkcd was up at our last check (Sun, 06 Dec 2026 00:40 UTC): HTTP 200 in 29 ms. It answered 100% of our hourly checks over the last 30 days.
We check every tracked API hourly from Cloudflare's network; this page is rebuilt every few hours. For the value right now, query the public JSON API or the MCP server.
Free alternatives (live ranking)
- Rick and Morty API — 🟢 Online · 10,000 req/day, no key, no credit card
- JokeAPI — 🟢 Online · 120 req/min, no key, no credit card
- Star Wars API — 🟢 Online · Unlimited, no key, no credit card
Frequently Asked Questions
Does xkcd require an API key?
No, xkcd is freely accessible without registration or an API key.
What is xkcd's free tier?
Unlimited, no key, no credit card
Is xkcd down right now?
At our last check (Sun, 06 Dec 2026 00:40 UTC) xkcd was up, with HTTP 200 in 29 ms. We check it every hour, and it answered 100% of checks over the last 30 days.
Implementation notes
When to use xkcd
The xkcd JSON endpoint is close to the smallest useful API on the internet: /info.0.json returns the latest comic and /{n}/info.0.json any numbered one, each with title, alt text, image URL, publication date and, for older comics, a full transcript. No key, no documented rate limit, and a response shape that has not changed in over a decade, which is why it is the standard smoke test in tutorials and HTTP-client test suites. Use it to teach fetch and JSON parsing, for a comic-of-the-day widget or chat bot, to exercise caching code against content that is effectively immutable, and to build search over alt text and transcripts. It is not a content platform: there is no search, listing or pagination endpoint, so discovering anything beyond the latest number means walking IDs downward. A numbered comic does not change once posted, which makes this one of the rare APIs where caching forever is simply correct — only /info.0.json moves.
Common pitfalls
- There are no CORS headers. A browser fetch from your own origin fails with a cross-origin error, which is why so many front-end tutorials quietly break here. Call it from a server, an edge function or a build step; responses only change when a new comic is posted, so a server-side cache costs nothing.
- Comic 404 does not exist, deliberately: /404/info.0.json returns an HTTP 404. Any job that walks from 1 to the latest number must treat that single miss as expected, or it will crash, or log a false outage, on every run.
- Dates are three unpadded strings. Comic 614 reports year 2009, month 7 and day 24 as text, so a naive string sort puts month 10 before month 7 and a concatenated date key is ambiguous. Build a real date from the three fields at ingest.
- transcript is empty on recent comics. Older entries carry a scene-by-scene transcript, but the latest comics come back with an empty string, so search or accessibility features built on that field cover only part of the archive. Fall back to title plus alt text, and do not treat an empty transcript as a parsing failure.
- img points at a single PNG, and some comics are interactive or far larger than a normal panel, so the image alone does not represent them. Constrain rendered width, and link to xkcd.com/{num}/ rather than presenting the PNG as the whole work.
Quick start (bash)
curl -s 'https://xkcd.com/info.0.json' | jq '{num, safe_title, img, alt}'
# numbered comics never change - cache by num indefinitely; month and day are unpadded strings
curl -s 'https://xkcd.com/614/info.0.json' | jq '{year, month, day}'
# comic 404 is a deliberate gap in the sequence
curl -s -o /dev/null -w '%{http_code}' 'https://xkcd.com/404/info.0.json' Embed this badge
Add a live status badge to your README, docs, or website.
Markdown
[](https://freeapi.watch/xkcd) HTML
<a href="https://freeapi.watch/xkcd"><img src="https://api.freeapi.watch/badge/xkcd.svg" alt="xkcd Status"/></a>