JokeAPI

Get a random joke from a chosen category, such as Programming or Pun. Each result shows whether it is a one-liner or a setup and punchline, so it works for developers, teachers and anyone who wants a quick laugh.

The pre-filled example asks for a joke from the Programming category with safe mode on.

What it's useful for

  • Pull a programming joke for a team chat or a slide.
  • Try a category before adding jokes to a bot or app.
  • Find an icebreaker for a class or meeting.
  • Check how the setup and punchline format looks before building with it.

Frequently asked questions

Why does a joke sometimes have a setup and a punchline?

Jokes come in two types. Single jokes are one block of text. Two-part jokes have a setup and a delivery, which this page shows as separate rows.

Will a joke be offensive?

This page asks the service for safe-mode jokes, which excludes flagged content, and the Safe row shows the result. The service warns that some of its jokes may be offensive without safe mode.

Which categories can I use?

Programming is the default here. The service also has others, including Pun, which we saw return a result. Try a name and the response tells you if it is not valid.

Where do the jokes come from?

From JokeAPI, a free public service. We send your request through our server and show the response.

Do I get a different joke each time?

Usually, since the service picks at random from the category. You may see repeats.

About this data

  • Data comes from a free third-party service (v2.jokeapi.dev). We pass your request through our server so your browser never contacts it directly.
  • Service limit: 120 requests/min. If it's reached, this page tells you how long to wait.
  • Terms: Docs: usable without token, membership, registration or payment; MIT licensed; uses privacy policy consent. No commercial restriction stated; some jokes may be offensive (use safe-mode).
  • The service can change or go offline without notice, and we can't vouch for the accuracy of what it returns.
  • Official documentation

More in Fun & Media