Games & Comics — entry 074 of 75

xkcd

Verified Aug 2026

xkcd exposes a tiny, unauthenticated JSON endpoint for Randall Munroe's webcomic: fetch the current comic at /info.0.json or any past comic by number at /<num>/info.0.json, getting back the title, image URL, publish date, and (when available) the transcript and alt text. There's no key, rate limit tier, or pricing — it's a courtesy read-only feed alongside the main comic site.

xkcd exposes a tiny, keyless JSON endpoint alongside Randall Munroe's webcomic: the current comic at /info.0.json, or any past comic by number at /<num>/info.0.json. A live GET this run against /614/info.0.json returned a genuine 1,452 B record for 'Woodpecker' at HTTP 200 — no key or signup of any kind.

comicsno-authread-only
AuthenticationNone requiredCall it straight away — no key, no signup.
HTTPSSupportedTraffic is encrypted in transit.
CORSDisabledBrowser calls need a server-side proxy.
PricingFreeNo paid tier — free for the documented use case.
FormatsJSONResponses can be requested as JSON.

GreatAPIs Score

Score74out of 100
Authentication25/25No authentication required
Pricing20/20Free to use
Docs0/20No docs or spec available
Formats9/15Single response format
Freshness20/20Verified within 6 months

Embed this badge

Scored 74 on greatapis.com
<a href="https://greatapis.com/api/xkcd/"><img src="https://greatapis.com/badge/xkcd.svg" alt="Scored 74 on greatapis.com"></a>

Auth quickstart

  1. No API key, signup, or credit card required — a live GET this run against /614/info.0.json returned the full comic record with zero credentials. There's no rate-limit header or tier of any kind; it's a courtesy feed alongside the main comic site.
Stored keyNo key stored

Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.

Fetch a specific comic by number

GEThttps://xkcd.com/614/info.0.json

200 application/json

{
  "month": "7",
  "num": 614,
  "link": "",
  "year": "2009",
  "news": "",
  "safe_title": "Woodpecker",
  "transcript": "[[A man with a beret and a woman are standing on a boardwalk, leaning on a handrail.]]\nMan: A woodpecker!\n...transcript continues, 1.1 KB total in the real response...",
  "alt": "If you don't have an extension cord I can get that too.  Because we're friends!  Right?",
  "img": "https://imgs.xkcd.com/comics/woodpecker.png",
  "title": "Woodpecker",
  "day": "24"
}

Dropping the number entirely — a bare GET this run against /info.0.json — returned the site's current latest comic instead (a genuine 305 B record for comic #3279, 'Main Span', dated 2026-07), not comic #1 or an error. There is no separate "latest" alias path; omitting /<num>/ from the URL is itself the latest-comic request.

Try it

Developer reference

Base URLhttps://xkcd.com
Key endpoints
  • GET/info.0.json
  • GET/{num}/info.0.json

Gotchas & limits

  • Not every comic number resolves — comic #404 genuinely does not exist and is a real 404, confirmed live this run: a GET against /404/info.0.json returned an nginx HTML 404 page, not a JSON body. A sequential crawler from 1 upward must tolerate this one gap (an in-joke on Randall Munroe's part) or it will crash trying to JSON.parse() an HTML error page.
  • There is genuinely no CORS support — a live GET this run against /614/info.0.json with an Origin: https://example.com header returned HTTP 200 with no access-control-allow-* header of any kind. Direct browser-side fetch() from another origin will be blocked by the browser even though the server itself answers fine; a proxy or server-side fetch is required.
  • transcript and alt are only reliably populated for older comics — confirmed by comparing the two live responses this run: comic #614 (2009) carries a full multi-line transcript, while the current latest comic, #3279 (2026), returned "transcript": "" — an empty string, not a missing key. Code that assumes transcript is always non-empty will silently get nothing for recent comics.
  • month, num, year, and day mix types inconsistently — confirmed live above: num is a JSON number (614), while month, year, and day are all quoted strings ("7", "2009", "24"). Code that does date arithmetic on month/year/day directly, expecting numbers, will silently string-concatenate instead.