Handle ausdata rate limits in your client

We return 429 with Retry-After and a JSON body. Back off and retry.

Steps

  1. 1Check the status code.
  2. 2Read Retry-After.
  3. 3Sleep then retry.

Code

cURL
curl https://api.ausdata.io/v1/ \
  -H "Authorization: Bearer YOUR_KEY"
Python
import requests
r = requests.get(
    "https://api.ausdata.io/v1/",
    headers={"Authorization": "Bearer YOUR_KEY"},
)
print(r.json())
JavaScript
const r = await fetch("https://api.ausdata.io/v1/", {
  headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());

Watch out for

  • Do not retry on 4xx other than 429. Those are bugs in your code.

Related

Try it now

500 free calls per month. No credit card.

Get a free API key