RapidAPI logo

Jokes

FREEMIUM
By webknox
Updated a month ago
Entertainment
7.7/10
Popularity Score
245ms
Latency
100%
Success Rate

Jokes API Documentation

The WebKnox Jokes API allows you to access over 30,000 jokes, from Knock Knock puns to Chuck Norris jokes you will find a lot to laugh about.

View API Details
Search
GETFind Jokes
Random
GETGet a Random Joke
GETGet a random one liner.
Talk
GETPraise somebody
GETInsult somebody
GETFind Jokes

Find jokes with given search criteria.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
numJokesNUMBER
REQUIREDThe number of jokes, between 0 and 10.
keywordsSTRING
REQUIREDA comma-separated list of keywords that must occur in the joke.
Optional Parameters
categorySTRING
OPTIONALThe category of the joke.
minRatingNUMBER
OPTIONALThe minimum rating of the joke between 0 and 10.
Code Snippet
unirest.get("https://webknox-jokes.p.rapidapi.com/jokes/search?category=Chuck+Norris&minRating=5&numJokes=5&keywords=kick%2C+hard")
.header("X-RapidAPI-Host", "webknox-jokes.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://webknox-jokes.p.rapidapi.com/jokes/search
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://webknox-jokes.p.rapidapi.com/jokes/search?category=Chuck+Norris&minRating=5&numJokes=5&keywords=kick%2C+hard")
.header("X-RapidAPI-Host", "webknox-jokes.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication