A tiny Python client for the icanhazdadjoke API. Get random dad jokes, search jokes, and build humor into your apps. No API key needed.
from dadjoke import DadJokeClient
client = DadJokeClient()
# Random joke
joke = client.random()
print(joke) # "I'm reading a book about anti-gravity. It's impossible to put down!"
# Search jokes
results = client.search("cat")
for j in results:
print(j)
# Get specific joke by ID
joke = client.get("R7UfaahVfFd")
print(joke)pip install requests| Method | Description |
|---|---|
random() |
Get a random dad joke |
search(term, page=1, limit=20) |
Search jokes by keyword |
get(joke_id) |
Get specific joke by ID |
- Slack/Discord bot that tells dad jokes
- CLI tool for daily humor
- Loading screen messages
- 404 page content
- Ice breaker generator
- iss-tracker-python — ISS tracking
- earthquake-python — Seismic data
- awesome-no-auth-apis — 50+ free APIs
MIT
I build production-ready scrapers, APIs, and data tools — 78+ deployed on Apify, 270+ open-source repos.
📧 spinov001@gmail.com — $250 flat rate, 48h delivery. Describe your project, get a free estimate in 2 hours.