# Numbers API

> 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

- Category: [Science & Math](https://www.openparable.com/apis/category/science-math)
- Provider: math.tools
- Authentication: API key
- HTTPS: Yes
- CORS: No
- Base URL: https://api.math.tools
- Documentation: https://math.tools/api/numbers/
- OpenAPI description: https://api.apis.guru/v2/specs/math.tools/1.5/openapi.json
- Version: 1.5
- Specification updated: 2021-06-21

## Example request

```bash
curl -X GET "https://api.math.tools/numbers/base" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Endpoints

- `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

- [NASA](https://www.openparable.com/apis/nasa): NASA data, including imagery
- [arXiv](https://www.openparable.com/apis/arxiv): Curated research-sharing platform: physics, mathematics, quantitative finance, and economics
- [NASA ADS](https://www.openparable.com/apis/nasa-ads): NASA Astrophysics Data System
- [USGS Earthquake Hazards Program](https://www.openparable.com/apis/usgs-earthquake-hazards-program): Earthquakes data real-time
- [CORE](https://www.openparable.com/apis/core): Access the world's Open Access research papers
- [USGS Water Services](https://www.openparable.com/apis/usgs-water-services): Water quality and level info for rivers and lakes
- [Semantic Scholar](https://www.openparable.com/apis/semantic-scholar): Academic search engine for papers, authors, and citations
- [Open Science Framework](https://www.openparable.com/apis/open-science-framework): Repository and archive for study designs, research materials, data, manuscripts, etc
- [iNaturalist](https://www.openparable.com/apis/inaturalist): Citizen-science wildlife observations with species identification and mapping
- [SHARE](https://www.openparable.com/apis/share): A free, open, dataset about research and scholarly activities
- [ISRO](https://www.openparable.com/apis/isro): ISRO Space Crafts Information
- [RCSB PDB](https://www.openparable.com/apis/rcsb-pdb): 3D structures of proteins and nucleic acids

Listed from: public-apis (MIT), public-apis database (MIT), APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/numbers (OpenParable). Cite the canonical URL above.
