Access to European Union open data
EUROPAEU Open Data PortalDevelopers’ corner
Menu
Overview Knowledge center Projects Sandbox

Developers’ corner

The EU Open Data Portal (EU ODP) aims to encourage the use of EU datasets for building third-party applications. To help achieve this, two programming interfaces (API) are proposed to developers to search for datasets: a REST API and a SPARQL endpoint.

REST API

One way to access the EU ODP is to use the REST API. All of the portal core functionalities are available through the application programming interface (API), which encompasses most of what you can do with the web interface. The information retrieved can then be used by an external code to transform, update or reference and provide new input for further calls to the API.

For programing use, the new API is available at the following base URL: https://data.europa.eu/euodp/data/apiodp/

The message format for both the body of the request and the response is JSON (specified in RFC 4627) for all calls. However, services providing dataset details provide also an answer in RDF/XML, usually embedded in the JSON response.

A legacy API based on CKAN is still available (https://data.europa.eu/euodp/data/api/) but we encourage developers to migrate to the new API, which is closer to our data model.

Specifications of the new API are published in OpenAPI format on SwaggerHub: https://app.swaggerhub.com/apis/EU-Open-Data-Portal/eu-open_data_portal/

The description file in OpenAPI format is also available for download: eu-odp_openapi.yaml

For more details on the REST API, please read the following pages:

Note: API calls must be introduced with the POST HTTP method. Some of the API calls, those that affect data in the system, require the use of credentials provided by the ODP team. For more information please contact us

SPARQL EndPoint

Another way to access the EU ODP is the machine-readable SPARQL endpoint, which allows queries on the RDF descriptions of datasets. Note: only information retrieval queries are allowed to anonymous users.

As shown on the ‘Linked data’ page, a graphical user interface is provided to enter your SPARQL queries.

For programmatic use, a machine readable endpoint is available at the following URL: https://data.europa.eu/euodp/sparqlep

You can find specifications of SPARQL on the W3C web site: https://www.w3.org/TR/rdf-sparql-query/. The models used to describe datasets catalogued on the EU ODP are described on the ‘Linked data’ page under ‘Metadata vocabulary’.

For more details on the SPARQL endpoint, please read the following pages:

RDF data model

The DCAT Application profile for data portals in Europe (DCAT-AP) is a specification based on DCAT for describing public sector datasets in Europe. Its basic use case is to enable cross-data portal search for data sets and make public sector data better searchable across borders and sectors.

The following chapter has been extracted from the final DCAT-AP version 1.1 that can be found here: https://joinup.ec.europa.eu/release/dcat-ap-v11.

Terminology used in the DCAT Application profile

An Application Profile is a specification that re-uses terms from one or more base standards, adding more specificity by identifying mandatory, recommended and optional elements to be used for a particular application, as well as recommendations for controlled vocabularies to be used.
Dataset is a collection of data, published or curated by a single source, and available for access or download in one or more formats.
Data Portal is a Web-based system that contains a data catalogue with descriptions of datasets and provides services enabling discovery and re-use of the datasets.
In the following sections, classes and properties are grouped under headings ‘mandatory’, ‘recommended’ and ‘optional’. These terms have the following meaning.

  • Mandatory class: a receiver of data MUST be able to process information about instances of the class; a sender of data MUST provide information about instances of the class.
  • Recommended class: a sender of data SHOULD provide information about instances of the class; a sender of data MUST provide information about instances of the class, if such information is available; a receiver of data MUST be able to process information about instances of the class.
  • Optional class: a receiver MUST be able to process information about instances of the class; a sender MAY provide the information but is not obliged to do so.
  • Mandatory property: a receiver MUST be able to process the information for that property; a sender MUST provide the information for that property.
  • Recommended property: a receiver MUST be able to process the information for that property; a sender SHOULD provide the information for that property if it is available.
  • Optional property: a receiver MUST be able to process the information for that property; a sender MAY provide the information for that property but is not obliged to do so.

The Application Profile reuses terms from various existing specifications. Classes and properties specified in the next sections have been taken from the following namespaces:

DCAT-AP-OP

Additionally, to the DCAT-AP model described above, OP has added additional properties to be able to express information which is not part of DCAT-AP (e.g. alternative title for datasets, number of downloads for distributions).

Basically, DCAT-AP-OP adds no classes to DCAT-AP, except “DatasetDescription”; apart from that, it only adds properties to some DCAT-AP classes.

For more details on the DCAT-AP-OP model, see DCAT-AP-OP specifications (EN only).

 

EU Open Data Portal supports also the GEO DCAT and DCAT-STAT extensions.

 

SPARQL endpoint: sample queries

You will find examples of queries that can be performed on the ‘Linked data’ page of the EU ODP.