Numbers

Numbers

Number of the day, random number generation , number facts and anything else you want to do with numbers.

API End Points

The end point for connecting : If you subscribe directly from us use this endpoint.
		https://api.math.tools
		

Ratelimiting

Some of our API calls are public. To maintain our service level we ratelimit the number of API calls. For public API calls this is 60 API calls a day with distribution of 5 calls an hour. For paid plans this limit is increased according to the service level described in the plan.

Authentication

For public calls you don't need to pass any API key. Just invoke the endpoint (see examples below). For paid subscriptions you need to pass the API key.

Currently we support API Key based authentication. Please set a request header 'X-MathTools-Api-Secret' with value of your API key. Alternatively you can also pass api_key= as a request parameter, though we strongly discourage this mode of passing the key.

API Documentation

API Details

Number of the day free ratelimited

To get the Number of the day use the following endpoint.

  GET /numbers/nod

The above call will return a result like this

{
  "success": {
    "total": 1
  },
  "copyright": {
    "copyright": "2019-21 https://math.tools"
  },
  "contents": {
    "nod": {
      "category": {
        "name": "nod",
        "description": "Number of the day.",
        "background": ""
      },
      "numbers": {
        "number": "88170",
        "uuid": "88170",
        "id": "88170",
        "names": {
          "nominal": {
            "name": "nominal",
            "description": "Nominal",
            "value": "88170",
            "display": "88170"
          },
          "cardinal": {
            "name": "cardinal",
            "description": "Cardinal",
            "value": "eighty-eight thousand one hundred seventy",
            "display": "eighty-eight thousand one hundred seventy"
          },
          "ordinal": {
            "name": "ordinal",
            "description": "Ordinal",
            "value": "88,170th",
            "display": "88,170th"
          },
          "us_currency": {
            "name": "us_currency",
            "description": "This number as US currency",
            "value": "eighty-eight thousand one hundred seventy dollars",
            "display": "eighty-eight thousand one hundred seventy dollars"
          }
        },
        "bases": {
          "binary": {
            "name": "binary",
            "description": "Base 2 (Binary)",
            "value": "10101100001101010",
            "display": "101011000011010102"
          },
          "ternary": {
            "name": "ternary",
            "description": "Base 3 (Ternary)",
            "value": "11110221120",
            "display": "111102211203"
          },
          "quaternary": {
            "name": "quaternary",
            "description": "Base 4 (Quaternary)",
            "value": "111201222",
            "display": "1112012224"
          },
          "quinary": {
            "name": "quinary",
            "description": "Base 5 (Quinary)",
            "value": "10310140",
            "display": "103101405"
          },
          "senary": {
            "name": "senary",
            "description": "Base 6 (Senary)",
            "value": "1520110",
            "display": "15201106"
          },
          "octal": {
            "name": "octal",
            "description": "Base 8 (Octal)",
            "value": "254152",
            "display": "2541528"
          },
          "duodecimal": {
            "name": "duodecimal",
            "description": "Base 12 (Duodecimal)",
            "value": "43036",
            "display": "4303612"
          },
          "hexadecimal": {
            "name": "vexadecimal",
            "description": "Base 16 (Hexadecimal)",
            "value": "1586A",
            "display": "1586A16"
          },
          "vigesimal": {
            "name": "vigesimal",
            "description": "Base 20 (Vigesimal)",
            "value": "B08A",
            "display": "B08A20"
          }
        },
        "numerals": {
          "roman": {
            "name": "roman",
            "description": "88170 in Roman Numeral",
            "value": "LXXXVMMMCLXX",
            "display": "LXXXVMMMCLXX"
          },
          "chinese": {
            "name": "chinese",
            "description": "88170 in Chinese Numeral",
            "value": "捌萬捌仟壹佰柒拾",
            "display": "捌萬捌仟壹佰柒拾"
          },
          "egyptian": {
            "name": "egyptian",
            "description": "88170 in Egyptian Numeral",
            "value": "𓂴𓇃𓍢𓎌",
            "display": "𓂴𓇃𓍢𓎌"
          },
          "babylonian": {
            "name": "babylonian",
            "description": "88170 in Babylonian Numeral",
            "value": "\"24\"   \"29\"   \"30\"   ",
            "display": "\"24\"   \"29\"   \"30\"   "
          }
        },
        "general-facts": {
          "odd": {
            "name": "odd",
            "description": "Is 88170 an odd number?",
            "value": false,
            "display": "88170 is NOT an odd number"
          },
          "even": {
            "name": "even",
            "description": "Is 88170 an even number?",
            "value": true,
            "display": "88170 is  an even number"
          },
          "palindrome": {
            "name": "palindrome",
            "description": "Is 88170 a palindrome?",
            "value": false,
            "display": "88170 is  NOT a palindrome number"
          },
          "triangle": {
            "name": "triangle",
            "description": "Is 88170 a triangle number?",
            "value": false,
            "display": "88170 is  NOT a triangle number"
          }
        },
        "prime-facts": {
          "prime": {
            "name": "prime",
            "description": "Is 88170 a Prime Number?",
            "value": false,
            "display": "88170 is NOT a  prime"
          },
          "perfect": {
            "name": "perfect",
            "description": "Is 88170 a perfect number?",
            "value": false,
            "display": "88170 is NOT a perfect number"
          },
          "mersenne": {
            "name": "mersenne",
            "description": "Is 88170 a Mersenne Prime?",
            "value": false,
            "display": "88170 is NOT a Mersenne prime"
          },
          "fermat": {
            "name": "fermat",
            "description": "Is 88170 a Fermat Prime?",
            "value": false,
            "display": "88170 is NOT a Fermat prime"
          },
          "fibonacci": {
            "name": "fibonacci",
            "description": "Is 88170 a Fibonacci Prime?",
            "value": false,
            "display": "88170 is NOT a Fibonacci prime"
          },
          "partition": {
            "name": "partition",
            "description": "Is 88170 a Partition Prime?",
            "value": false,
            "display": "88170 is NOT a Partition prime"
          },
          "pell": {
            "name": "pell",
            "description": "Is 88170 a Pell Prime?",
            "value": false,
            "display": "88170 is NOT a Pell prime"
          }
        },
        "recreational": {
          "reverse": {
            "name": "reverse",
            "description": "Number 88170 reversed",
            "value": "07188",
            "display": "07188"
          },
          "digitssum": {
            "name": "digitssum",
            "description": "Sum of the digits",
            "value": 24,
            "display": 24
          },
          "noofdigits": {
            "name": "noofdigits",
            "description": "No of digits",
            "value": 5,
            "display": 5
          }
        },
        "category": "nod"
      }
    }
  }
}

