Website open data

The CBS OData interface is based on the OData v4 standard, and shows five entity types:

  1. Articles. Articles from the CBS website. Articles appear on the homepage of the CBS website.
  2. Pages. Pages of the CBS website. These items do not appear on the homepage of the CBS website.
  3. Figures. Frequently used figures from the StatLine databank. These figures can be found on the figures page of the CBS website (click on the menu item ‘Figures’).
  4. Events. All items from the publication calendar.
  5. Flash. Quick updates provided especially for third party automated processing.

More details can be obtained through the OData interface on: http://www.cbs.nl/odata/v1/$metadata. Under this link you will find a description of the five entity types and their functionalities. In version 1, Statistics Netherlands offers at least the following features:

  1. GetArticlesByTheme. Get articles on 1 specific theme.
  2. GetArticlesByArticleType. Get articles of 1 specific ArticleType.
  3. GetArticlesByTaxonomyTag. Get articles which use 1 specific tag.
  4. GetPagesByTheme. Get pages on 1 specific theme. Please note, many pages on our website are not linked to one particular theme.
  5. GetPagesByPageType. Get articles of 1 specific PageType.
  6. GetPagesByTaxonomyTag. Get articles which use 1 specific tag.
  7. GetFiguresByTheme. Get figures on 1 specific theme.
  8. GetFiguresByTaxonomyTag. Get figures which use 1 specific tag.

Details about the interface

It is important to note the following about the first implementation of OData:
All information (except the metadata) is delivered in a JSON format. The default sorting is by UniqueId. You can sort by other properties using the $orderby query parameter with the desc or asc option. The $orderby option can only be used with the properties ReleaseTime, Updated and Created.

Maximum number of results at one time is 100. You can navigate between the various pages with $skip and $top, in which $skip is the number of records to skip in the complete set of results and $top the number of results to be returned subsequently.

Results can be filtered by using the $filter option. The $filter option can only be used with the properties Url, UniqueId and Language. This does not include any text fields.

You can filter by article, taxonomy tag and theme by using the Get[EntityType]ByTheme and Get[EntityType]ByTaxonomyTag.

More information about OData and the query options can be found at: http://www.odata.org/getting-started/basic-tutorial/

Examples of OData queries

Below are some examples of OData queries offered through the CBS website. A maximum of 100 results will be returned in each of these examples.

Get all articles:
http://www.cbs.nl/odata/v1/Articles

Get articles sorted by Release time descending:
http://www.cbs.nl/odata/v1/Articles?$orderby=ReleaseTime desc

Get all English language articles:
http://www.cbs.nl/odata/v1/Articles?$filter=Language%20eq%20%27en-GB%27

Get 1 single article based on its UniqueId:
http://www.cbs.nl/odata/v1/Articles('bd5f55e8-b6f9-4d56-8b8c-e423c3ffb668-en-gb')

Get articles from result 6 to 10:
http://www.cbs.nl/odata/v1/Articles?$top=10&$skip=5  

Get all news articles:
http://www.cbs.nl/odata/v1/GetArticlesByArticleType(ArticleType='News')  

Get all news articles, sorted by Release time descending:
http://www.cbs.nl/odata/v1/GetArticlesByArticleType(ArticleType='News')?$orderby=ReleaseTime desc 

Get all articles with theme “income and spending” (Dutch):
http://www.cbs.nl/odata/v1/GetArticlesByTheme(Theme='Incomn%20and%20spending')  

Get all articles with theme “manufacturing and energy” in English:
http://www.cbs.nl/odata/v1/GetArticlesByTheme(Theme='Manufactering%20and%20energy')?$filter=Language%20eq%20%27en-GB%27

Get all articles by taxonomy tag “construction and housing”:
http://www.cbs.nl/odata/v1/GetArticlesByTaxonomyTag(Tag='construction%20and%20housing')

Get all pages:
http://www.cbs.nl/odata/v1/Pages

Get all figures:
http://www.cbs.nl/odata/v1/Figures

Open Data Disclaimer on the CBS website

version 0.1, 8 March 2016

CBS has opened up this channel to provide open data, i.e. data which are provided to the public free of charge.

CBS does not warrant or accept any liability for the availability, accuracy and continuity of the information and the platform. CBS also reserves the right to discontinue the open data service without notice.

The user will be entirely responsible for the realisation of services based on the functionality made available by CBS and for any risks connected with commercial damage or loss of data as a result of calamities or termination.

Using the open data through this interface is free of charge.

Performance is based on fair use.

The Creative Commons Attribution licence applies to all information.

Each item may be renewed separately.

Disclaimer

CBS cannot be held responsible for any information obtained through this website. CBS does not accept any liability whatsoever for any damage resulting from the use of this site or the services rendered based on the meta data offered or referred to. CBS is not responsible for unlawful or unlimited access to data which are offered through your information. CBS does not guarantee the faultless or undistrupted operation of this website.

Copyright applies to all images used by CBS. Images may only be reproduced when in the possession of the applicable rights for reproduction.