Quickstart & Guides

From zero to your first API call

A friendly, practical walkthrough — plus tips the pros use. No prior experience with government data required.

5-minute quickstart

Four steps to live data

Create your free account

Head to the home page and fill the registration form — name, email, organisation and a one-line use case. Pick the Developer (free) tier to start.

Register now →

Copy your API key

On success you’ll receive a key like asbs_fre_xxxxx. Store it somewhere safe — a password manager or an environment variable, never in your source code.

Make your first request

Call the datasets endpoint with your key in the X-API-Key header. Here it is in three languages:

curl "https://api.sdh.central.abiastatistics.com/v1/datasets?per_page=5" \ -H "X-API-Key: $ABIA_KEY"
import os, requests key = os.environ["ABIA_KEY"] r = requests.get("https://api.sdh.central.abiastatistics.com/v1/datasets", headers={"X-API-Key": key}, params={"per_page": 5}) for d in r.json()["data"]: print(d["title"])
const key = process.env.ABIA_KEY; const r = await fetch("https://api.sdh.central.abiastatistics.com/v1/datasets?per_page=5", { headers: { "X-API-Key": key } }); console.log((await r.json()).data);

Explore & build

Search by keyword, filter by sector, request CSV for spreadsheets, and watch your usage in the developer dashboard. You’re ready to build.

Full API reference →
Pro tips

Tips from experienced developers

🔑

Use environment variables

Keep keys out of code with export ABIA_KEY=.... It prevents accidental commits and makes rotating keys painless.

📊

Request only what you need

Use per_page and field filters to shrink payloads. Smaller responses are faster and cheaper on your rate limit.

🔄

Cache stable data

Most datasets update on a fixed cycle. Cache responses locally and check the updated field before re-fetching.

Handle 429 gracefully

Honour the Retry-After header and add exponential backoff so bursts never break your app.

📋

Pick the right format

JSON for apps, CSV for analysts and spreadsheets, SDMX for statistical tooling. Just switch ?format=.

🛡️

Validate before production

Test against the free tier first, then upgrade. Always check status codes and the error field on failures.

Recipes

Common how-tos

How do I export a dataset to CSV?+
Append ?format=csv to any datasets endpoint, e.g. https://api.sdh.central.abiastatistics.com/v1/datasets/agric-001?format=csv. The response is a downloadable CSV with a header row.
How do I search across all sectors?+
Use /v1/datasets/search?q=your+terms. Results are ranked by relevance and include a relevance score per match.
How do I page through every result?+
Start at page=1, read total, then keep incrementing page while page * per_page < total. Use per_page=100 to reduce calls.
How do I upgrade to OAuth 2.0?+
Professional and Enterprise tiers can authenticate users via Keycloak SSO (OAuth 2.0 / OIDC). Your dashboard provides client credentials and the discovery URL.

You’re ready — get your key

Everything above works on the free tier. Grab a key and make your first call now.

🔑 Get your free key