Stat-Xplore : Open Data API

The Stat-Xplore Open Data API supports data publishers in opening their data to the world by embracing the use of live reports, data visualisations and infographics. You can build your own third-party interactive reports and applications that retrieve data direct from Stat-Xplore and automatically update every time we release new data.

To access data through the Open Data API you will need to use the following endpoint:

https://stat-xplore.dwp.gov.uk/webapi/rest/v1

Overview

The Stat-Xplore Open Data API is a standards-based REST API service that requires third-party software to manage your requests. It allows you to tabulate your query on the fly and always displays your latest data.

The Open Data API is a JSON REST API. It has 4 root REST endpoints:

/schema
Provides information about all the Stat-Xplore datasets that are available to you, and their fields and measures. Learn More
/table
Allows you to submit queries and receive the results (equivalent to creating a table in Stat-Xplore). Learn More
/info
Provides general information about the Stat-Xplore instance you are connecting to. At present, this endpoint provides information about the dataset languages currently configured in Stat-Xplore. Learn More
/rate_limit
Access to the API is subject to rate limits. This endpoint provides information about the limit that applies to you, how many requests you have remaining, and the length of time before the rate limit will be reset. Learn More

API Keys

In order to use the API, you must first obtain an API key. This is used for authorisation and must be submitted in an APIKey header in every request you make to the API.

To get your key, login to Stat-Xplore and select the Account option from the menu on the top right:

Account menu vertical ellipsis

Your API key can then be found under Open Data API Access.

Open Data API

You can then Copy the key to the clipboard, or Reset to generate a new API key.

Global Headers

The following headers are supported on all requests or provided in all responses:

Request Headers

Accept-Language
The language that labels will be returned in (setting this is equivalent to changing the dataset and user interface language in Stat-Xplore). Optional. If not set, the server default language will be used.
APIKey
The API Key to use to authenticate this request. You can obtain your API key from the Account page in Stat-Xplore. Required in all requests.

Response Headers

X-RateLimit
The rate limit configured for this server, this is set to 2,000.
X-RateLimit-Remaining
The number of requests remaining for the current rate limiting period. If this value drops to 0 then you will not be able to submit any further requests using this API key until the limit resets.
X-RateLimit-Reset
The time when the rate limit will next be reset. This is expressed as a UNIX timestamp in milliseconds (the number of milliseconds since January 1st 1970).

Examples

The Department has been making use of the Stat-Xplore Open Data API and JavaScript to build interactive visual dashboards that give a live summary view of the data in Stat-Xplore. There are currently 2 visualisations running from the Open Data API which provide detailed visual statistics on Personal Independence Payments and the Benefit Cap.

Personal Independence Payments
This dashboard allows users to view regional information for all claims, registrations and clearances, and also breaks down both daily living and mobility award status. The dashboard provides a large amount of data which can be accessed, understood and easily compared with a single click. https://stat-xplore.dwp.gov.uk/webapi/metadata/dashboards/pip/index.html
Benefit Cap
This dashboard follows a similar layout to the Personal Independence dashboard. It contains an interactive map as an anchor which allows the user to view the information for multiple regions and provides statistics on the number of newly capped and currently capped households each month, along with the proportion of off-flows by reason and the number of capped households by number of children and family type. https://stat-xplore.dwp.gov.uk/webapi/metadata/dashboards/bc/index.html

Attachments: