Jokes API logo
EntertainmentMAINTAINED1 token / call

Jokes API

252 original, clean jokes in 12 categories, random, searchable and safe for any audience

252 original, clean jokes — single-liners and two-part setup/punchline — across 12 categories: dad, pun, programming, general, animal, food, science, work, school, music, sports and space. Pull random jokes (up to 20 at once), full-text search the whole set, filter by category or type, page through everything, or fetch a joke by id. Every joke is written for this API and SFW (safe: true), so it is drop-in ready for apps, chatbots, dashboards, Slack bots and games aimed at any audience.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 1 token per call, so the free plan covers about 500 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "query": "GET /v1/jokes/random?category=space",
  "setup": "How do you organize a space party?",
  "delivery": "You planet.",
  "catalog": "252 original SFW jokes / 12 categories"
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for Jokes API

  • Add a joke of the day to a chatbot, dashboard or kids' app.

  • Fill loading screens and empty states with a safe one-liner.

  • Build a joke feed by category, from dad jokes to programming humour.

  • Pull up to 20 random jokes at once for a card deck or quiz.

Jokes API endpoints

Every endpoint with its parameters and a real example response.

GETGet Joke

https://api-jokes.dataandapis.com/v1/jokes/{id}

Path parameters

ParameterExample
id1Required

Example request

curl "https://api-jokes.dataandapis.com/v1/jokes/1" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "id": 96,
  "type": "single",
  "category": "programming",
  "joke": "A byte walks into a bar looking miserable. The bartender asks what's wrong. 'Parity error.' 'Yeah, you look a bit off.'",
  "safe": true
}

GETList Categories

https://api-jokes.dataandapis.com/v1/jokes/categories

This endpoint takes no parameters.

Example request

curl "https://api-jokes.dataandapis.com/v1/jokes/categories" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "count": 12,
  "total_jokes": 252,
  "categories": [
    {
      "name": "animal",
      "jokes": 21
    },
    {
      "name": "dad",
      "jokes": 32
    },
    {
      "name": "food",
      "jokes": 20
    },
    {
      "name": "general",
      "jokes": 31
    },
    {
      "name": "music",
      "jokes": 12
    },
    {
      "name": "programming",
      "jokes": 38
…
Show full response
{
  "ok": true,
  "count": 12,
  "total_jokes": 252,
  "categories": [
    {
      "name": "animal",
      "jokes": 21
    },
    {
      "name": "dad",
      "jokes": 32
    },
    {
      "name": "food",
      "jokes": 20
    },
    {
      "name": "general",
      "jokes": 31
    },
    {
      "name": "music",
      "jokes": 12
    },
    {
      "name": "programming",
      "jokes": 38
    },
    {
      "name": "pun",
      "jokes": 31
    },
    {
      "name": "school",
      "jokes": 12
    },
    {
      "name": "science",
      "jokes": 16
    },
    {
      "name": "space",
      "jokes": 12
    },
    {
      "name": "sports",
      "jokes": 12
    },
    {
      "name": "work",
      "jokes": 15
    }
  ]
}

GETList Jokes

https://api-jokes.dataandapis.com/v1/jokes

Query parameters

ParameterExample
categoryprogrammingOptional
limit20Optional
page1Optional
searchcheeseOptional
typesingleOptional

Example request

curl "https://api-jokes.dataandapis.com/v1/jokes?category=programming&limit=20&page=1&search=cheese&type=single" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "total": 38,
  "page": 1,
  "limit": 2,
  "count": 2,
  "results": [
    {
      "id": 21,
      "type": "twopart",
      "category": "programming",
      "setup": "Why do programmers prefer dark mode?",
      "delivery": "Because light attracts bugs.",
      "safe": true
    },
    {
      "id": 22,
      "type": "single",
      "category": "programming",
      "joke": "There are 10 kinds of people: those who understand binary and those who don't.",
      "safe": true
    }
  ]
}

GETRandom Joke

https://api-jokes.dataandapis.com/v1/jokes/random

Query parameters

ParameterExample
amount1Optional
categorydadOptional
searchOptional
typetwopartOptional

Example request

curl "https://api-jokes.dataandapis.com/v1/jokes/random?amount=1&category=dad&type=twopart" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "count": 1,
  "results": [
    {
      "id": 241,
      "type": "twopart",
      "category": "space",
      "setup": "How do you organize a space party?",
      "delivery": "You planet.",
      "safe": true
    }
  ]
}

Where the data comes from

Source
Original joke set bundled in the worker.
Freshness
Extended with API releases.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
4endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-jokes.dataandapis.com/v1/jokes/{id}',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

Jokes API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Path Parameters

id
import axios from 'axios';

const url = 'https://api-jokes.dataandapis.com/v1/jokes/{id}';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about Jokes API

Ship Jokes API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.