Overview
icanhazdadjoke is a free API serving the internet's largest collection of dad jokes. It returns a random dad joke in JSON, plain text, or image format with no API key needed. It is a favorite beginner project API because the responses are simple, clean, and always entertaining.
Beginner Tip
Set the Accept header to application/json to get a JSON response. Without it, the API returns plain text. You can also search jokes by keyword using the /search endpoint.
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Example Response
Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded 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. joke The full text of the dad joke. status HTTP status code of the response, typically 200. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://icanhazdadjoke.com/";
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
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Metadata Score Breakdown
Estimated from metadata — endpoint not independently tested
Metadata estimate · endpoint not independently tested
Technical Specifications
Related Tags
Similar APIs
View All →Advice Slip
⭐ Beginner's PickAdvice Slip is a free, no-auth API that returns a random piece of advice with each request.
Dictum
⭐ Beginner's PickDictum is a free, no-auth API that serves a curated collection of inspiring quotes from famous thinkers, authors, and leaders throughout history.
FOAAS
FOAAS (F*** Off As A Service) is a humorous novelty API that returns comedic dismissal messages in various formats.
Forismatic
⭐ Beginner's PickForismatic is a free API that delivers short inspirational and motivational quotes from a curated collection.
kanye.rest
⭐ Beginner's Pickkanye.rest is a dead-simple free API that returns a random Kanye West quote with every request.