Random Facts Api
Pricing
from $0.01 / 1,000 results
Random Facts Api
Access thousands of random facts, trivia, and interesting information via a fast API. Perfect for content creation, chatbots, apps, and educational tools. Get unique, engaging data instantly to boost user engagement and build smarter applications.
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer
Akash Kumar Naik
Maintained by CommunityActor stats
0
Bookmarked
10
Total users
1
Monthly active users
17 days ago
Last modified
Categories
Features
Share
Random Facts API is an Apify Actor that delivers thousands of random facts, trivia questions, and interesting information for content creation, chatbots, quiz apps, and educational projects — with single-fact, batch, daily-fact, and database-stats modes behind one simple input.
What Is Random Facts API?
Random Facts API is a pay-per-event facts API on the Apify platform. It fetches random facts from a database of 1000+ verified facts covering science, history, nature, technology, and more. Get a single fact instantly, download a batch of up to 10 facts, retrieve the featured fact of the day, or check database size and version info through stats mode — all from the same Actor.
Key Features
- Random Facts — get one random fact instantly
- Bulk Data — download up to 10 facts at once for offline use
- Daily Fact — access the featured fact of the day
- API Stats — view database size and version info
- Verified database — 1000+ curated facts across science, history, nature, technology, and more
- Clean JSON output — fact text plus source URL and a ready-to-embed HTML version
- No platform costs — pay-per-event pricing means zero compute fees
Supported Modes
| Mode | What it returns |
|---|---|
random | One random fact from the database |
batch | Up to 10 facts in a single request |
today | The featured fact of the day |
stats | Database size and version info |
Use Cases
- Social media content — generate engaging posts and trivia threads
- Chatbot training — add interesting responses to AI assistants and bots
- Quiz & trivia apps — build question databases for games
- Educational platforms — create learning materials and fun-facts sections
- Data enrichment — enhance datasets with verified interesting facts
- Website widgets — add "Did You Know?" sections to blogs and sites
- Marketing campaigns — create curiosity-driven content
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mode | string | Yes | random | API mode: random, batch, today, or stats |
limit | integer | No | 1 | Number of facts to fetch in batch mode (1–10) |
Example input:
{"mode": "batch","limit": 10}
Sample Output
{"text": "Octopuses have three hearts and blue blood.","source": "www.example.com","url": "https://www.example.com/facts/octopuses","html": "<blockquote>Octopuses have three hearts and blue blood.<footer>Source: www.example.com</footer></blockquote>"}
| Field | Type | Description |
|---|---|---|
text | string | The fact text |
source | string | The source domain |
url | string | The source URL |
html | string | The fact pre-formatted as an HTML blockquote |
How to Use
- Open the Actor page on Apify Store and click Start Actor.
- Pick a mode —
randomfor a single fact,batchto pull up to 10 facts,todayfor the featured fact, orstatsfor database info. - Set
limit(1–10) when using batch mode. - Run the Actor and copy the fact from the Apify dataset, or export it as JSON, CSV, or Excel.
How to Use via API
cURL:
curl -X POST "https://api.apify.com/v2/acts/akash9078/random-facts-api/runs" \-H "Authorization: Bearer YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"mode": "random"}'
Python:
import requestsresponse = requests.post("https://api.apify.com/v2/acts/akash9078/random-facts-api/runs",headers={"Authorization": "Bearer YOUR_APIFY_TOKEN"},json={"mode": "random"},)print(response.json())
Node.js with Apify Client:
const { ApifyClient } = require('apify-client');const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('akash9078/random-facts-api').call({ mode: 'random' });const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Pricing
| Event | Price |
|---|---|
Fact Retrieved (fact-retrieved) | $0.005 per fact |
You only pay for facts you actually retrieve — there are no hourly compute costs or platform fees, and pricing stays predictable whether you fetch one fact or thousands.
Limitations
- Batch mode returns a maximum of 10 facts per request
- Rate limit: 5 requests per 30 seconds
- Runs on Apify infrastructure with 128 MB of memory (Node.js 20+)
FAQ
How many facts can I fetch at once?
Up to 10 per request in batch mode. For larger volumes, call the Actor repeatedly via the Apify API.
Which modes are available?
random (one fact), batch (up to 10), today (featured fact of the day), and stats (database size and version info).
What does the output contain?
Each fact includes the plain text, the source domain and URL, and an HTML blockquote version ready to embed.
How is pricing calculated?
$0.005 per fact retrieved under the pay-per-event model — no runtime or platform fees.
Related Actors
Check out my other Apify Actors:
- Website Screenshot Generator — capture PNG screenshots of any website
- Web Search Scraper — web search with structured, machine-readable results
- Keyword Suggestion Generator — expand seed keywords for SEO research
Built and maintained by akash9078 on the Apify platform.