By passing in the appropriate options, you can search for available jokes
Query parameters
-
pass an optional search string for looking up inventory
-
number of jokes to return
Minimum value is
1. Default value is25. -
category of jokes to return
Values are
Word game,Classic,School, orKnockKnock. -
Values are
thumbsUp,thumbsDown, ordateAdded. -
asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.
Values are
ascordesc.
GET
/joke
curl \
-X GET https://joke_api.example.com/joke
Response examples (200)
Well done, son
[
{
"id": 42,
"joke": "Teacher: Did your father help you with your homework?",
"punchline": "Student: No, he did it all by himself.",
"category": "School",
"dateAdded": "2015-07-12T20:12:33.001Z",
"thumbsUp": 6,
"thumbsDown": 2
}
]
[
{
"id": 42,
"joke": "What is the name to open the door?",
"punchline": "Open your chakra",
"category": "Classic",
"dateAdded": "1998-07-12T20:12:33.001Z",
"thumbsUp": 4,
"thumbsDown": 2
}
]
Response examples (200)
[
{
"id": "string",
"joke": "string",
"punchline": "string",
"category": "Word game",
"thumbsUp": 42,
"thumbsDown": 42,
"dateAdded": "2025-05-04T09:42:00Z"
}
]