Open documentation ↗Overview
Number of the day, random number, number facts and anything else you want to do with numbers
Numbers is a science & math API from math.tools. Requests are authenticated with an API key. It is served over HTTPS and does not allow direct browser requests (no CORS). Its OpenAPI description documents 26 endpoints.
At a glance
- Authentication
- API key
- HTTPS
- Yes
- CORS
- No
- Category
- Science & Math
- Base URL
https://api.math.tools- Version
- 1.5
- Endpoints
- 26
- OpenAPI
- Specification ↗
- Spec updated
- 2021-06-21
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://api.math.tools/numbers/base" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"const response = await fetch("https://api.math.tools/numbers/base", {
method: "GET",
headers: {
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://api.math.tools/numbers/base",
headers={
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /numbers/base | Convert a given number from one base to another base |
| GET | /numbers/base/binary | Convert a given number to binary |
| GET | /numbers/base/hex | Convert a given number to hexadecimal |
| GET | /numbers/base/octal | Convert a given number to octal |
| GET | /numbers/cardinal | Get the cardinal of the given number |
| GET | /numbers/currency | Spells out the number as a currency |
| GET | /numbers/fact | Get a random fact about a number |
| GET | /numbers/is-cube | Checks whether a given number is a cube number or not. |
| GET | /numbers/is-palindrome | Checks whether a given number is a palindrome number or not. |
| GET | /numbers/is-square | Checks whether a given number is a square number or not. |
| GET | /numbers/is-triangle | Checks whether a given number is a triangle number or not. |
| GET | /numbers/nod | Get the number of the day for current day |
| GET | /numbers/numeral/chinese | Convert base 10 representation of a given number to chinese numeral. |
| GET | /numbers/numeral/egyptian | Convert base 10 representation of a given number to egyptian numeral. |
| GET | /numbers/numeral/roman | Convert base 10 representation of a given number to roman numeral. |
| GET | /numbers/ordinal | Get the ordinal of the given number |
| GET | /numbers/pi | Get digits of pi (Ï€) |
| GET | /numbers/prime/factors | Get the prime factors of a given number. |
| GET | /numbers/prime/is-fermat-prime | Checks whether a given number is a known fermat prime number or not. |
| GET | /numbers/prime/is-fibonacci-prime | Checks whether a given number is a known fibonacci prime number or not. |
| GET | /numbers/prime/is-mersenne-prime | Checks whether a given number is a known mersenne prime number or not. |
| GET | /numbers/prime/is-partition-prime | Checks whether a given number is a known partition prime number or not. |
| GET | /numbers/prime/is-pell-prime | Checks whether a given number is a known pell prime number or not. |
| GET | /numbers/prime/is-perfect | Checks whether a given number is a perfect number or not. |
| GET | /numbers/prime/is-prime | Checks whether a given number is a known prime number or not. |
| GET | /numbers/random | Generate random number(s) |
Questions
Does the Numbers API need an API key?
Yes. The Numbers API uses API key authentication; the documentation explains how to get credentials.
Can I call the Numbers API from the browser?
Not directly. The Numbers API does not send CORS headers, so call it from your server or a proxy instead of browser JavaScript.
Does the Numbers API support HTTPS?
Yes, the Numbers API is served over HTTPS.
How many endpoints does the Numbers API have?
Its OpenAPI description lists 26 endpoints in version 1.5. All of them are shown on this page.
What are alternatives to the Numbers API?
Other Science & Math APIs include NASA, arXiv, NASA ADS, USGS Earthquake Hazards Program, CORE.
Similar science & math APIs
Compare alternatives →NASA
Science & MathNASA data, including imagery
arXiv
Science & MathCurated research-sharing platform: physics, mathematics, quantitative finance, and economics
NASA ADS
Science & MathNASA Astrophysics Data System
USGS Earthquake Hazards Program
Science & MathEarthquakes data real-time
CORE
Science & MathAccess the world's Open Access research papers
USGS Water Services
Science & MathWater quality and level info for rivers and lakes
Listed from public-apis (MIT), public-apis database (MIT), APIs.guru (CC0).