JokeAPI
App · Misc References · 11 actions
Pull jokes into a workflow from JokeAPI, an open catalogue of around 1,370 jokes in six languages with unusually fine filters. Draw one joke or up to ten, narrow by category, language and one-line or two-part, search for a joke about a subject, look one up by id, or pick a joke of the day that stays the same all day so a scheduled post never tells two. Every joke arrives with its whole text in one field whichever type it is, and with the content flags it carries, so a public-facing workflow can exclude anything it would not want to post: blacklist the flags you object to, or turn on safe mode and let the service decide. No account or API key is required.
Actions
| Action | What it does |
|---|---|
| Check service status | Check whether JokeAPI is answering, how quickly, and how much of this minute's request budget is left. |
| Get a joke | Get one joke, filtered however you need: by category, by language, one-line or two-part, with flagged jokes excluded and safe mode on. |
| Get a joke by id | Get one specific joke by its id, for re-reading a joke an earlier step found or for pinning a workflow to a joke you have chosen. |
| Get a language code | Turn a language name into the two-letter code the other actions take. |
| Get API info | Report what the service currently holds: its version, how many jokes there are, which categories, flags, types and formats exist, which joke ids are valid in each language and how many of those jokes are safe. |
| Get blacklist flags | List the flags a joke can carry, which are the flags a filter can exclude. |
| Get joke categories | List the joke categories the service currently serves, and the aliases that resolve onto them. |
| Get languages | List the languages jokes exist in, with how many jokes each holds and how many of those are safe, alongside the languages the service translates its error messages into. |
| Get several jokes | Get up to ten jokes in one request, with the same filters as a single draw. |
| Get the joke of the day | Pick one joke for a day and keep picking that same joke all day. |
| Search jokes | Find jokes containing a word or phrase, anywhere in the joke and whatever its case. |
Check service status
Check whether JokeAPI is answering, how quickly, and how much of this minute's request budget is left. This is the one action that reports a problem as a value instead of failing the step, so a workflow can decide what to do about it. Being throttled, being down for maintenance and being refused by the service's CDN are told apart, because they call for different responses: the first clears within a minute, the second is tracked on the service's status page, and the third usually clears on its own.
Inputs
None.
Outputs
messagetextonlinetrue/falserate_limitedtrue/falsereachabletrue/falserequests_remainingnumberresponse_time_msnumberstatus_codenumber
Example output
{
"message": "JokeAPI is up and answering, with 119 of 120 requests left this minute.",
"online": true,
"rate_limited": false,
"reachable": true,
"requests_remaining": 119,
"response_time_ms": 118.4,
"status_code": 200
}Get a joke
Get one joke, filtered however you need: by category, by language, one-line or two-part, with flagged jokes excluded and safe mode on. The joke comes back with its whole text in one field ready to post, as well as its setup and delivery separately, so a one-line joke and a two-part joke can be handled the same way.
Inputs
- Categories
categoriestext - Which kinds of joke to draw from. Pick several to draw from any of them, or none to draw from all of them. The service's own aliases are accepted too, so a category read off an earlier joke works as a filter here: Miscellaneous means Misc, Coding and Development mean Programming, and Halloween means Spooky.One or more of:
Any,Misc,Programming,Dark,Pun,Spooky,Christmas. - Exclude jokes flagged
blacklist_flagstext - Do not serve jokes carrying any of these flags. This is the filter that keeps a public-facing workflow safe: the catalogue includes a Dark category and jokes many people would not want posted under their name. Excluding nsfw, racist, sexist and explicit is a sensible floor; turn on Safe mode as well if nothing explicit can get through.One or more of:
nsfw,religious,political,racist,sexist,explicit. - Joke type
joke_typetext - Only draw one-line jokes, or only setup-and-delivery ones. Leave it empty for either. Every joke comes back with its whole text in one field regardless, so this is for when the shape matters - a two-part joke can be posted with its delivery held back.One of:
single(Single (one line)),twopart(Two-part (setup and delivery)). - Language
languagetext - The language to draw jokes in, as a two-letter code or a language name. Jokes exist in English, German, Czech, Spanish, French and Portuguese; run Get languages for the current list and how many jokes each holds. Beware that the service also lists Italian and Russian, which it translates its error messages into but has no jokes in - asking for those is reported here rather than coming back empty. Leave it empty for English.
- Safe mode
safe_modetrue/false - Serve only jokes the service considers safe for everyone. This is broader than the flags: it also excludes the whole Dark category and jokes whose language or references make them explicit even unflagged. Turn it on for anything customer-facing.Default:
false. - Restrict to joke ids
id_rangetext - Only draw from this range of joke ids, written as 0-99. Ids are positions in a language's own joke file, so a range means different jokes in each language; Get API info reports which ids exist in which. Leave it empty to draw from all of them.
Outputs
filtersobjectjokeobject
Example output
{
"filters": {
"blacklist_flags": [
"nsfw",
"racist",
"sexist",
"explicit"
],
"categories": [
"Programming"
],
"contains": null,
"id_range": null,
"language": "en",
"safe_mode": false,
"type": null
},
"joke": {
"category": "Programming",
"delivery": "Because Oct 31 == Dec 25.",
"flags": [],
"id": 8,
"joke": null,
"language": "en",
"safe": true,
"setup": "Why do programmers always mix up Halloween and Christmas?",
"text": "Why do programmers always mix up Halloween and Christmas?\nBecause Oct 31 == Dec 25.",
"type": "twopart"
}
}Get a joke by id
Get one specific joke by its id, for re-reading a joke an earlier step found or for pinning a workflow to a joke you have chosen. Ids are positions in a language's own joke file, so the same id is a different joke in each language and the language travels with it.
Inputs
- Joke ID
joke_idtextRequired - The joke's numeric id. Ids start at 0. A full JokeAPI request URL carrying an idRange is accepted too, which is what you get from the service's own Try It form.
- Language
languagetext - The language to draw jokes in, as a two-letter code or a language name. Jokes exist in English, German, Czech, Spanish, French and Portuguese; run Get languages for the current list and how many jokes each holds. Beware that the service also lists Italian and Russian, which it translates its error messages into but has no jokes in - asking for those is reported here rather than coming back empty. Leave it empty for English.
Outputs
jokeobject
Example output
{
"joke": {
"category": "Pun",
"delivery": null,
"flags": [],
"id": 61,
"joke": "I invented a new word: Plagiarism!",
"language": "en",
"safe": true,
"setup": null,
"text": "I invented a new word: Plagiarism!",
"type": "single"
}
}Get a language code
Turn a language name into the two-letter code the other actions take. The service searches its language list loosely, so German, Deutsch and a near miss all resolve. The answer also says whether that language has any jokes, because a code on its own does not: it resolves Italian quite happily, and there are no Italian jokes.
Inputs
- Language
languagetextRequired - The language to look up, by name. Spelling it the way it is spelt in that language works too.
Outputs
codetexthas_jokestrue/falsejoke_languageslistlanguagetext
Example output
{
"code": "de",
"has_jokes": true,
"joke_languages": [
"cs",
"de",
"en",
"es",
"fr",
"pt"
],
"language": "German"
}Get API info
Report what the service currently holds: its version, how many jokes there are, which categories, flags, types and formats exist, which joke ids are valid in each language and how many of those jokes are safe. This is the action to run before filtering, and the one that says whether an id range you want to use exists at all.
Inputs
None.
Outputs
categorieslistflagslistformatslistid_rangeslistjoke_languagesnumbermessagetextsafe_jokeslistsystem_languagesnumbertotal_jokesnumbertypeslistversiontext
Example output
{
"categories": [
"Any",
"Misc",
"Programming",
"Dark",
"Pun",
"Spooky",
"Christmas"
],
"flags": [
"nsfw",
"religious",
"political",
"racist",
"sexist",
"explicit"
],
"formats": [
"json",
"xml",
"yaml",
"txt"
],
"id_ranges": [
{
"id_range": "0-15",
"language": "cs"
},
{
"id_range": "0-300",
"language": "de"
},
{
"id_range": "0-1367",
"language": "en"
}
],
"joke_languages": 6,
"message": "JokeAPI v2.3.3",
"safe_jokes": [
{
"language": "cs",
"safe_joke_count": 11
},
{
"language": "de",
"safe_joke_count": 178
},
{
"language": "en",
"safe_joke_count": 812
}
],
"system_languages": 5,
"total_jokes": 1368,
"types": [
"single",
"twopart"
],
"version": "2.3.3"
}Get blacklist flags
List the flags a joke can carry, which are the flags a filter can exclude. Run it before building a filter so a workflow excludes everything it means to, rather than the four someone remembered.
Inputs
None.
Outputs
flag_countnumberflagslist
Example output
{
"flag_count": 6,
"flags": [
"nsfw",
"religious",
"political",
"racist",
"sexist",
"explicit"
]
}Get joke categories
List the joke categories the service currently serves, and the aliases that resolve onto them. Worth having because a joke's own record says its category is Misc while a person filtering will as happily type Miscellaneous, and every category field in this integration takes either.
Inputs
None.
Outputs
aliaseslistcategorieslistcategory_countnumber
Example output
{
"aliases": [
{
"alias": "Miscellaneous",
"category": "Misc"
},
{
"alias": "Coding",
"category": "Programming"
},
{
"alias": "Development",
"category": "Programming"
},
{
"alias": "Halloween",
"category": "Spooky"
}
],
"categories": [
"Any",
"Misc",
"Programming",
"Dark",
"Pun",
"Spooky",
"Christmas"
],
"category_count": 7
}Get languages
List the languages jokes exist in, with how many jokes each holds and how many of those are safe, alongside the languages the service translates its error messages into. These are two different sets, which is the point of this action: Italian and Russian are real JokeAPI languages with no jokes in them at all, so a workflow that picks a language off the wrong list gets nothing and cannot tell why.
Inputs
None.
Outputs
default_languagetextjoke_language_countnumberjoke_languageslistsystem_languageslist
Example output
{
"default_language": "en",
"joke_language_count": 3,
"joke_languages": [
{
"code": "cs",
"id_range": "0-15",
"joke_count": 16,
"name": "Czech",
"safe_joke_count": 11
},
{
"code": "de",
"id_range": "0-300",
"joke_count": 301,
"name": "German",
"safe_joke_count": 178
},
{
"code": "en",
"id_range": "0-1367",
"joke_count": 1368,
"name": "English",
"safe_joke_count": 812
}
],
"system_languages": [
"cs",
"de",
"en",
"it",
"ru"
]
}Get several jokes
Get up to ten jokes in one request, with the same filters as a single draw. No joke is returned twice in one batch. The service changes the shape of its answer when you ask for more than one joke; this always returns a list, so a step that reads it does not break when someone raises the count from one to two. Fewer jokes than asked for means that is all that matched, which is reported rather than treated as a failure.
Inputs
- Number of jokes
amountnumber - How many jokes to fetch in one request, from 1 to 10. Ten is the service's own ceiling. Fewer may come back, which means that is all that matched.From 1 to 10.
- Categories
categoriestext - Which kinds of joke to draw from. Pick several to draw from any of them, or none to draw from all of them. The service's own aliases are accepted too, so a category read off an earlier joke works as a filter here: Miscellaneous means Misc, Coding and Development mean Programming, and Halloween means Spooky.One or more of:
Any,Misc,Programming,Dark,Pun,Spooky,Christmas. - Exclude jokes flagged
blacklist_flagstext - Do not serve jokes carrying any of these flags. This is the filter that keeps a public-facing workflow safe: the catalogue includes a Dark category and jokes many people would not want posted under their name. Excluding nsfw, racist, sexist and explicit is a sensible floor; turn on Safe mode as well if nothing explicit can get through.One or more of:
nsfw,religious,political,racist,sexist,explicit. - Joke type
joke_typetext - Only draw one-line jokes, or only setup-and-delivery ones. Leave it empty for either. Every joke comes back with its whole text in one field regardless, so this is for when the shape matters - a two-part joke can be posted with its delivery held back.One of:
single(Single (one line)),twopart(Two-part (setup and delivery)). - Language
languagetext - The language to draw jokes in, as a two-letter code or a language name. Jokes exist in English, German, Czech, Spanish, French and Portuguese; run Get languages for the current list and how many jokes each holds. Beware that the service also lists Italian and Russian, which it translates its error messages into but has no jokes in - asking for those is reported here rather than coming back empty. Leave it empty for English.
- Safe mode
safe_modetrue/false - Serve only jokes the service considers safe for everyone. This is broader than the flags: it also excludes the whole Dark category and jokes whose language or references make them explicit even unflagged. Turn it on for anything customer-facing.Default:
false.
Outputs
filtersobjectjoke_countnumberjokeslistrequested_countnumber
Example output
{
"filters": {
"blacklist_flags": [
"nsfw",
"racist",
"sexist",
"explicit"
],
"categories": [
"Programming"
],
"contains": null,
"id_range": null,
"language": "en",
"safe_mode": false,
"type": null
},
"joke_count": 2,
"jokes": [
{
"category": "Programming",
"delivery": "Because Oct 31 == Dec 25.",
"flags": [],
"id": 8,
"joke": null,
"language": "en",
"safe": true,
"setup": "Why do programmers always mix up Halloween and Christmas?",
"text": "Why do programmers always mix up Halloween and Christmas?\nBecause Oct 31 == Dec 25.",
"type": "twopart"
},
{
"category": "Pun",
"delivery": null,
"flags": [],
"id": 61,
"joke": "I invented a new word: Plagiarism!",
"language": "en",
"safe": true,
"setup": null,
"text": "I invented a new word: Plagiarism!",
"type": "single"
}
],
"requested_count": 2
}Get the joke of the day
Pick one joke for a day and keep picking that same joke all day. The service draws at random on every call, so a daily post that retries, or that two people run an hour apart, tells two different jokes for the one day. This one is fixed by the date: the same date always gives the same joke, and tomorrow gives a different one. It honours the same filters as a normal draw, so a safe joke of the day stays safe. Add a seed of your own to have two workspaces tell different jokes on the same day.
Inputs
- Day
datedate - The day to pick a joke for. Leave empty for today in UTC, which is what a scheduled step wants.
- Categories
categoriestext - Which kinds of joke to draw from. Pick several to draw from any of them, or none to draw from all of them. The service's own aliases are accepted too, so a category read off an earlier joke works as a filter here: Miscellaneous means Misc, Coding and Development mean Programming, and Halloween means Spooky.One or more of:
Any,Misc,Programming,Dark,Pun,Spooky,Christmas. - Exclude jokes flagged
blacklist_flagstext - Do not serve jokes carrying any of these flags. This is the filter that keeps a public-facing workflow safe: the catalogue includes a Dark category and jokes many people would not want posted under their name. Excluding nsfw, racist, sexist and explicit is a sensible floor; turn on Safe mode as well if nothing explicit can get through.One or more of:
nsfw,religious,political,racist,sexist,explicit. - Joke type
joke_typetext - Only draw one-line jokes, or only setup-and-delivery ones. Leave it empty for either. Every joke comes back with its whole text in one field regardless, so this is for when the shape matters - a two-part joke can be posted with its delivery held back.One of:
single(Single (one line)),twopart(Two-part (setup and delivery)). - Language
languagetext - The language to draw jokes in, as a two-letter code or a language name. Jokes exist in English, German, Czech, Spanish, French and Portuguese; run Get languages for the current list and how many jokes each holds. Beware that the service also lists Italian and Russian, which it translates its error messages into but has no jokes in - asking for those is reported here rather than coming back empty. Leave it empty for English.
- Safe mode
safe_modetrue/false - Serve only jokes the service considers safe for everyone. This is broader than the flags: it also excludes the whole Dark category and jokes whose language or references make them explicit even unflagged. Turn it on for anything customer-facing.Default:
false. - Seed
seedtext - Any text you like, mixed into the day so that two workspaces running this on the same day get different jokes. Leave empty to share the day's joke with everyone else.
Outputs
attemptsnumberdatetextfiltersobjectjokeobjectpool_sizenumberseedtext
Example output
{
"attempts": 1,
"date": "2026-09-15",
"filters": {
"blacklist_flags": [
"nsfw",
"racist",
"sexist",
"explicit"
],
"categories": [
"Programming"
],
"contains": null,
"id_range": null,
"language": "en",
"safe_mode": false,
"type": null
},
"joke": {
"category": "Pun",
"delivery": null,
"flags": [],
"id": 61,
"joke": "I invented a new word: Plagiarism!",
"language": "en",
"safe": true,
"setup": null,
"text": "I invented a new word: Plagiarism!",
"type": "single"
},
"pool_size": 1368,
"seed": "2026-09-15"
}Search jokes
Find jokes containing a word or phrase, anywhere in the joke and whatever its case. Use it to pull a joke that fits an occasion, or to check whether the catalogue has anything about a subject at all. Nothing matching is an empty result here rather than a failed step, so a workflow can decide what to do about it. The service returns up to ten matches drawn at random from however many there were, and never reports how many that was, so treat the result as a sample rather than the first page of a ranked list.
Inputs
- Contains
querytextRequired - The word or phrase a joke has to contain. Matched literally and case-insensitively, so a short word finds more than a phrase does.
- Number of jokes
amountnumber - How many jokes to fetch in one request, from 1 to 10. Ten is the service's own ceiling. Fewer may come back, which means that is all that matched.From 1 to 10.
- Categories
categoriestext - Which kinds of joke to draw from. Pick several to draw from any of them, or none to draw from all of them. The service's own aliases are accepted too, so a category read off an earlier joke works as a filter here: Miscellaneous means Misc, Coding and Development mean Programming, and Halloween means Spooky.One or more of:
Any,Misc,Programming,Dark,Pun,Spooky,Christmas. - Exclude jokes flagged
blacklist_flagstext - Do not serve jokes carrying any of these flags. This is the filter that keeps a public-facing workflow safe: the catalogue includes a Dark category and jokes many people would not want posted under their name. Excluding nsfw, racist, sexist and explicit is a sensible floor; turn on Safe mode as well if nothing explicit can get through.One or more of:
nsfw,religious,political,racist,sexist,explicit. - Joke type
joke_typetext - Only draw one-line jokes, or only setup-and-delivery ones. Leave it empty for either. Every joke comes back with its whole text in one field regardless, so this is for when the shape matters - a two-part joke can be posted with its delivery held back.One of:
single(Single (one line)),twopart(Two-part (setup and delivery)). - Language
languagetext - The language to draw jokes in, as a two-letter code or a language name. Jokes exist in English, German, Czech, Spanish, French and Portuguese; run Get languages for the current list and how many jokes each holds. Beware that the service also lists Italian and Russian, which it translates its error messages into but has no jokes in - asking for those is reported here rather than coming back empty. Leave it empty for English.
- Safe mode
safe_modetrue/false - Serve only jokes the service considers safe for everyone. This is broader than the flags: it also excludes the whole Dark category and jokes whose language or references make them explicit even unflagged. Turn it on for anything customer-facing.Default:
false.
Outputs
filtersobjectjoke_countnumberjokeslistquerytextrequested_countnumber
Example output
{
"filters": {
"blacklist_flags": [
"nsfw",
"racist",
"sexist",
"explicit"
],
"categories": [
"Programming"
],
"contains": "Halloween",
"id_range": null,
"language": "en",
"safe_mode": false,
"type": null
},
"joke_count": 1,
"jokes": [
{
"category": "Programming",
"delivery": "Because Oct 31 == Dec 25.",
"flags": [],
"id": 8,
"joke": null,
"language": "en",
"safe": true,
"setup": "Why do programmers always mix up Halloween and Christmas?",
"text": "Why do programmers always mix up Halloween and Christmas?\nBecause Oct 31 == Dec 25.",
"type": "twopart"
}
],
"query": "Halloween",
"requested_count": 5
}