True Random Number Service

API Usage Guidelines

The following list summarizes good practice for writing your application that uses the RANDOM.ORG API. Depending on your application, it may not always be possible to follow every single guideline, but you should try for as many of them as possible. Our source code libraries help make this easy.

  1. If possible, configure your client not to issue multiple simultaneous requests. If you use a single-threaded client, this will not be any concern for you. If you use a multithreaded client, you can use a locking scheme to serialize your requests.
  2. If your client needs many numbers, configure it to issue requests that fetch the numbers in blocks as large as possible. This is more efficient than issuing a separate request for every single number and will exhaust your client's daily request limit slower.
  3. If your client is not a real-time application, use a long timeout value for your requests, ideally a couple of minutes.
  4. Configure your client to back off until midnight UTC, if it exceeds its daily request or bit limit. RANDOM.ORG will respond with a 402 or 403 error code, if your API key does not have enough requests or bits left. Your key's current usage is included in nearly all API responses, so the client can easily track how many of each it has left.
  5. Configure your client to obey the advisory delays requested by RANDOM.ORG in the API responses.

If you have questions, you are always welcome to contact us.

© 1998-2018 RANDOM.ORG
Valid XHTML 1.0 Transitional | Valid CSS
Web Design by TSDA