Jokes One API

Games & Comics / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Jokes One is a REST API offering a curated "Joke of the Day" and a large searchable collection of jokes organized by categories. You need a free API key from jokes.one to access the full catalog. It is a good choice for adding daily humor to newsletters, widgets, or chat bots.

💡

Beginner Tip

Use the /jod endpoint to get the Joke of the Day without any parameters, then explore the /categories endpoint to discover all available joke categories.

Available Data

joke text (setup/punchline)
joke category
joke type (single/twopart)

Example Response

JSON Response
{
  "error": false,
  "category": "Programming",
  "type": "twopart",
  "setup": "Why do programmers prefer dark mode?",
  "delivery": "Because light attracts bugs.",
  "id": 42,
  "lang": "en"
}

Field Reference

contents.jokes[].joke.title The title or headline of the joke.
contents.jokes[].joke.text The full joke body text.
contents.jokes[].joke.category Category label for this joke, such as jod or knock-knock.
contents.jokes[].joke.id Unique string identifier for the joke entry.
success.total Total number of jokes returned in this response.

Implementation Example

const url = "https://jokes.one/api/joke/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The X-JokesOne-Api-Secret header is missing or contains an invalid key.
Register at jokes.one to get a free API key and pass it in the X-JokesOne-Api-Secret header.
429 Too Many Requests Free plan is limited to a small number of requests per hour.
Cache the Joke of the Day response for 24 hours since it only changes once per day.
Empty contents array The requested category has no jokes matching your filter.
Fetch the /categories endpoint first to see valid category identifiers before filtering.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Games & Comics
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →