Trivia - Knowledge - Facts

FREEMIUM
By webknox
Updated 4 months ago
2/10
Popularity Score
355ms
Latency
100%
Success Rate

Trivia - Knowledge - Facts API Documentation

This API provides you with a large amount of interesting random facts and trivia. Get random trivia or search facts by a specific keyword.

View API Details
GETSearch
GETRandom
GETSearch

Search facts / trivia about a certain topic

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
topicSTRING
REQUIREDA topic that must be mentioned in the facts.
Code Snippet
unirest.get("https://webknox-trivia-knowledge-facts-v1.p.rapidapi.com/trivia/search?topic=dog")
.header("X-RapidAPI-Host", "webknox-trivia-knowledge-facts-v1.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-trivia-knowledge-facts-v1.p.rapidapi.com/trivia/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-trivia-knowledge-facts-v1.p.rapidapi.com/trivia/search?topic=dog")
.header("X-RapidAPI-Host", "webknox-trivia-knowledge-facts-v1.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