DEVELOPER & PARTNER RESOURCES

AHI Widget Library

Three self-updating embeds — score badge, category breakdown, and state comparison — that you can drop into any website, intranet or client portal with a single line of code. Free to use with attribution.

No build step Self-updating CC BY 4.0 Dark & light themes
🔄
Auto-updating
Widgets pull from the AHI API automatically. No manual updates needed — your embed stays current.
🎨
Themeable
Dark and light variants. Pass a theme attribute to match your site.
📱
Responsive
All widgets adapt to container width. Works in sidebars, footers, and full-width layouts.
Fast
CDN-cached API responses. Widgets render in under 200ms on first load, instantly on repeat visits.
🔒
No tracking
The widget script collects no user data and sets no cookies. GDPR and APA-safe.
📄
CC BY 4.0
Free for commercial and non-commercial use. Attribution required — the AHI link is built in.

Widget 1 — Score Badge

The simplest embed. Shows the current AHI composite score, status label and a link back. Fits in any sidebar, footer, or about page.

COST-OF-LIVING SCORE
72
High pressure
australianhouseholdindex.com.au
HTML — one line
<script src="https://australianhouseholdindex.com.au/ahi-widgets.js"></script>
<div class="ahi-score-badge" data-theme="dark"></div>

The script auto-detects all .ahi-score-badge elements on the page and populates them with live data. Add data-theme="light" for a light variant.


Widget 2 — Category Tracker

Shows all eight AHI categories with current values and pressure indicators. Ideal for financial planning pages, news articles, and cost-of-living features.

HTML
<script src="https://australianhouseholdindex.com.au/ahi-widgets.js"></script>
<div class="ahi-category-tracker"
     data-theme="dark"
     data-categories="housing,food,fuel,energy">
</div>

Filter to specific categories using data-categories. Leave blank to show all eight. Comma-separated: housing,food,fuel,energy,transport,health,insurance,telco


Widget 3 — State Comparison

A ranked bar chart of all eight state and territory AHI scores. Embed in state-specific content, regional media, or government dashboards. Highlight a specific state with data-highlight.

HTML
<script src="https://australianhouseholdindex.com.au/ahi-widgets.js"></script>
<div class="ahi-state-comparison"
     data-theme="dark"
     data-highlight="QLD">
</div>

Set data-highlight to any state abbreviation (NSW, VIC, QLD, SA, WA, TAS, ACT, NT) to highlight that row in amber.


The widget script

Self-contained. Include once per page — it finds all AHI widget containers and populates them. Works in any HTML environment including WordPress, Squarespace, Webflow, and raw HTML.

Complete embed snippet — copy once per page
<!-- AHI Widget Library — include once anywhere on the page -->
<script src="https://australianhouseholdindex.com.au/ahi-widgets.js"></script>

<!-- Widget 1: Score Badge -->
<div class="ahi-score-badge" data-theme="dark"></div>

<!-- Widget 2: Category Tracker (housing + food + energy only) -->
<div class="ahi-category-tracker" data-categories="housing,food,energy"></div>

<!-- Widget 3: State Comparison (highlight QLD) -->
<div class="ahi-state-comparison" data-highlight="QLD"></div>

All widgets update automatically when the AHI publishes new data. No webhooks, no cron jobs, no manual intervention. Attribution to australianhouseholdindex.com.au is embedded in every widget and required by the CC BY 4.0 licence.


Commercial co-brand licence

The free widgets carry the AHI attribution. A commercial co-brand licence allows white-labelling — your organisation's name alongside the AHI data — and includes SLA guarantees, a dedicated data feed, quarterly briefings, and Graeme Hughes available for media commentary attached to your platform. Pricing starts at $40,000/year.

To discuss a commercial licence: click to reveal email