v1

latestOpenAPI 3.0.3Copyright Opendatasoft2026-07-13161044.7 KB
Dataset

Export a dataset

Export a dataset in the desired format. Note: The group_by parameter is only available on exports starting with the v2.1

get/catalog/datasets/{dataset_id}/exports/{format}

Path parameters

dataset_idstring required

The identifier of the dataset to be queried.

You can find it in the "Information" tab of the dataset page or in the dataset URL, right after /datasets/.

format'csv' | 'fgb' | 'geojson' | 'gpx' | 'json' | 'jsonl' | 'jsonld' | 'kml' | 'n3' | 'ov2' | 'parquet' | 'rdfxml' | 'shp' | 'turtle' | 'xls' required

Query parameters

selectstring

Examples:

  • select=size - Example of select, which only return the "size" field.
  • select=size * 2 as bigger_size - Example of a complex expression with a label, which returns a new field named "bigger_size" and containing the double of size field value.
  • select=dataset_id, fields - Example of a select in catalog ODSQL query to only retrieve dataset_id and schema of datasets.

A select expression can be used to add, remove or change the fields to return. An expression can be:

  • a wildcard ('*'): all fields are returned.
  • A field name: only the specified field is returned.
  • An include/exclude function: All fields matching the include or exclude expression are included or excluded. This expression can contain wildcard.
  • A complex expression. The result of the expression is returned. A label can be set for this expression, and in that case, the field will be named after this label.
wherestring

A where filter is a text expression performing a simple full-text search that can also include logical operations (NOT, AND, OR...) and lots of other functions to perform complex and precise search operations.

For more information, see Opendatasoft Query Language (ODSQL) reference documentation.

order_bystring

Example: order_by=sum(age) desc, name asc

A comma-separated list of field names or aggregations to sort on, followed by an order (asc or desc).

Results are sorted in ascending order by default. To sort results in descending order, use the desc keyword.

limitinteger

Number of items to return in export.

Use -1 (default) to retrieve all records

refinestring

Example: refine=modified:2020 - Return only the value 2020 from the modified facet.

A facet filter used to limit the result set. Using this parameter, you can refine your query to display only the selected facet value in the response.

Refinement uses the following syntax: refine=<FACETNAME>:<FACETVALUE>

For date, and other hierarchical facets, when refining on one value, all second-level values related to that entry will appear in facets enumeration. For example, after refining on the year 2019, the related second-level month will appear. And when refining on August 2019, the third-level day will appear.

refine must not be confused with a where filter. Refining with a facet is equivalent to selecting an entry in the left navigation panel.

excludestring

Examples:

  • exclude=city:Paris - Exclude the value Paris from the city facet. Facets enumeration will display Paris as excluded without any count information.
  • exclude=modified:2019/12 - Exclude the value 2019/12 from the modified facet. Facets enumeration will display 2020 as excluded without any count information.

A facet filter used to exclude a facet value from the result set. Using this parameter, you can filter your query to exclude the selected facet value in the response.

exclude uses the following syntax: exclude=<FACETNAME>:<FACETVALUE>

exclude must not be confused with a where filter. Excluding a facet value is equivalent to removing an entry in the left navigation panel.

lang'en' | 'fr' | 'nl' | 'pt' | 'it' | 'ar' | 'de' | 'es' | 'ca' | 'eu' | 'sv'

A language value.

If specified, the lang value override the default language, which is "fr". The language is used to format string, for example in the date_format function.

timezonestring

Set the timezone for datetime fields.

Timezone IDs are defined by the Unicode CLDR project. The list of timezone IDs is available in timezone.xml.

use_labelsboolean

If set to true, this parameter will make exports output the label of each field rather than its name.

This parameter only makes sense for formats that contain a list of the fields in their output.

compressedboolean

If set to true, this parameter can compress the output file of a specific export format with GZIP, e.g. .csv.gzip.

epsginteger

This parameter sets the EPSG code to project shapes into for formats that support geometric features.

Response

Return a file