Number Fact subscription only ratelimited

To get number fact use the following endpoint.

  GET /numbers/fact

The above call will return a result like this

{
  "success": {
    "total": 1
  },
  "copyright": {
    "copyright": "2019-21 https://math.tools"
  },
  "contents": {
    "number": 11,
    "fact": "11 is the largest known multiplicative persistence."
  }
}

Getting the ordinal of a numbersubscription only ratelimited

To get the ordinal of a number use the following endpoint.

  GET /numbers/ordinal

The above call will return a result like this

    {
      "success": {
	"total": 1
      },
      "copyright": {
	"copyright": "2019-21 https://math.tools"
      },
      "contents": {
	"number": 2342,
	"result": "2342nd",
	"ordinal": "2342nd"
      }
    }

Getting the cardinal of a numbersubscription only ratelimited

To get the cardinal of a number use the following endpoint.

  GET /numbers/cardinal

The above call will return a result like this

    {
      "success": {
	"total": 1
      },
      "copyright": {
	"copyright": "2019-21 https://math.tools"
      },
      "contents": {
	"number": 2342,
	"language": "en_US",
	"result": "two thousand three hundred forty-two",
	"cardinal": "two thousand three hundred forty-two"
      }
    }

Spell out a number as a currencysubscription only ratelimited

