Inflation-adjust prices in Python

Convert any historical AUD figure to today's dollars using a single API call. Returns the deflated value and the index ratio used.

Steps

  1. 1Pass amount and from period.
  2. 2Read the value field for today's equivalent.

Code

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

Watch out for

  • Default base is the latest quarter. Override with to=YYYY-Q#.

Related

Try it now

500 free calls per month. No credit card.

Get a free API key