Load ausdata directly into pandas
pd.read_json or pd.read_csv straight off the endpoint with the right headers.
Steps
- 1Pass storage_options or use requests then pd.read_csv on the response.
Code
cURL
curl https://api.ausdata.io/v1/data/abs/cpi.csv \
-H "Authorization: Bearer YOUR_KEY"Python
import requests
r = requests.get(
"https://api.ausdata.io/v1/data/abs/cpi.csv",
headers={"Authorization": "Bearer YOUR_KEY"},
)
print(r.json())JavaScript
const r = await fetch("https://api.ausdata.io/v1/data/abs/cpi.csv", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Watch out for
- pandas read_json infers types. For dates, pass parse_dates explicitly.
Related
Try it now
500 free calls per month. No credit card.
Get a free API key