API KeysYou now require a key to access this API. There are no plans to charge for access to the service, but rate limiting may come into force if required. For information on our API and to request a key for v1.0, email us at firstname.lastname@example.org
Our unique feature is the API endpoints we provide for UK polling data. We're providing this API free of charge and for any reasonable purpose, all we ask is that you say you used our API (or the data from our website) when publishing the data or any derived statistics.
The API uses JSON objects which provides data in groups which can then be used in your applications, or as a way of syndicating our content. We welcome any developers who want to make third party applicatons that use the data.
Before using the API, you should also read our Terms & Conditions.
Current API version: v1.0.1
There are four main endpoints;
The first three have no further options to provide and will return all results. The final endpoint, polls, has the ability to ask for a variety of options to filter results, which are as follows;
|code||string||The code for the type of poll; available from the types endpoint. For example, WESTVI for Westminster voting intention.|
|start_date||Date (string) Format "2017-04-30"||Gets polls where the fieldwork ends on or after this date|
|end_date||Date (string) Format "2017-04-30"||Gets polls where the fieldwork ends on or before this date|
|company||string||Code for a polling company to filter results by, available from the companies endpoint|
|limit||integer||Limit the number of polls returned to this value (max 500, default 500)|
All these options should be passed in the query string, along with the API key, like this;
Polls will be returned date order (of the end date of the survey) with the most recent poll first