Give your blog, community website or office dashboard one fresh reason to groan. The Dad Humor joke-of-the-day API returns a joke as JSON, including its setup, punchline and a link to share it. It is free to call and needs no account or API key.
Try the API · WordPress setup · Browse the jokes
Make your first request
Send a GET request to this endpoint. There are no required parameters or authentication headers.
curl https://www.dadhumor.app/api/v1/joke-of-the-day
Here is an example response. The joke and counts change over time.
{
"date": "2026-10-13",
"id": 58,
"setup": "What do you call a dinosaur that crashes their car?",
"punchline": "Tyrannosaurus wrecks.",
"category": "pun",
"slug": "what-do-you-call-a-dinosaur-that-crashes",
"url": "https://www.dadhumor.app/j/what-do-you-call-a-dinosaur-that-crashes",
"stats": { "props": 0, "groans": 0, "shares": 0, "views": 167 },
"attribution": "Dad Humor — dadhumor.app"
}
Use setup and punchline for the text and url for the original joke. A complete one-line joke may have an empty punchline. The stats fields are recorded actions, not counts of unique voters. The date is the UTC date when the response was generated; it is not a guarantee that every cache has refreshed at midnight.
Add it to a web page
This example fetches once when the page loads, renders text safely and leaves a useful fallback if the service is unavailable. Browser requests are supported through CORS; do not send credentials. Place the script after the section, or move it into your site's JavaScript file if your content security policy blocks inline scripts.
<section aria-label="Dad joke of the day">
<p id="dad-setup">A fresh groan is on its way.</p>
<p id="dad-punchline" hidden></p>
<a id="dad-credit" href="https://www.dadhumor.app">
More jokes at Dad Humor
</a>
</section>
<script>
async function showDadJoke() {
const setup = document.getElementById('dad-setup');
const punchline = document.getElementById('dad-punchline');
const credit = document.getElementById('dad-credit');
try {
const response = await fetch(
'https://www.dadhumor.app/api/v1/joke-of-the-day',
{ credentials: 'omit', signal: AbortSignal.timeout(5000) }
);
if (!response.ok) throw new Error('Joke unavailable');
const joke = await response.json();
if (typeof joke.setup !== 'string') {
throw new Error('Unexpected response');
}
setup.textContent = joke.setup;
punchline.textContent = typeof joke.punchline === 'string'
? joke.punchline : '';
punchline.hidden = !punchline.textContent;
const source = new URL(joke.url);
if (source.origin === 'https://www.dadhumor.app') {
credit.href = source.href;
}
} catch {
setup.textContent = 'The joke is taking a tea break. Try Dad Humor.';
punchline.hidden = true;
}
}
showDadJoke();
</script>
For a busy site, fetch on your server and cache the result for an hour. Keep the last successful joke if a refresh fails, then try again later. Avoid polling the API on a timer for every visitor.
WordPress
Download the Dad Humor WordPress plugin. The package contains the shortcode, classic widget and block, plus its source and readme. It requires WordPress 5.8 or later and PHP 7.4 or later; test it on your own staging site before rollout.
- In WordPress, open Plugins → Add New Plugin → Upload Plugin.
- Upload the ZIP, install it and activate Dad Humor – Daily Jokes.
- Add a Shortcode block to a post or page and enter
[dad_joke].
The default is a dark card with its category and credit link. For a light card without the category, use:
[dad_joke theme="light" show_category="false"]
You can also search for Dad Humor in the block inserter or add its classic widget. Settings → Dad Humor lets you clear the plugin's one-hour cache. Your site's page cache may need clearing too. The plugin fetches from your WordPress server, rather than making an API request from each visitor's browser.
Version 1.0.1 supports both setup-and-punchline jokes and complete one-line jokes. When there is no separate punchline, the card displays the joke without an empty answer row. Existing users can replace the plugin files with the updated download; shortcode and widget settings stay the same.
Updates, errors and attribution
The API is intended to serve a daily selection. Its shared cache lasts an hour and may serve an older response briefly while refreshing; your own cache can add further delay. It does not currently offer random-joke, search, category-filter or AI-generation parameters.
A successful response is HTTP 200. HTTP 404 means no daily joke was found; HTTP 500 means the service could not fetch it. Error responses contain an error message. Handle non-success responses without showing raw errors to visitors.
A link back to the joke is appreciated and helps people find more material. The WordPress plugin's credit link is optional through show_link="false". Pick material that suits your audience; the daily endpoint has no age-rating filter.
The API can record limited service analytics on cache misses, including a requesting site's origin or referrer, user agent, or a hashed network address when no site is supplied. It does not set cookies itself. See our privacy information and terms.
For a hand-picked set of jokes, try dad jokes for kids, one-liners or Christmas cracker jokes.