How to hit the icanhazdadjoke API

icanhazdadjoke picks its response format from the Accept header: application/json, text/plain, or an HTML page by default.

Authentication

None — no key, no signup. Every example runs as-is.

Full reference: https://icanhazdadjoke.com/api

Random dad joke

The Accept header is what gets you JSON.

curl https://icanhazdadjoke.com/ \
  -H "Accept: application/json"
Run in PostTaco
Example response (trimmed)
{
  "id": "71wsPKeF6h",
  "joke": "What did the dog say to the two trees? Bark bark.",
  "status": 200
}