Close

Prime Count

Returns the number of primes less than or equal to a specified number.

API

Endpoint
https://pebbles.cc/api/prime-count
Parameters

Send a request with the following parameters:

apikey - Your API key

number - The number ;). A positive integer.

Response

The API returns a JSON object containing the fields status and output.

When the operation is successful, status has a value of "success", and output holds the result of the operation.

When there is an error in the operation, status has a value of "error", and output holds the error message(s). Multiple error messages are seperated with a "|".

Examples

{ "status" : "success", "output" : "123" }

{ "status" : "error", "output" : "Invalid input | API key not stated" }