ℹī¸/facts

This is complete documentation about how to get Facts using Random Stuff API (This Endpoint is accessible using Paid plan only)

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 get facts

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

Path Parameters

NameTypeDescription

tye*

String

What type of fact do you want to know?

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"

{
"fact":"Dogs can sniff at the same time as breathing"
}

Facts Available

  • all

  • emoji

  • dog

  • cat

  • food

  • space

  • covid

  • computer

var axios = require("axios").default;

var options = {
  method: 'GET',
  url: 'https://random-stuff-api.p.rapidapi.com/facts/dog',
  headers: {
    authorization: 'Random Stuff API',
    '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);
});

For examples in all languages, checkout RapidAPI Page

Last updated