Get the RBA cash rate in JavaScript
One fetch call, no SDK. Works in Node 18+, browsers, Cloudflare Workers, and Deno.
Steps
- 1Get an API key.
- 2Call fetch with the Authorization header.
- 3Parse the JSON response.
Code
cURL
curl https://api.ausdata.io/v1/data/rba/f1.1?limit=1 \
-H "Authorization: Bearer YOUR_KEY"Python
import requests
r = requests.get(
"https://api.ausdata.io/v1/data/rba/f1.1?limit=1",
headers={"Authorization": "Bearer YOUR_KEY"},
)
print(r.json())JavaScript
const r = await fetch("https://api.ausdata.io/v1/data/rba/f1.1?limit=1", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Watch out for
- Browser calls expose your key. Proxy through your backend in production.
Related
Try it now
500 free calls per month. No credit card.
Get a free API key