ℹī¸/joke

This is complete documentation about how to get Jokes using Random Stuff API (This Endpoint is accessible using free plan as well as Paid plan)

Since this API is only accessible using RapidAPI, you need to change the base URL to https://random-stuff-api.p.rapidapi.com

This endpoint allows you to access thousands of jokes and get what you want!

GET https://api.pgamerx.com/joke

Query Parameters

NameTypeDescription

tag

String

This is used for filtering jokes according to your needs! (You can filter jokes on basis of tags and only get jokes which are tagged with the tag provided)

blacklist

String

This is used for filtering jokes according to your needs! (You can Blacklist certain tags from appearing like racist)

Headers

NameTypeDescription

Authorizaion*

String

x-rapidapi-key*

String

The API key you received from RapidApi

x-rapidapi-host*

String

It should always be:

"random-stuff-api.p.rapidapi.com"

{
"joke": "A woman marries a man expecting he will change, but he doesn't. A man marries a woman expecting that she won't change, and she does.",
"tags": ["marriage","men","women"]
}
var axios = require("axios").default;

var options = {
  method: 'GET',
  url: 'https://random-stuff-api.p.rapidapi.com/joke',
  params: {tag: 'women', blacklist: 'dirty,men'},
  headers: {
    authorization: 'Random Stuff API Key',
    'x-rapidapi-host': 'random-stuff-api.p.rapidapi.com',
    'x-rapidapi-key': 'RapidAPI Key'
  }
};

axios.request(options).then(function (response) {
	console.log(response.data);
}).catch(function (error) {
	console.error(error`);
});

/*
{
"joke": "Women should not have children after 35. Really ... 35 children are enough.",
"tags": ["kids","women"]
}
*/

For examples in all languages, checkout RapidAPI Page

Last updated