Knowledge & Fun

Facts API

Provides instant access to a vast collection of interesting facts across various categories, perfect for trivia and educational applications.

Request Headers

Name Required Description
X-RapidAPI-Key required Your RapidAPI key. Get one free.
X-RapidAPI-Host required facts.p.rapidapi.com

Endpoints

GET /v1/facts

Get random facts, optionally filtered by category

Parameters

NameTypeRequiredDefaultConstraints
categorystringoptional——
limitintegeroptional11-10

Code Examples

curl --request GET \
  --url 'https://facts.p.rapidapi.com/v1/facts?category=example&limit=1' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: facts.p.rapidapi.com'
GET /v1/facts/categories

List all fact categories available in the dataset, sorted alphabetically.

Code Examples

curl --request GET \
  --url 'https://facts.p.rapidapi.com/v1/facts/categories' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: facts.p.rapidapi.com'

Interactive Example

facts
$ GET /v1/facts?category=science&limit=1
{"data":[{"fact":"Honey never spoils when stored in a sealed container.","category":"science"}],"meta":{"total":1,"limit":1,"offset":0}}

Integration & Usage Guide

Discover endless knowledge with our comprehensive Facts API!

Overview

Our Facts API provides instant access to a vast collection of interesting facts across various categories. Whether you’re a trivia buff, a curious learner, or a developer creating engaging content, our API offers unparalleled insights into a wide range of topics.

Key Features

  • Multi-Categorical Coverage: Access facts from numerous categories
  • Random Fact Retrieval: Get instant inspiration with random fact generation
  • Structured Data: Easy-to-use JSON responses for seamless integration
  • Customizable Insights: Tailor your data to meet specific research or analytical needs
  • Scalable Solutions: Handle large volumes of requests efficiently
  • Easy Integration: Simple RESTful API design for seamless incorporation into your projects

API Usage

Our API is designed for simplicity and ease of integration:

# Example API Requests

GET /v1/facts/categories
GET /v1/facts/categories/{category}/random
GET /v1/facts/random

# Response Structure

Categories Endpoint:
[
  "Animals",
  "History",
  "Science",
  "Technology",
  "Sports",
  // ... more categories
]

Random Fact Endpoint:
{
  "text": "The shortest war in history was between Britain and Zanzibar on August 27, 1896, and lasted only 38 minutes.",
  "category": "History"
}

Random Fact Endpoint:
{
  "text": "The longest word in the English language, according to the Oxford English Dictionary, is pneumonoultramicroscopicsilicovolcanoconiosis, a lung disease caused by inhaling very fine particles of silica.",
  "category": "Health and Fitness"
}

Why Choose Our API?

  • Comprehensive Fact Database: Access a wide range of interesting facts across various topics
  • Flexible Retrieval Options: Get facts by category, random selection, or mixed results
  • Real-time Updates: Stay current with new facts and evolving knowledge
  • Scalable Solutions: Handle large volumes of requests efficiently
  • Educational Focus: Ideal for educational apps, trivia games, and personal learning tools

Subscribe & License

Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.

View Pricing & Subscribe

Developer Support

Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.

Contact API Engineering

System Performance

Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.

All Systems Operational