freeapis

xkcd

Retrieve xkcd comics as JSON

Authentication
No auth
HTTPS
Yes
CORS
No
Documentation / URL
https://xkcd.com/json.html

Overview

xkcd — the beloved webcomic by Randall Munroe — publishes every comic as a simple JSON document. The endpoint needs no API key and no rate limit is documented, which makes it a classic for “comic of the day” widgets, fun APIs demos, and easter eggs.

Quick Start

Latest comic (verified live — this returns the current strip’s data):

curl "https://xkcd.com/info.0.json"

A specific comic by number:

curl "https://xkcd.com/327/info.0.json"

The JSON is compact and self-explanatory:

{
  "month": "8",
  "num": 3288,
  "year": "2026",
  "safe_title": "Archery Feat",
  "alt": "Update: I would not have embarked on this powerscaling venture...",
  "img": "https://imgs.xkcd.com/comics/archery_feat.png",
  "title": "Archery Feat",
  "day": "21"
}

What’s in each comic

  • num — comic number (stable ID)
  • title / safe_title — title (safe_title strips special characters)
  • img — direct image URL on imgs.xkcd.com (hotlink-friendly)
  • alt — the mouseover/hover text (often the best part!)
  • transcript — text transcript when available
  • year / month / day — publish date

Authentication

None — keyless and open.

Rate Limits & Notes

  • No documented hard limit, but it’s a free service — cache the JSON if you poll regularly (comics only change once a day).
  • The latest-comic endpoint tells you the current number; iterate downward for archives.
  • Image hotlinking from imgs.xkcd.com is the intended usage.
  • CORS isn’t guaranteed — for browser widgets, fetch via your own server or a small proxy.

FAQ

Is the xkcd API free? Yes — free, keyless, no registration.

How do I get a specific comic? https://xkcd.com/{number}/info.0.json.

Can I hotlink the images? Yes — imgs.xkcd.com URLs are meant to be embedded directly.

More in Games & Comics

APIAuthHTTPSCORS
AmiiboAPI

Nintendo Amiibo Information

No authYesYes
Animal Crossing: New Horizons

API for critters, fossils, art, music, furniture and villagers

No authYesUnknown
Astroworld

Free Minecraft data: mobs, biomes, items, enchantments, structures, commands, versions, achievements, trades

No authYesYes
Autochess VNG

Rest Api for Autochess VNG

No authYesYes
Barter.VG

Provides information about Game, DLC, Bundles, Giveaways, Trading

No authYesYes