Find dad jokes

When the user asks for a joke, wants a dad joke about a specific topic, or needs to look up a joke by its ID — reach for icanhazdadjoke. No auth, just set Accept: application/json.

find-dad-jokes · v1 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/find-dad-jokes. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/find-dad-jokes/SKILL.md.

When to use this skill

When the user asks for a joke, wants a dad joke about a specific topic, or needs to look up a joke by its ID. icanhazdadjoke is a curated corpus of 744 family-safe pun-style jokes — no auth, no key, one required header. For other joke genres (dark humor, programming jokes, one-liners), this is the wrong skill.

Your best first call

curl -H "Accept: application/json" "https://icanhazdadjoke.com/search?term=cat&limit=5"

No auth. No key. You must set the Accept: application/json header — without it the API returns plain text with no structured fields. The term parameter does case-insensitive substring matching ("cat" matches "cats", "category", "scattered"), and limit caps results per page.

The response shape:

If the user just wants any joke with no topic, use the random endpoint instead: curl -H "Accept: application/json" "https://icanhazdadjoke.com/" returns one {id, joke, status} object.

Fallbacks (when the best call isn't enough)

Pitfalls

One-line summary for the user

I can find dad jokes by keyword, pull a random one, or look one up by ID from icanhazdadjoke.com — no auth needed, just set the Accept header to JSON.

APIs this skill uses

icanhazdadjoke · primary · verified

The largest selection of dad jokes on the internet. Fetch a random joke, a specific joke by ID, or search for jokes. No authentication required.

Generated from

icanhazdadjoke tutorial Getting Started with icanhazdadjoke

SKILL.md source (frontmatter + body)
---
name: find-dad-jokes
description: When the user asks for a joke, wants a dad joke about a specific topic, or needs to look up a joke by its ID — reach for icanhazdadjoke. No auth, just set Accept: application/json.
---

## When to use this skill

When the user asks for a joke, wants a dad joke about a specific topic, or needs to look up a joke by its ID. icanhazdadjoke is a curated corpus of 744 family-safe pun-style jokes — no auth, no key, one required header. For other joke genres (dark humor, programming jokes, one-liners), this is the wrong skill.

## Your best first call

```bash
curl -H "Accept: application/json" "https://icanhazdadjoke.com/search?term=cat&limit=5"
```

No auth. No key. You must set the `Accept: application/json` header — without it the API returns plain text with no structured fields. The `term` parameter does case-insensitive substring matching ("cat" matches "cats", "category", "scattered"), and `limit` caps results per page.

The response shape:

- `results` — array of `{id, joke}` objects; `id` is a stable alphanumeric string for reuse with `/j/{id}`
- `total_jokes` — total match count across all pages
- `total_pages` — page count at the current `limit`
- `current_page`, `next_page`, `previous_page` — 1-indexed pagination

If the user just wants any joke with no topic, use the random endpoint instead: `curl -H "Accept: application/json" "https://icanhazdadjoke.com/"` returns one `{id, joke, status}` object.

## Fallbacks (when the best call isn't enough)

- **User references a specific joke by ID or permalink** → `curl -H "Accept: application/json" "https://icanhazdadjoke.com/j/{id}"` returns that exact joke; 404 with `{ "status": 404, "message": "Joke not found" }` on invalid IDs.
- **User just wants any joke, no topic** → The root endpoint (`/`) returns a random `{id, joke, status}` object — same shape as lookup, no parameters needed.

## Pitfalls

- **Omit the `Accept: application/json` header and you get plain text.** The API defaults to `text/plain` — a raw joke string with no ID, no JSON structure. Always set this header.
- **Empty or missing `term` on `/search` returns all 744 jokes paginated.** Always include a `term` value unless you genuinely want the entire corpus.
- **`previous_page` is `1`, not `null`, on page 1.** Pages are 1-indexed and the API never nulls the previous-page pointer. Test `current_page > 1` instead of checking `previous_page` for nullity.

## One-line summary for the user

I can find dad jokes by keyword, pull a random one, or look one up by ID from icanhazdadjoke.com — no auth needed, just set the Accept header to JSON.

« Back to all skills