Chuck Norris

FREE
By matchilling
Updated 5 months ago
Social
9.4/10
Popularity Score
326ms
Latency
98%
Success Rate

Chuck Norris API Documentation

chucknorris.io is a free JSON API for hand curated Chuck Norris facts.

View API Details
Jokes
GET/jokes/random
GET/jokes/categories
GET/jokes/search
GET/jokes/random

Retrieve a random chuck joke in JSON format.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
acceptSTRING
REQUIRED
Optional Parameters
categorySTRING
OPTIONALSpecifies the category of the random joke.
Code Snippet
unirest.get("https://matchilling-chuck-norris-jokes-v1.p.rapidapi.com/jokes/random")
.header("X-RapidAPI-Host", "matchilling-chuck-norris-jokes-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("accept", "application/json")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://matchilling-chuck-norris-jokes-v1.p.rapidapi.com/jokes/random
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://matchilling-chuck-norris-jokes-v1.p.rapidapi.com/jokes/random")
.header("X-RapidAPI-Host", "matchilling-chuck-norris-jokes-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("accept", "application/json")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication