Skip to content

Repository files navigation

Peter API

Free API for Jokes, Facts, Questions and more coming soon!

API URL

API Reference

Get Version

Returns the Version and Last Update Date of the API

GET /api/version

Get Quote

GET /api/quote
EndpointTypeDescription
quotestringReturns a Quote from the API.

Get Roast

GET /api/roast/<username>
EndpointTypeDescription
roast/<username>stringReturns a Joke from the API.

Required Parameters: username

Get Joke

GET /api/joke
EndpointTypeDescription
jokestringReturns a Joke from the API.

Get Darkjoke

GET /api/darkjoke
EndpointTypeDescription
darkjokestringReturns a Dark-Joke from the API.

Get Fact

GET /api/fact
EndpointTypeDescription
factstringReturns a Fact from the API.

Get Question

GET /api/question
EndpointTypeDescription
questionstringReturns a Question from the API.

Usage/Examples

importrequestsurl=requests.get("https://peter-api.up.railway.app/api/darkjoke")
result=url.json()
buildup=result['buildup']
punchline=result['punchline']
joke=buildup+"? "+punchlineprint(joke)

Output:

Why did the blind man fall into the well? Because he couldn't see that well.

License

MIT

About

Free Dark Jokes, Dad Jokes, Facts, Roasts, and Questions API!

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages