Humor API

⭐ Beginner's Pick Games & Comics / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Humor API provides jokes, memes, and humorous content across dozens of categories, making it easy to add comedy to apps, bots, and games. You need a free API key from humorapi.com to make requests. It supports filtering by type, category, and content safety flags like minRating.

💡

Beginner Tip

Use the minRating parameter (0-10) to filter out low-quality jokes, and set the include-tags or exclude-tags parameters to keep content appropriate for your audience.

Available Data

joke text (setup/punchline)
joke category
joke type (single/twopart)
Use case: Integrate humor, jokes, and memes data into web and mobile applications

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

id Unique numeric identifier for the joke.
joke The full joke text; for two-part jokes this includes both setup and punchline.
rating Community rating from 0 to 10 indicating joke quality.
type Format of the joke, such as single or twopart.
setup The setup part of a two-part joke (present when type is twopart).
punchline The punchline of a two-part joke (present when type is twopart).

Implementation Example

const url = "https://humorapi.com/";
// 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 api-key query parameter is missing or invalid.
Append ?api-key=YOUR_API_KEY to every request URL.
No results found Your filter combination (tags, type, minRating) is too restrictive.
Relax filters — for example, lower minRating or remove specific include-tags.
429 Too Many Requests You have hit the daily or per-minute request quota.
Cache joke responses locally and implement rate limiting in your code to stay within quota.

Matrix Score Breakdown

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

Partially tested on Apr 5, 2026

Technical Specifications

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

Similar APIs

View All →