Skip to content

spinov001-art/dadjoke-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

dadjoke-python 😄

A tiny Python client for the icanhazdadjoke API. Get random dad jokes, search jokes, and build humor into your apps. No API key needed.

Quick Start

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)

Installation

pip install requests

API Reference

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

Use Cases

  • Slack/Discord bot that tells dad jokes
  • CLI tool for daily humor
  • Loading screen messages
  • 404 page content
  • Ice breaker generator

Related Projects

License

MIT


Need a Custom Tool Built?

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.

🔧 Browse 78+ ready-made tools on Apify →

About

Python client for icanhazdadjoke API — random dad jokes, search, no API key needed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages