How do I export data from Matomo in CSV, TSV, XML, or JSON format?
Matomo reports can be exported in formats such as CSV, XML, HTML, TSV (Excel), JSON, and RSS allowing you to reuse the data in spreadsheets and integrate it into other systems.
Standard and custom reports can be displayed hierarchically or flattened into a single level. For flattened multi-dimension reports, you can separate each dimension into its own column rather than combining them into a single label column.
To export data from Matomo, follow these steps:
- Select the date range you want to export data for by clicking the dashboard date selector.
- Open the report you want to export.
- Click the
Export icon.
- Choose your export format (CSV, XML, HTML, TSV, JSON, RSS), the Report type (Standard or with metadata), and define the export report row limit.
- If you select the option, Flatten report, for a multi-dimensional report, then you can enable Include dimensions separately. This will show each dimension in its own column instead of being combined into the label column.
- Click the Export button to download your report data.
Alternatively, you can use the Reporting API. The API gives access to all reports and supports the same export formats and options as the UI using query parameters.
From Matomo 5.4.0, the new show_dimensions=1
parameter can be used together with flat=1
. This combination lets you export multi-dimension reports with each dimension returned in its own column, rather than all dimensions being merged into a single label column.