Skip to content

opendatasoft API

by opendatasoft.com

API keyHTTPSOpen Data
Open documentation ↗

Overview

With our data marketplace solution, centralize and share your data assets with all types of user in a simple, secure and interactive way.

opendatasoft is an open data API from opendatasoft.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 36 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Category
Open Data
Base URL
https://public.opendatasoft.com/api/v2
Version
2.1.0
Endpoints
36
Spec updated
2021-07-12

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://public.opendatasoft.com/api/v2/" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://public.opendatasoft.com/api/v2/", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://public.opendatasoft.com/api/v2/",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/API entry point
GET/pagesList of all pages from this portal.
GET/pages/{slug}A single page's metadata from this portal
GET/{source}Source entry points
GET/{source}/aggregates**Deprecated, use `/datasets` instead.**
GET/{source}/datasetsList of available datasets, each with their endpoints, paginated.
GET/{source}/datasets/{dataset_id}List of available endpoints for the specified dataset, with metadata and endpoints.
GET/{source}/datasets/{dataset_id}/aggregates**Deprecated, use `/records` instead.**
GET/{source}/datasets/{dataset_id}/attachmentsGet list of all available attachments
GET/{source}/datasets/{dataset_id}/attachments/{attachment_id}Download attachment
GET/{source}/datasets/{dataset_id}/exports/csvExport dataset in CSV format
GET/{source}/datasets/{dataset_id}/exports/geojsonExport dataset in GEOJSON format
GET/{source}/datasets/{dataset_id}/exports/icalExport dataset in ICAL format
GET/{source}/datasets/{dataset_id}/exports/jsonExport dataset in JSON format
GET/{source}/datasets/{dataset_id}/exports/ov2Export dataset in OV2 format
GET/{source}/datasets/{dataset_id}/exports/shpExport dataset in Esri shapefile (shp) format
GET/{source}/datasets/{dataset_id}/exports/xlsExport dataset in XLS (Excel) format
GET/{source}/datasets/{dataset_id}/facetsEnumerate facets values for records and return a list of values for each facet.
PUT/{source}/datasets/{dataset_id}/feedbackCreate new feedback entry.
GET/{source}/datasets/{dataset_id}/files/{file_id}Download file
GET/{source}/datasets/{dataset_id}/recordsSearch dataset's records.
GET/{source}/datasets/{dataset_id}/records/{record_id}Retrieve a single record based on its ID.
GET/{source}/datasets/{dataset_id}/reusesGet list of reuses
GET/{source}/datasets/{dataset_id}/reuses/{reuse_id}Retrieve a single reuse based on its ID.
GET/{source}/datasets/{dataset_id}/snapshotsList of all snapshots for this dataset.
GET/{source}/datasets/{dataset_id}/snapshots/{snapshot_id}List of all snapshots for this dataset.
GET/{source}/exports/csvExport catalog (source) in CSV format
GET/{source}/exports/jsonExport catalog (source) in JSON format
GET/{source}/exports/rdfExport catalog (source) in RDF/XML format
GET/{source}/exports/rssExport catalog (source) in RSS format
GET/{source}/exports/ttlExport catalog (source) in TTL (turtle/rdf) format
GET/{source}/exports/xlsExport catalog (source) in XLS (Excel) format
GET/{source}/facetsEnumerate facets values for datasets and return a list of values for each facet.
GET/{source}/metadata_templatesList of available metadata templates types, each with their endpoints.
GET/{source}/metadata_templates/{metadata_template_type}List of metadata templates available for this type.
GET/{source}/metadata_templates/{metadata_template_type}/{metadata_template_name}A single metadata_template

Questions

Does the opendatasoft API need an API key?

Yes. The opendatasoft API uses API key authentication; the documentation explains how to get credentials.

Does the opendatasoft API support HTTPS?

Yes, the opendatasoft API is served over HTTPS.

How many endpoints does the opendatasoft API have?

Its OpenAPI description lists 36 endpoints in version 2.1.0. All of them are shown on this page.

What are alternatives to the opendatasoft API?

Other Open Data APIs include Search Services, Wayback API, Wikipedia, Nasdaq Data Link, University of Oslo.

Compare alternatives →

Listed from APIs.guru (CC0).