A comic by number
API · /xkcd-api
xkcd API
Randall Munroe's legendary webcomic xkcd as an API. Fetch the latest comic, any comic by its number (e.g. #353 "Python"), or a random one — each with the title, the famous hover (alt) text, the full transcript, the image URL, the publication date and links to both xkcd and explainxkcd. A clean JSON wrapper over xkcd.com with no scraping and no surprises. Ideal for Discord and Slack bots, "comic of the day" widgets, dashboards and screensavers, newsletters, and any app that wants a daily dose of xkcd.
API health
healthy- Uptime
- 100.00%
- Server probes · 24h
- Avg latency
- 117 ms
- Server probes · 24h
- Subscribers
- 4,260
- active
- Total calls
- 0
- last 7 days
Pricing
Pick a tier — billed monthly, cancel anytime.
Free
Free
- 13,500 calls / month
- 2 requests / second
- Hard cap (429 above quota, no overage)
- 13,500 calls/month
- 2 req/sec
- Latest, by-number & random
- No credit card
Starter
€2.80 /month
- 195,000 calls / month
- 8 requests / second
- Hard cap (429 above quota, no overage)
- 195k calls/month
- 8 req/sec
- Comic-of-the-day widgets
- Email support
Pro
€9.40 /month
- 840,000 calls / month
- 20 requests / second
- Hard cap (429 above quota, no overage)
- 840k calls/month
- 20 req/sec
- Bots & dashboards
- Priority support
Mega
€29.60 /month
- 3,450,000 calls / month
- 50 requests / second
- Hard cap (429 above quota, no overage)
- 3.45M calls/month
- 50 req/sec
- High-traffic apps
- Dedicated SLA
Built by
Related APIs
Other APIs with overlapping tags.
Frequently asked questions
Quick answers about pricing, quotas, and integration.
How do I get an API key for xkcd API?
What's the rate limit for xkcd API?
How much does xkcd API cost?
Can I cancel my subscription anytime?
Is xkcd API GDPR-compliant?
Pick an endpoint from the list on the left to see its details and try it.
Code snippets
Sign up to get an API key, then call any path under your slug.
curl https://api.oanor.com/xkcd-api/SOME_PATH \
-H "x-oanor-key: oanor_test_..."
const res = await fetch("https://api.oanor.com/xkcd-api/SOME_PATH", {
headers: { "x-oanor-key": "oanor_test_..." }
});
const data = await res.json();
$ch = curl_init("https://api.oanor.com/xkcd-api/SOME_PATH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
$response = curl_exec($ch);
import requests
r = requests.get(
"https://api.oanor.com/xkcd-api/SOME_PATH",
headers={"x-oanor-key": "oanor_test_..."},
)
print(r.json())
Ratings
Sign in to rate.
No reviews yet.
Discussion
Ask questions, share usage tips, get answers from the provider and other developers. Public — anyone can read.
Sign in to start a thread or reply.
Sign inNew thread
·
-
Provider answer
🔒 This thread is locked — no new replies.
-
·
- No threads yet — start the discussion.
Support
Private 1:1 support with the provider — billing questions, integration issues, account problems. Only you and the provider team can see these threads.
Sign in to open a support ticket.
Sign inOpen new ticket
Describe what you need help with. The provider team gets an email and replies on the ticket page.
-
·
Urgent - No tickets yet for this API.