freeapis

JokeAPI

Programmable jokes in multiple languages with filtering options

Authentication
No auth
HTTPS
Yes
CORS
Yes
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: false in the response means a joke was returned; error: true means no match (e.g. contains filtered everything out).
  • The safe field 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

APIAuthHTTPSCORS
Anycrap

35,000+ absurdist AI-generated product concepts with names, descriptions, and images

API KeyYesYes
chucknorris.io

JSON API for hand curated Chuck Norris jokes

No authYesUnknown
Corporate Buzz Words

REST API for Corporate Buzz Words

No authYesYes
CosmyDay Astrology

Natal charts and sky events computed from Swiss Ephemeris

No authYesYes
Excuser

Get random excuses for various situations

No authYesUnknown