openapi: 3.0.0
servers:
  - url: https://api.math.tools
  - url: http://api.math.tools
info:
  description: |
    All about Numbers. REST access with json/xml/jsonp result support. Below is the documentation for the Numbers API. You can try them out right here. Find more information and subscribe at [math.tools](https://math.tools/api/numbers/)  
  title: Numbers API
  version: "1.5"
  x-apisguru-categories:
    - open_data
  x-logo:
    backgroundColor: "#FFFFFF"
    url: https://api.apis.guru/v2/cache/logo/https_math.tools_branding_blackboard_small.png
  x-origin:
    - converter:
        url: https://github.com/mermade/oas-kit
        version: 7.0.4
      format: openapi
      url: https://api.math.tools/yaml/math.tools.numbers.openapi.yaml
      version: "3.0"
  x-providerName: math.tools
tags:
  - description: Number of the day. This API is free (rate limited).
    name: Number of the day
  - description: Get random interesting fact about a given number.
    name: Number Facts
  - description: Generate Random and interesting numbers.
    name: Number Generation
  - description: Spell out a number ordinal, cardinal or currency. This API is free (rate limited).
    name: Spell
  - description: Convert from one base to another. This API is free (rate limited).
    name: Base Conversion
  - description: Convert from one number system to another.
    name: Number Systems Conversion
  - description: Things to do with Prime numbers
    name: Prime
  - description: Digits of PI and more.This API is free (rate limited).
    name: PI
  - description: Check Property of a given number.
    name: Number Checks
paths:
  /numbers/base:
    get:
      description: Convert a given number from one base to another base
      parameters:
        - description: Number to convert to the target base
          in: query
          name: number
          required: true
          schema:
            format: integer
            type: integer
        - description: Base of the supplied number (Optional base 10 assumed by default)
          in: query
          name: from
          required: false
          schema:
            format: integer
            type: integer
        - description: Target base to convert to
          in: query
          name: to
          required: true
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 32,
                        "base": {
                          "from": 10,
                          "to": 2
                        },
                        "answer": "100000"
                      }
                    }
          description: 200 success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Base Conversion
  /numbers/base/binary:
    get:
      description: Convert a given number to binary
      parameters:
        - description: Number to convert to binary
          in: query
          name: number
          required: true
          schema:
            format: integer
            type: integer
        - description: Base of the supplied number (Optional base 10 assumed by default)
          in: query
          name: from
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 32,
                        "base": {
                          "from": 10,
                          "to": 2
                        },
                        "answer": "100000"
                      }
                    }
          description: 200 success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                    
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Base Conversion
  /numbers/base/hex:
    get:
      description: Convert a given number to hexadecimal
      parameters:
        - description: Number to convert to hex
          in: query
          name: number
          required: true
          schema:
            format: integer
            type: integer
        - description: Base of the supplied number (Optional base 10 assumed by default)
          in: query
          name: from
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 78,
                        "base": {
                          "from": 10,
                          "to": 16
                        },
                        "answer": "4e"
                      }
                    }
          description: 200 success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                          
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Base Conversion
  /numbers/base/octal:
    get:
      description: Convert a given number to octal
      parameters:
        - description: Number to convert to octal
          in: query
          name: number
          required: true
          schema:
            format: integer
            type: integer
        - description: Base of the supplied number (Optional base 10 assumed by default)
          in: query
          name: from
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 78,
                        "base": {
                          "from": 10,
                          "to": 8
                        },
                        "answer": "116"
                      }
                    }
          description: 200 success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }  
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Base Conversion
  /numbers/cardinal:
    get:
      description: Get the cardinal of the given number
      parameters:
        - description: Number value
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
        - description: Language to use
          in: query
          name: language
          required: false
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "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"
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Spell
  /numbers/currency:
    get:
      description: Spells out the number as a currency
      parameters:
        - description: Number to spell
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
        - description: Language to use
          in: query
          name: language
          required: false
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "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"
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                    
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Spell
  /numbers/fact:
    get:
      description: Get a random fact about a number
      parameters:
        - description: Number value
          in: query
          name: number
          required: true
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 11,
                        "fact": "11 is the largest known multiplicative persistence."
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                    
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Facts
  /numbers/is-cube:
    get:
      description: Checks whether a given number is a cube number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 27,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }       
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Checks
  /numbers/is-palindrome:
    get:
      description: Checks whether a given number is a palindrome number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 456654,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }               
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Checks
  /numbers/is-square:
    get:
      description: Checks whether a given number is a square number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 16,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                                          
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Checks
  /numbers/is-triangle:
    get:
      description: Checks whether a given number is a triangle number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 45,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }  
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Checks
  /numbers/nod:
    get:
      description: Get the number of the day for current day
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "nod": {
                          "category": {
                            "name": "nod",
                            "description": "Number of the day.",
                            "background": ""
                          },
                          "numbers": {
                            "number": "56006",
                            "uuid": "56006",
                            "id": "56006",
                            "names": {
                              "nominal": {
                                "name": "nominal",
                                "description": "Nominal",
                                "value": "56006",
                                "display": "56006"
                              },
                              "cardinal": {
                                "name": "cardinal",
                                "description": "Cardinal",
                                "value": "fifty-six thousand six",
                                "display": "fifty-six thousand six"
                              },
                              "ordinal": {
                                "name": "ordinal",
                                "description": "Ordinal",
                                "value": "56,006th",
                                "display": "56,006th"
                              },
                              "us_currency": {
                                "name": "us_currency",
                                "description": "This number as US currency",
                                "value": "fifty-six thousand six dollars",
                                "display": "fifty-six thousand six dollars"
                              }
                            },
                            "bases": {
                              "binary": {
                                "name": "binary",
                                "description": "Base 2 (Binary)",
                                "value": "1101101011000110",
                                "display": "1101101011000110<sub>2</sub>"
                              },
                              "ternary": {
                                "name": "ternary",
                                "description": "Base 3 (Ternary)",
                                "value": "2211211022",
                                "display": "2211211022<sub>3</sub>"
                              },
                              "quaternary": {
                                "name": "quaternary",
                                "description": "Base 4 (Quaternary)",
                                "value": "31223012",
                                "display": "31223012<sub>4</sub>"
                              },
                              "quinary": {
                                "name": "quinary",
                                "description": "Base 5 (Quinary)",
                                "value": "3243011",
                                "display": "3243011<sub>5</sub>"
                              },
                              "senary": {
                                "name": "senary",
                                "description": "Base 6 (Senary)",
                                "value": "1111142",
                                "display": "1111142<sub>6</sub>"
                              },
                              "octal": {
                                "name": "octal",
                                "description": "Base 8 (Octal)",
                                "value": "155306",
                                "display": "155306<sub>8</sub>"
                              },
                              "duodecimal": {
                                "name": "duodecimal",
                                "description": "Base 12 (Duodecimal)",
                                "value": "284B2",
                                "display": "284B2<sub>12</sub>"
                              },
                              "hexadecimal": {
                                "name": "vexadecimal",
                                "description": "Base 16 (Hexadecimal)",
                                "value": "DAC6",
                                "display": "DAC6<sub>16</sub>"
                              },
                              "vigesimal": {
                                "name": "vigesimal",
                                "description": "Base 20 (Vigesimal)",
                                "value": "7006",
                                "display": "7006<sub>20</sub>"
                              }
                            },
                            "numerals": {
                              "roman": {
                                "name": "roman",
                                "description": "56006 in <a href=\"/numbers/to-roman/\">Roman Numeral</a>",
                                "value": "<span class='u'>L</span><span class='u'>V</span>MVI",
                                "display": "<span class='u'>L</span><span class='u'>V</span>MVI"
                              },
                              "chinese": {
                                "name": "chinese",
                                "description": "56006 in <a href=\"/numbers/to-chinese/\">Chinese Numeral</a>",
                                "value": "&#20237;&#33836;&#38520;&#20191;&#38520;",
                                "display": "&#20237;&#33836;&#38520;&#20191;&#38520;"
                              },
                              "egyptian": {
                                "name": "egyptian",
                                "description": "56006 in <a href=\"/numbers/to-egyptian/\">Egyptian Numeral</a>",
                                "value": "&#x130b1;&#x131c1;&#x133ff;",
                                "display": "&#x130b1;&#x131c1;&#x133ff;"
                              },
                              "babylonian": {
                                "name": "babylonian",
                                "description": "56006 in <a href=\"/numbers/to-babylonian/\">Babylonian Numeral</a>",
                                "value": "<img src=\"https://math.tools/img/babnumbers/bab_15.gif\" alt=\"15\"> &nbsp; <img src=\"https://math.tools/img/babnumbers/bab_33.gif\" alt=\"33\"> &nbsp; <img src=\"https://math.tools/img/babnumbers/bab_26.gif\" alt=\"26\"> &nbsp; ",
                                "display": "<img src=\"https://math.tools/img/babnumbers/bab_15.gif\" alt=\"15\"> &nbsp; <img src=\"https://math.tools/img/babnumbers/bab_33.gif\" alt=\"33\"> &nbsp; <img src=\"https://math.tools/img/babnumbers/bab_26.gif\" alt=\"26\"> &nbsp; "
                              }
                            },
                            "general-facts": {
                              "odd": {
                                "name": "odd",
                                "description": "Is 56006 an odd number?",
                                "value": false,
                                "display": "56006 is NOT an odd number"
                              },
                              "even": {
                                "name": "even",
                                "description": "Is 56006 an even number?",
                                "value": true,
                                "display": "56006 is  an even number"
                              },
                              "palindrome": {
                                "name": "palindrome",
                                "description": "Is 56006 a palindrome?",
                                "value": false,
                                "display": "56006 is  NOT a palindrome number"
                              },
                              "triangle": {
                                "name": "triangle",
                                "description": "Is 56006 a triangle number?",
                                "value": false,
                                "display": "56006 is  NOT a triangle number"
                              }
                            },
                            "prime-facts": {
                              "prime": {
                                "name": "prime",
                                "description": "Is 56006 a Prime Number?",
                                "value": false,
                                "display": "56006 is NOT a  prime"
                              },
                              "perfect": {
                                "name": "perfect",
                                "description": "Is 56006 a perfect number?",
                                "value": false,
                                "display": "56006 is NOT a perfect number"
                              },
                              "mersenne": {
                                "name": "mersenne",
                                "description": "Is 56006 a Mersenne Prime?",
                                "value": false,
                                "display": "56006 is NOT a Mersenne prime"
                              },
                              "fermat": {
                                "name": "fermat",
                                "description": "Is 56006 a Fermat Prime?",
                                "value": false,
                                "display": "56006 is NOT a Fermat prime"
                              },
                              "fibonacci": {
                                "name": "fibonacci",
                                "description": "Is 56006 a Fibonacci Prime?",
                                "value": false,
                                "display": "56006 is NOT a Fibonacci prime"
                              },
                              "partition": {
                                "name": "partition",
                                "description": "Is 56006 a Partition Prime?",
                                "value": false,
                                "display": "56006 is NOT a Partition prime"
                              },
                              "pell": {
                                "name": "pell",
                                "description": "Is 56006 a Pell Prime?",
                                "value": false,
                                "display": "56006 is NOT a Pell prime"
                              }
                            },
                            "recreational": {
                              "reverse": {
                                "name": "reverse",
                                "description": "Number 56006 reversed",
                                "value": "60065",
                                "display": "60065"
                              },
                              "digitssum": {
                                "name": "digitssum",
                                "description": "Sum of the digits",
                                "value": 17,
                                "display": 17
                              },
                              "noofdigits": {
                                "name": "noofdigits",
                                "description": "No of digits",
                                "value": 5,
                                "display": 5
                              }
                            },
                            "category": "nod"
                          }
                        }
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number of the day
  /numbers/numeral/chinese:
    get:
      description: Convert base 10 representation of a given number to chinese numeral.
      parameters:
        - description: Number to convert
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 4568367,
                        "system": "chinese",
                        "result": ""
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Systems Conversion
  /numbers/numeral/egyptian:
    get:
      description: Convert base 10 representation of a given number to egyptian numeral.
      parameters:
        - description: Number to convert
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 4568367,
                        "system": "egyptian",
                        "result": ""
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Systems Conversion
  /numbers/numeral/roman:
    get:
      description: Convert base 10 representation of a given number to roman numeral.
      parameters:
        - description: Number to convert
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 4568367,
                        "system": "roman",
                        "result": "DLXVMMMCCCLXVII"
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Systems Conversion
  /numbers/ordinal:
    get:
      description: Get the ordinal of the given number
      parameters:
        - description: Number value
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 2342,
                        "result": "2342nd",
                        "ordinal": "2342nd"
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Spell
  /numbers/pi:
    get:
      description: Get digits of pi (Ï€)
      parameters:
        - description: Optional start position
          in: query
          name: from
          required: false
          schema:
            format: integer
            type: integer
        - description: Optional start position
          in: query
          name: to
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "cotents": {
                        "from": 0,
                        "to": 100,
                        "result": "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679",
                        "number": "pi"
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - PI
  /numbers/prime/factors:
    get:
      description: Get the prime factors of a given number.
      parameters:
        - description: Number to get the factors
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 228,
                        "answer": [
                          {
                            "factor": 2,
                            "times": 2
                          },
                          {
                            "factor": 3,
                            "times": 1
                          },
                          {
                            "factor": 19,
                            "times": 1
                          }
                        ],
                        "prime-factors": [
                          {
                            "factor": 2,
                            "times": 2
                          },
                          {
                            "factor": 3,
                            "times": 1
                          },
                          {
                            "factor": 19,
                            "times": 1
                          }
                        ]
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                      
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
  /numbers/prime/is-fermat-prime:
    get:
      description: Checks whether a given number is a known fermat prime number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 257,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                    
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
        - Number Checks
  /numbers/prime/is-fibonacci-prime:
    get:
      description: Checks whether a given number is a known fibonacci prime number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 1597,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                    
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
        - Number Checks
  /numbers/prime/is-mersenne-prime:
    get:
      description: Checks whether a given number is a known mersenne prime number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 8191,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
        - Number Checks
  /numbers/prime/is-partition-prime:
    get:
      description: Checks whether a given number is a known partition prime number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 33461,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
        - Number Checks
  /numbers/prime/is-pell-prime:
    get:
      description: Checks whether a given number is a known pell prime number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 33461,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
        - Number Checks
  /numbers/prime/is-perfect:
    get:
      description: Checks whether a given number is a perfect number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 8128,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
        - Number Checks
  /numbers/prime/is-prime:
    get:
      description: Checks whether a given number is a known prime number or not.
      parameters:
        - description: Number to check
          in: query
          name: number
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "number": 227,
                        "answer": true
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    } 
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Prime
        - Number Checks
  /numbers/random:
    get:
      description: Generate random number(s)
      parameters:
        - description: Minimum Number value in the range
          in: query
          name: min
          required: false
          schema:
            format: integer
            type: integer
        - description: Maximum Number value
          in: query
          name: max
          required: false
          schema:
            format: integer
            type: integer
        - description: Total number of random numbers to generate. Defaults to 1
          in: query
          name: total
          required: false
          schema:
            format: integer
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "success": {
                        "total": 1
                      },
                      "copyright": {
                        "copyright": "2019-21 https://math.tools"
                      },
                      "contents": {
                        "numbers": [
                          1942400822,
                          828097719,
                          1581110549,
                          1957713319,
                          1920104909
                        ],
                        "min": 1,
                        "max": 2147483647,
                        "requested": 5,
                        "returned": 5
                      }
                    }
          description: 200 Success response
        "401":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "error": {
                            "code": 401,
                            "message": "Unauthorized"
                        }
                    }                    
          description: 401 Unauthorized response
      security:
        - X-Mathtools-Api-Secret: []
      tags:
        - Number Generation
components:
  securitySchemes:
    X-Mathtools-Api-Secret:
      in: header
      name: X-Mathtools-Api-Secret
      type: apiKey
