API Portal

Welcome to the Stats NZ API Portal, your gateway to innovation and collaboration. Our developer portal empowers developers with the tools and resources they need to build cutting-edge applications using our Application Programming Interface (API) services. 

To be able to access the full features of the API portal, please sign in if you already have an account or sign up for an account if you don’t have one yet. 

Sign up / Sign In 

Subscribe to a Stats NZ API service 

To access an API service, you’ll need to subscribe it first. 

Go to 'Explore APIs' link from the main menu and select what API service you want to subscribe to.

Enter a customised name then click ‘Subscribe’.  

Managing your Subscription 

Manage your subscriptions by selecting ‘Profile’ from the menu. From here you can display your subscription key(s) or regenerate a new one. You can also cancel a subscription if you no longer require it. 

View APIs in your subscriptions 

About Subscriptions   

Why do I need to sign up to use the service? 
To ensure ‘fair use’ of the service we ask people to sign up for an API key. The API key uniquely identifies your subscription. For more information, please go to Digital.govt.nz 

Can we share an API key within our organisation? 
No, you should not. Sharing API keys will very likely lead to throttling. If you want to use an API key for organisational applications, you should use a team or group email to set up an account on the API Portal. Use the keys associated with that account for the applications the team is responsible for. You should also use a key vault to manage the keys and keep them secure.

How can I monitor my usage of the service? 
Basic monitoring of your API key(s) can be viewed in the developer portal via ‘Reports’. 

Someone is using my API key without permission. 
You can regenerate a new API key in the developer portal via your ‘Profile’. This will render the previous key inactive. 

How do I use the API key allocated to me. 
When making a request to the service, include a header field labelled ‘Ocp-Apim-Subscription-Key’ and place your API key in the value field.