If you have a number and want to spell it out as a currency use this endpoint. Multiple languages/countries are supported.

  GET /numbers/currency

The above call will return a result like this

    {
      "success": {
	"total": 1
      },
      "copyright": {
	"copyright": "2019-21 https://math.tools"
      },
      "contents": {
	"number": 1345456654,
	"language": "en_US",
	"result": "one billion three hundred forty-five million four hundred fifty-six thousand six hundred fifty-four dollars",
	"currency": "one billion three hundred forty-five million four hundred fifty-six thousand six hundred fifty-four dollars"
      }
    }

Converting to another number systemssubscription only ratelimited

Converting to Egyptian

  GET /numbers/numeral/egyptian
    {
      "success": {
	"total": 1
      },
      "copyright": {
	"copyright": "2019-21 https://math.tools"
      },
      "contents": {
	"number": 4568367,
	"system": "egyptian",
	"result": "π“¨π“¨π“¨π“¨π“†π“†π“†π“†π“†π“‚²π“‡ƒπ“€π“Ž‹π“€"
      }
    }

Converting to Chinese

  GET /numbers/numeral/chinese
    {
      "success": {
	"total": 1
      },
      "copyright": {
	"copyright": "2019-21 https://math.tools"
      },
      "contents": {
	"number": 4568367,
	"system": "chinese",
	"result": "δΌζ‹Ύθ¬ι™Έθ¬ζŒδ»Ÿε„δ½°ι™Έζ‹ΎζŸ’"
      }
    }

Converting to Roman

  GET /numbers/numeral/roman
    {
      "success": {
	"total": 1
      },
      "copyright": {
	"copyright": "2019-21 https://math.tools"
      },
      "contents": {
	"number": 4568367,
	"system": "roman",
	"result": "DLXVMMMCCCLXVII"
      }
    }

Digits of PI(Ο€) free ratelimited

To get the digits of pi(Ο€) use the following request.

  GET /numbers/pi

The above call returns a result like the one below

    {
      "success": {
	"total": 1
      },
      "copyright": {
	"copyright": "2019-21 https://math.tools"
      },
      "cotents": {
	"from": 0,
	"to": 100,
	"result": "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679",
	"number": "pi"
      }
    }

Converting to another base free ratelimited

Binary conversion

To convert a number to binary use the following request.

  GET /numbers/base/binary

A call to the above API should return a result something like this.

{
  "success": {
    "total": 1
  },
  "copyright": {
    "copyright": "2019-21 https://math.tools"
  },
  "contents": {
    "number": 32,
    "base": {
      "from": 10,
      "to": 2
    },
    "answer": "100000"
  }
}

Any base to any base conversion

Convert from any base to any other base

  GET /numbers/base

For example if you want to convert the number ( base 10 ) 34568 to base 13

  GET /numbers/base?number=34568&from=10&to=13
The above call will result in a response similar to the one below
{
  "success": {
    "total": 1
  },
  "copyright": {
    "copyright": "2019-21 https://math.tools"
  },
  "contents": {
    "number": 88,
    "base": {
      "from": 10,
      "to": 12
    },
    "answer": "74"
  }
}

API Console

The following are the API calls you can make. You can try out / test the calls right from this page. Please note, javascript needs to be enabled to see the documentation below.

Subscribe

Math Tools Numbers API Basic

$9.99/mo

No contracts. Anytime cancellation.
1 API Key
2000 API Calls / day
Best in class backend tools
Easy to use REST API
Immediate provisioning

Math Tools Numbers API Premium

$24.99/mo

No contracts. Anytime cancellation.
1 API Key
6000 API Calls / day
Best in class backend tools
Easy to use REST API
Immediate provisioning

Math Tools Numbers API Ultra

$49.99/mo

No contracts. Anytime cancellation.
1 API Key
25000 API Calls / day
Best in class backend tools
Easy to use REST API
Immediate provisioning