Using the API

An API (Application Programming Interface) is an interface for programs to communicate and exchange data.

Note

To know more about what APIs are and why and how they are used, you can read the article “You don’t need analogies to understand APIs” written by one of our OpenDataSoft developers.

OpenDataSoft provides access to 6 APIs, that can be put into 3 categories:

All these APIs provide access to any data pushed to the platform, no matter their source or format, as long as the security rules defined by the data owner allow that access.

These APIs can be used, for example, to search for datasets and data, to compute analysis or to perform geographic aggregations. Still developer-oriented, but for more concrete examples of what can be done with APIs: applications as data reuses. Some of OpenDataSoft customers have indeed seen their datasets being reused through their API, to create applications (i.e. Qui dit miam ! and Y’A D Frites! 2 applications that display the school canteen menu of French cities, Toulouse, Rennes and Saint-Malo).

Reminder before diving into any API specification

Before using any of the available APIs, it is very important to be familiar with the nature of this data. Everything within the platform is built according to a tree structure (there are of course more types of data within the platform, but they are only relevant in very specific contexts). OpenDataSoft can thus be seen as such:

  • The OpenDataSoft platform is a network of OpenDataSoft portals.
  • A portal provides a catalog of all of its datasets.
  • Each dataset is defined by a dictionary of metadata, a data schema (specifying fields names and types) and a collection of records.
  • Each record provides values for each of the dataset’s fields.

Triple Pattern Fragments

The Triple Pattern Fragments (TPF) API enables dataset querying in Resource Description Framework (RDF) format. This work is still in progress and is part of a PhD that aims to improve OpenDataSoft datasets quality using semantic web technologies.

OData, WFS and CSW

OData, WFS and CSW refer to other standards implemented by the platform. We recommand to users who are not familiar with these 3 APIs to stick to the ODS Search API since it provides the most comprehensive access to the data.

  • OData: standard for REST APIs that provides a common language to be used across APIs to perform requests. The trade-off for this norm’s generic approach is its higher complexity compared to traditional custom REST APIs. OpenDataSoft has implemented this norm for the simple operations (searching for datasets and records) ; for the more complex ones (analysis, aggregations, geographic computations etc.) our ODS Search APIs (v1 and v2) must be used.
  • WFS and CSW: standards focusing on geographic data. They are especially relevant for example to interface the platform with other GIS software.