Games & Comics — entry 074 of 75
xkcd
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.
GreatAPIs Score
Auth quickstart
- No API key, signup, or credit card required — a live GET this run against
/614/info.0.jsonreturned 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.
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
{
"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
https://xkcd.com- 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.jsonreturned 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 toJSON.parse()an HTML error page. - There is genuinely no CORS support — a live GET this run against
/614/info.0.jsonwith anOrigin: https://example.comheader returned HTTP 200 with noaccess-control-allow-*header of any kind. Direct browser-sidefetch()from another origin will be blocked by the browser even though the server itself answers fine; a proxy or server-side fetch is required. transcriptandaltare only reliably populated for older comics — confirmed by comparing the two live responses this run: comic #614 (2009) carries a full multi-linetranscript, while the current latest comic, #3279 (2026), returned"transcript": ""— an empty string, not a missing key. Code that assumestranscriptis always non-empty will silently get nothing for recent comics.month,num,year, anddaymix types inconsistently — confirmed live above:numis a JSON number (614), whilemonth,year, anddayare all quoted strings ("7","2009","24"). Code that does date arithmetic onmonth/year/daydirectly, expecting numbers, will silently string-concatenate instead.