Your Cart

Prime Numbers API is a tool for requesting prime numbers or data associated with a prime or composite (non-prime) number.  With five endpoints, users can request a random prime number, check if a number is prime, gather all the prime numbers between two numbers, get density values of primes in a certain range, get an isolated random prime that's super far from a neighbor, get tons of information about their results, and more!  Prime numbers are extremely useful to many, including mathematicians, data scientists, and security experts, to name a few.  

They are difficult to acquire, though.  Think about it, how many numbers are there? Infinite--that's how many. How many prime numbers are there? Good question.  How many APIs have had 10 active servers running for years on end, non-stop, to count and calculate each individual number?  One: Prime Numbers API

No other database in the world even comes remotely close to 5+ billion primes and 130+ composite numbers! Prime Numbers API aims to be the one-stop-shop for anyone in need of prime numbers and their respective data. It is a truly unique API.

The API's responses can be used for websites (including desktop and mobile applications), smart cars, home or office devices, wearable devices, robots, internet of things, telecom devices, or even servers!

Visit and register an account.  Choose a plan and enjoy!  The Free Plan is an excellent choice to give our API a test drive!

Absolutely! If you visit our Documentation page and select any of the docs for an endpoint, Get Isolated Random Prime (paid) for example, you can view example requests, their headers, and responses!

With the Prime Numbers API output, 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 which reads the same backwards 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 is 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!

The average prime numbers mining speed is over 75 million composite numbers per day! Therefore, the live database is updated at least twice per month with more than 45 million home-grown, curated, and 100% genuine primes at a time!

Yes. When you attempt to check out with an item, you will be directed to either log in or register a new account.

On your account page, at the bottom under Newsletter, you can subscribe/unsubscribe at your preference.

Links to our Terms & Conditions can be found in the top menu under About or in the footer of every page.

You can find links to the Prime Numbers API documentation under the Support top menu and the Documentation footer links.

We accept Visa, MasterCard, Discover, JCB, American Express, and Union Pay.

Each subscription is billed on a monthly basis, beginning from the day you place your order. 

Simply select the plan(s) you wish to add, click 'Add to Cart' and checkout.  Each plan will be billed individually on the day of the month it was ordered.

The API key is visible in the messages related to each one of the orders.

On your account page, under My Orders, there is a Recurring Payments tab with all your paid recurrences.

Each API request needs a valid API key. Each price plan gives you a key that grants access to that specific API endpoint. Making a request lacking the necessary key will result in '403 Error Forbidden'.

When an initial order is placed, it takes 24 hours to clear the payment and validate the API credentials. If you wish to cancel before your API key is validated, you will get a full refund. Please follow the Contact link under the Support tab of the header menu at the top of every page. Select General Support for the Topic.

If the API key is already issued, it is no longer possible to cancel the current monthly payment cycle. The next month's payment and subscription will be canceled, however. 

You should receive your order in 24 hours. You can view your orders and any associated downloads in the My Account page under My Orders. You must be logged in to view this page.

Links to our Privacy Policy can be found in the top menu under About or in the footer of every page.

Calls are the individual requests you make to the Prime Numbers API. Each plan has a maximum allowed number of calls per second and per day.  These can be seen here 

API endpoints are specific URL addresses that allow communication with a database or service. In this case: the Prime Numbers API database. Each endpoint is designed to ask the database to do something specific. For example, the get-random-prime endpoint asks the database to present a random prime number (and any relevant data that was also asked for via optional parameters). In contrast, the get-isolated-random-prime endpoint, by default, asks the database for a prime number that lies at least 200 numbers from its nearest prime neighbor, or up to 500 numbers away if the minimum_combined_prime_gap parameter is set to 500.

Caching data is against the current usage policy and would lead to instant termination of the subscription.

We offer four API plans:

  1. Free ($0/month)
  2. Maths is Fun ($7.99/month)
  3. Scientist ($19.99/month)
  4. Expert ($29.99/month)

Here you can view the complete pricing details

Absolutely! If you hover over the    symbol on a product's block and select Compare this Product, then do the same for another product, you can click the same symbol at the top right of the header menu to navigate to a page that will specifically compare the plans you selected. You can compare two, three, or all four at once.

If none of our standard plans fits your requirements, please contact us to discuss whether a custom plan may be possible.

Subscribe to our Newsletter for any important updates! You can do so by checking the box when you register for an account, or by going to My Account, then selecting Subscribe / unsubscribe to newsletter.

We offer a multitude of Code Examples, as well as Documentation for each request endpoint, in a host of languages to help you get started with integrating Prime Numbers API calls into your application! 

While we cannot offer direct coding support, we highly recommend starting with the Code Examples and Documentation relevant to the language(s) you're coding in and endpoint(s) you're using. 

Yes! Under the Support tab of the header menu, you will find links to both!

The get-all-primes-between-two-numbers endpoint will work best for this; included in the Scientist API Plan
Our servers have been running for over three years, through more than 130 billion composite numbers and 5 billion primes (and still counting)!
All our numbers are home-grown, curated, and 100% genuine; and even come with their very own birth certificate!
While there is no uptime guarantee for the free plan, all the paid plans come with 98.5% uptime!
We offer a Help Centre at to all users and more direct support via our contact form to users with any of the three paid plans. Please select "General Support" in the Topic dropdown for more efficient response times.

If you need to hire a developer, here are some qualifications you can look for:
  • knowledge of HTTP-based APIs
  • knowledge of JSON
  • fluent in the development language that you need the API integrated with
Prime Numbers API was built with international availability in mind. The output has been translated into the eight most commonly spoken languages in the world, besides english!

Under the Code Examples dropdown of the top menu, you can view an example 'get' request in a multitude of languages.

Prime Numbers API is available in the following languages:

  • English
  • Mandarin
  • Hindi
  • Spanish
  • French
  • German
  • Italian
  • Japanese
  • Russian

To cancel a plan, please reach out to us via the contact form and select "General Support" as the Topic. 

Please give us at least two business days' notice before your subscription's billing date to ensure enough time to cancel your service.

Looking forward to hearing from you


Contact Us

Our Location

Prime Numbers API
Prime Numbers API