Welcome to the Joke API! This API provides a collection of jokes in JSON format. You can access the jokes through various endpoints, which are described below. These are just not meant to hurt anyone's emotion!!
Just the root page nothing special just the app intro.
Response:
{
"message": "Welcome to the Dark Jokes API. This api is created by none other than me. Visit our Github page for more Documentation: https://github.com/your-username/joke-api"
}
This endpoint returns a random selection of jokes. The 'limit' parameter specifies the maximum number of jokes to return. Maximum limit is 20.
Example Request:
GET /random?limit=3
Example Response:
[
{
"id": 26,
"joke": " What's the difference between baby's and onions? I cry when cutting onions!"
},
{
"id": 119,
"joke": "How much time does it takes to fill a hole on the road? Decades Lol"
},
{
"id": 129,
"joke": "Any joke can be funny when delivered right. Except abortion jokes, cause there's no delivery. "
}
]
This endpoint returns a joke by its ID. If the ID is less than or equal to 0, an error message is returned. If the joke with the specified ID does not exist, an error message is returned.
Example Request:
GET /joke-by-id?id=5
Example Response:
{
"joke": "Karate for amputees is called partial arts",
"id": 5,
"from": "reddit",
"type": "dark"
}
This endpoint searches for jokes containing the specified query. If no jokes are found matching the query, an error message is returned.
Example Request:
GET /search?query=black
Example Response:
[
{
"id": 10,
"joke": "Why do black people have white palms and white bottoms of there feet? Because there's a little good in everyone."
},
{
"id": 11,
"joke": "Why do black men cry after sex? The pepper spray."
},
{
"id": 29,
"joke": "Sir, this is a gloryhole. We're going black then."
},
{
"id": 48,
"joke": "Why is there only two handles on a black persons casket? Have you ever seen a trash can with more than two handles?"
},
{
"id": 101,
"joke": "What's the difference between a black man and a tractor tyre? The tyre doesn't sing when you put chains on it."
}
]
We welcome contributions to the Dark Joke API! Majorly If have any dark jokes available submit it. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.