Random Joke -
Authentication:
An API Key is required and is provide by RapidAPI
API response format:
All API endpoints follow their respective browser URLs, but we adjust the response formatting to be more suited for an API based on the provided HTTP Accept
header.
Accepted Accept
headers:
text/html
- HTML response (default response format)application/json
- JSON responsetext/plain
- Plain text response
Note: Requests made via curl
which do not set an Accept
header will respond with text/plain
by default.
Endpoint:
GET https://dad-jokes.p.rapidapi.com/random/joke
Fetching a random as joke as JSON:
"success": true,
"body": [
{
"_id": "5f80ccd641785ba7c7d27c18",
"type": "general",
"setup": "What do you call a fashionable lawn statue with an excellent sense of rhythmn?",
"punchline": "A metro-gnome"
}
]
GET https://dad-jokes.p.rapidapi.com/random/joke?count=2
Fetching a random as joke with a param of count
Note: Count limit is 5
"success": true,
"body": [
{
"_id": "5f80ccd641785ba7c7d27b6c",
"type": "programming",
"setup": "Why do Java programmers wear glasses?",
"punchline": "Because they don't C#"
},
{
"_id": "5f80ccd641785ba7c7d27b58",
"type": "programming",
"setup": "What's the best thing about a Boolean?",
"punchline": "Even if you're wrong, you're only off by a bit."
}
]