Facts API
A full featured Facts API. REST access with json/xml/jsonp result support. On this day birth and death support, random fact, keyword search support etc. Below…
AI & machine learning#openapi#text
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
A full featured Facts API. REST access with json/xml/jsonp result support. On this day birth and death support, random fact, keyword search support etc. Below is the documentation for the Random Facts API calls. You can try them out right here. Click here to subscribe
Endpoints 12
Fact of the day
- GETGET /fact/fod
/fact/fod?category=stringGet fact of the day for the given category. - GETGET /fact/fod/categories
/fact/fod/categoriesGet the list of supported fact of the day categories.
Number Facts
- GETGET /fact/numbers
/fact/numbers?number=0Get a random fact about a number
Random Facts
- GETGET /fact
/fact?id=stringGet a Fact belonging to the id. - GETGET /fact/categories
/fact/categories?start=0Get a random Fact. - GETGET /fact/random
/fact/random?category=string&subcategory=stringGet a random Fact for a given category(optional) and subcategory(optional). - GETGET /fact/search
/fact/search?query=string&category=string&subcategory=stringSearch for random Fact which has the text in the query, for a given category(optional) and subcategory(optional).
On this day
- GETGET /fact/onthisday/born
/fact/onthisday/born?month=string&day=stringReturns a random ( famous/ relatively famous ) person born on a given day and month - GETGET /fact/onthisday/died
/fact/onthisday/died?month=string&day=stringReturns a random ( famous/ relatively famous ) person died on a given day and month - GETGET /fact/onthisday/event
/fact/onthisday/event?month=string&day=stringReturns a random ( famous/ relatively famous ) historic event on a given day and month
Private Facts
- PUTPUT /fact
/fact?fact=string&category=string&subcategory=string&tags=stringAdd a Fact entry to the database (private collection). - DELETEDELETE /fact
/fact?id=stringDelete a Fact entry identified by the id.
API details
- Base URL
https://api.fungenerators.com- Authentication
- An API key in the X-Fungenerators-Api-Secret header
- Operations
- 12 operations on 10 pathsGET 10PUT 1DELETE 1
- Main resources
- Random Facts 4On this day 3Private Facts 3Fact of the day 2Number Facts 1
- Response formats
application/json- Description format
- OpenAPI 3.0.0, API version
1.5 - Links
- OpenAPI document · Terms of service · Support
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Facts API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Facts API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the X-Fungenerators-Api-Secret header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “GET /fact/fod” (GET /fact/fod?category=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Facts API?
A full featured Facts API. REST access with json/xml/jsonp result support. On this day birth and death support, random fact, keyword search support etc. Below… It is listed under AI & machine learning and has 12 endpoints.
Who publishes the Facts API?
It is listed from FunGenerators.com's public API description (an OpenAPI document), not published by FunGenerators.com on Swastik Codes. Anyone who controls fungenerators.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Facts API?
Requests go to https://api.fungenerators.com. Endpoint paths are added to this base URL.
How do I authenticate with the Facts API?
With an API key in the X-Fungenerators-Api-Secret header.
How many endpoints does the Facts API have?
12 operations on 10 paths (10 GET, 1 PUT, 1 DELETE). The largest groups are Random Facts, On this day, Private Facts, Fact of the day.
Is forking the Facts API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.