JokeAPI
Programmable jokes in multiple languages with filtering options
- Authentication
- No auth
- HTTPS
- Yes
- CORS
- Yes
- Category
- Entertainment
- Documentation / URL
- https://v2.jokeapi.dev/
Overview
JokeAPI serves jokes in six categories — Programming, Misc, Dark, Pun, Spooky, and Christmas — with two formats: single-line jokes and two-part setup/delivery jokes. It requires no API key, supports CORS, and lets you filter out content flags (nsfw, religious, political, racist, sexist, explicit). A favorite for demos, chatbots, and developer tools.
Quick Start
A random programming joke:
curl "https://v2.jokeapi.dev/joke/Programming"
A single-line joke, safe for work:
curl "https://v2.jokeapi.dev/joke/Programming?type=single&blacklistFlags=nsfw,religious,political,racist,sexist,explicit"
Sample response:
{
"error": false,
"category": "Programming",
"type": "single",
"joke": "Algorithm: A word used by programmers when they don't want to explain how their code works.",
"flags": { "nsfw": false, "religious": false, "political": false, "racist": false, "sexist": false, "explicit": false },
"safe": true
}
Two-part joke (setup + delivery) in a specific category:
curl "https://v2.jokeapi.dev/joke/Any?type=twopart&amount=2"
Parameters
| Parameter | Purpose |
|---|---|
/joke/{category} |
Any or one of Programming, Misc, Dark, Pun, Spooky, Christmas |
type=single|twopart |
joke format |
blacklistFlags= |
comma-separated flags to exclude |
contains= |
only jokes containing a string |
lang= |
language (e.g. de, es) |
amount=n |
multiple jokes in one call |
Authentication
None — completely keyless.
Rate Limits & Notes
- Free and open; no hard documented limit, but be reasonable.
error: falsein the response means a joke was returned;error: truemeans no match (e.g.containsfiltered everything out).- The
safefield is a handy pre-computed flag for family-friendly filtering.
FAQ
Is JokeAPI free? Yes — free, keyless, and CORS-enabled.
How do I get a “safe” joke?
Pass blacklistFlags=nsfw,religious,political,racist,sexist,explicit or filter responses on the safe field.
Can I use it from the browser? Yes — CORS is enabled, so client-side fetch works directly.
More in Entertainment
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| Anycrap 35,000+ absurdist AI-generated product concepts with names, descriptions, and images | API Key | Yes | Yes | ↗ |
| chucknorris.io JSON API for hand curated Chuck Norris jokes | No auth | Yes | Unknown | ↗ |
| Corporate Buzz Words REST API for Corporate Buzz Words | No auth | Yes | Yes | ↗ |
| CosmyDay Astrology Natal charts and sky events computed from Swiss Ephemeris | No auth | Yes | Yes | ↗ |
| Excuser Get random excuses for various situations | No auth | Yes | Unknown | ↗ |