Prime Numbers API

Welcome to Prime Numbers, the largest commercial database of prime numbers in the world!
Here we have more than 5.1 billion primes curated from the first 130 billion composite numbers, and counting!

Overview

Whether you're a scientist, security expert, or simply love maths, Prime Numbers has something to offer you! If you’re looking for help with encryption, gain access to our exclusive isolated primes endpoint and you can filter for rare primes that lie at least 200, and even up to 500+ numbers away from their closest neighbors! The average probability of finding one of the isolated prime numbers by accident is 1 in over 800,000 (or 0.000124565509%)! The chances of being struck by lightning are 1 in 500,000! Now that’s a strong password!
We've translated the output in 8 of the most commonly used languages, not counting English of course. With these languages covering some 89% of the world population, this is now the most accessible API for finding prime numbers in the world!

Need More from Your Output?

The API results have a multitude of configurations. These range from simple and fast to incredibly verbose, with extensive explanations for each field. Whether you're looking for efficient server-to-server communication or you're in need of prime numbers for educational or research purposes, the results can be custom-tailored to suit your needs!

With these prime types outputs, you can determine:

  • Isolated: rare prime numbers with an average density of 0.000124565509% that are 200 to 500+ composite numbers away from each of their neighbours
  • Palindromes: primes that read the same backward as forwards (examples: 101, 373, 919)
  • Twins: primes that are no more than 2 composite numbers from each other (examples: (5, 7), (11, 13), (17, 19))
  • Cousins: primes that are no more than 4 composite numbers from each other (examples: (7, 11), (37, 41), (43, 47))
  • Sexys: primes that are no more than 6 composite numbers from each other (examples: (7,13), (13,19), (23,29))
  • Reversibles: primes that become a different prime when their decimal digits are reversed (examples: 37, 107, 149)
  • Pandigitals: primes in a base has at least one instance of each base digit (examples: 2143 (base 4), 7654321 (base 7))
  • Repunits: primes are positive integers in which every digit is one (examples: 11, 1111111111111111111)
  • Mersenne: primes that are of the form 2n - 1 (one less than a power of two) for some integer n (examples: 3 (2^2 - 1), 7 (2^3 - 1), 31 (2^5 - 1) )
  • Fibonacci: primes that are also Fibonacci numbers (examples: 89, 233, 1597)
  • Prime type densities: how many prime type numbers in percentage can be found in every million composite numbers
  • ...and so much more!

Authentication

Authenticate using the API key with extra security provided by the domain name and IP address locks (the API requests are only accepted from your IP or domain name)

Status Codes

  • 200 OK
  • 403 user not found
  • 404 no results found

Rate limits

  • Maximum calls per second: 1
  • Maximum calls per day: 100

Output Format

  • JSON