This is a brief documentation on how to use the Primes API, located at http://sethriedel.com/primes/api/primes.php
This API can only be called with the HTTP GET method. The usage is as follows:
limit
parameter, which must be a number greater than 3 and less than 4000000. Any error with the limit
parameter will result in an HTTP 400 error code.The result is returned in JSON, as follows:
{ count: Integer primes: Integer Array }
where count
is the number of prime numbers in the result set and primes
is the result set of prime numbers less than the limit.
There is a testing front-end for this api located at http://sethriedel.com/primes/test.html