Home › Joke Generator

Random Joke Generator

Pick a category and get a random joke. Only clean categories are offered here and adult and offensive jokes are filtered out, so it is safe to share.

How it works

Each click picks a random, well-rated joke (rating 5 or higher out of 10) from the chosen category of the Humor API database of 50,000+ jokes. Jokes tagged as adult, dark, racist, sexist, religious, political or insulting are always excluded.

Use it in your own app

This tool runs on the Humor API Joke API. With a free API key you get the same results as JSON in your own app, bot or game:

curl
curl "https://api.humorapi.com/jokes/random?include-tags=knock_knock&exclude-tags=nsfw,dark,racist,sexist,sexual&api-key=YOUR_API_KEY"
JavaScript (fetch)
const res = await fetch("https://api.humorapi.com/jokes/random?include-tags=knock_knock&exclude-tags=nsfw,dark,racist,sexist,sexual", {
  headers: { "x-api-key": process.env.HUMOR_API_KEY }
});
const data = await res.json();
console.log(data);
Python (requests)
import os, requests

res = requests.get("https://api.humorapi.com/jokes/random?include-tags=knock_knock&exclude-tags=nsfw,dark,racist,sexist,sexual",
                   headers={"x-api-key": os.environ["HUMOR_API_KEY"]})
print(res.json())

Get a free API key Read the docs

More free tools

Insult Generator Compliment Generator Nonsense Word Generator Meme Finder