chucknorris.io API

⭐ Beginner's Pick Entertainment / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

chucknorris.io is a free JSON API serving a curated database of Chuck Norris jokes, with endpoints for fetching random jokes, filtering by category, and searching joke text. All requests are unauthenticated, responses are immediate, and the API supports CORS for direct browser use. It is a classic beginner-friendly API used in tutorials for its simplicity and humor.

💡

Beginner Tip

chucknorris.io is perfect for a first API project — no sign-up, no API key, and you can test every endpoint directly in your browser. Start with https://api.chucknorris.io/jokes/random to see a joke immediately, then explore categories with /jokes/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

id Unique identifier for the joke, usable to construct a direct permalink URL
value The full text of the Chuck Norris joke
url Canonical permalink URL for this specific joke on chucknorris.io
categories List of category labels assigned to this joke (e.g., ["science", "money"]); empty array if uncategorized
created_at Date when this joke was added to the database
icon_url URL to the Chuck Norris avatar image associated with this joke

Implementation Example

const url = "https://api.chucknorris.io/";
const response = await fetch(url);
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

404 on /jokes/random?category=invalid Category names are case-sensitive and must exactly match a value returned by /jokes/categories
Fetch the categories list first and use only values from that response; do not hardcode category names
Search returns empty results array The /jokes/search?query= endpoint requires at least 3 characters and is case-insensitive but exact-word-match
Use shorter, common words for search queries (e.g., "time" or "world") rather than full phrases
Inconsistent joke content when filtering by category Some categories have only a small number of jokes, so results repeat quickly with repeated random calls
For demo purposes, use the default random endpoint without a category filter to maximize variety

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 1056ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Entertainment
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →