JokeAPI at https://v2.jokeapi.dev serves single-line and two-part jokes by category, with flags to filter out anything not safe for work.
None — no key, no signup. Every example runs as-is.
Full reference: https://v2.jokeapi.dev/
safe-mode excludes anything flagged.
curl "https://v2.jokeapi.dev/joke/Programming?safe-mode"
{
"error": false,
"category": "Programming",
"type": "single",
"joke": "The generation of random numbers is too important to be left to chance.",
"flags": {
"nsfw": false,
"religious": false,
"political": false,
"racist": false,
"sexist": false,
"explicit": false
},
"id": 39,
"safe": true,
"lang": "en"
}
type=single skips setup/delivery jokes; amount returns several.
curl "https://v2.jokeapi.dev/joke/Any?safe-mode&type=single&amount=2"
{
"error": false,
"amount": 2,
"jokes": [
{
"category": "Misc",
"type": "single",
"joke": "Relationship Status: just tried to reach for my dog's paw and he pulled it away so I pretended I was reaching for the remote.",
"flags": {
"nsfw": false,
"religious": false,
"racist": false,
"sexist": false,
"political": false,
"explicit": false
},
"id": 194,
"safe": true,
"lang": "en"
},
{
"category": "Misc",
"type": "single",
"joke": "My wife and I have reached the difficult decision that we do not want children.\nIf anybody does, please just send me your contact details and we can drop them off tomorrow.",
"flags": {
"nsfw": false,
"religious": false,
"political": false,
"racist": false,
"sexist": false,
"explicit": false
},
"id": 256,
"safe": true,
"lang": "en"
}
]
}