openapi: 3.2.0
info:
title: Matomo Reporting API for plugin Actions API
version: 1.0.0
description: 'The Actions API lets you request reports for all your Visitor Actions: Page URLs, Page titles, Events, Content Tracking, File Downloads and Clicks on external websites. For example, "getPageTitles" will return all your page titles along with standard Actions metrics for each row. It is also possible to request data for a specific Page Title with "getPageTitle" and setting the parameter pageName to the page title you wish to request. Similarly, you can request metrics for a given Page URL via "getPageUrl", a Download file via "getDownload" and an outlink via "getOutlink". Note: pageName, pageUrl, outlinkUrl, downloadUrl parameters must be URL encoded before you call the API.'
servers:
- url: https://demo-proxy.innocraft.cloud/
description: Current Matomo instance
security:
- MatomoToken: []
tags:
- name: Actions
description: 'The Actions API lets you request reports for all your Visitor Actions: Page URLs, Page titles, Events, Content Tracking, File Downloads and Clicks on external websites. For example, "getPageTitles" will return all your page titles along with standard Actions metrics for each row. It is also possible to request data for a specific Page Title with "getPageTitle" and setting the parameter pageName to the page title you wish to request. Similarly, you can request metrics for a given Page URL via "getPageUrl", a Download file via "getDownload" and an outlink via "getOutlink". Note: pageName, pageUrl, outlinkUrl, downloadUrl parameters must be URL encoded before you call the API.'
paths:
/index.php?module=API&method=Actions.get:
get:
tags:
- Actions
description: Returns aggregated action metrics for the requested site and period.
operationId: Actions.get
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: columns
in: query
description: Metrics to include in the response. Accepts a comma-separated list or array of metric names.
required: false
schema:
oneOf:
- type: array
items:
type: string
- type: string
responses:
'200':
description: 'Action metrics for the selected site, period, and segment.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getPageUrls:
get:
tags:
- Actions
description: Returns page URL metrics for the requested site and period.
operationId: Actions.getPageUrls
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: depth
in: query
description: Maximum depth of subtables to include when expanding results.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical URL report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Page URL metrics for the requested action rows.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getPageUrlsFollowingSiteSearch:
get:
tags:
- Actions
description: Returns page URL metrics for pages viewed immediately after an internal site search.
operationId: Actions.getPageUrlsFollowingSiteSearch
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
responses:
'200':
description: 'Page URLs that followed an internal search.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getPageTitlesFollowingSiteSearch:
get:
tags:
- Actions
description: Returns page title metrics for pages viewed immediately after an internal site search.
operationId: Actions.getPageTitlesFollowingSiteSearch
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
responses:
'200':
description: 'Page titles that followed an internal search.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getEntryPageUrls:
get:
tags:
- Actions
description: Returns a DataTable with analytics information for every unique entry page URL, for the specified site, period & segment.
operationId: Actions.getEntryPageUrls
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical URL report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Entry page URL metrics for the requested site.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getExitPageUrls:
get:
tags:
- Actions
description: Returns a DataTable with analytics information for every unique exit page URL, for the specified site, period & segment.
operationId: Actions.getExitPageUrls
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical URL report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Exit page URL metrics for the requested site.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getPageUrl:
get:
tags:
- Actions
description: Returns metrics for a specific page URL.
operationId: Actions.getPageUrl
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: pageUrl
in: query
description: The URL-encoded page URL to look up.
required: true
schema:
type: string
example: https://example.org/pricing
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
responses:
'200':
description: 'Metrics for the requested page URL, or an empty table if it is not found.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getPageTitles:
get:
tags:
- Actions
description: Returns page title metrics for the requested site and period.
operationId: Actions.getPageTitles
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical title report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Page title metrics for the requested action rows.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getEntryPageTitles:
get:
tags:
- Actions
description: Returns a DataTable with analytics information for every unique entry page title for the given site, time period & segment.
operationId: Actions.getEntryPageTitles
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical title report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Entry page title metrics for the requested site.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getExitPageTitles:
get:
tags:
- Actions
description: Returns a DataTable with analytics information for every unique exit page title for the given site, time period & segment.
operationId: Actions.getExitPageTitles
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical title report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Exit page title metrics for the requested site.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getPageTitle:
get:
tags:
- Actions
description: Returns metrics for a specific page title.
operationId: Actions.getPageTitle
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: pageName
in: query
description: The URL-encoded page title to look up.
required: true
schema:
type: string
example: Pricing
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
responses:
'200':
description: 'Metrics for the requested page title, or an empty table if it is not found.
Example responses require Super User access. Use Try it out to see a live response.'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getDownloads:
get:
tags:
- Actions
description: Returns download metrics for the requested site and period.
operationId: Actions.getDownloads
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical download report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Download metrics for the requested action rows.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getDownload:
get:
tags:
- Actions
description: Returns metrics for a specific download URL.
operationId: Actions.getDownload
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: downloadUrl
in: query
description: The URL-encoded download URL to look up.
required: true
schema:
type: string
example: https://example.org/files/brochure.pdf
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
responses:
'200':
description: 'Metrics for the requested download URL, or an empty table if it is not found.
Example responses require Super User access. Use Try it out to see a live response.'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getOutlinks:
get:
tags:
- Actions
description: Returns outlink metrics for the requested site and period.
operationId: Actions.getOutlinks
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
- name: expanded
in: query
description: Whether to expand all rows and include their subtables.
required: false
schema:
type: boolean
default: false
- name: idSubtable
in: query
description: Subtable ID to fetch instead of the top-level report.
required: false
schema:
oneOf:
- type: integer
- type: string
- name: flat
in: query
description: Whether to flatten the hierarchical outlink report into a single table.
required: false
schema:
type: boolean
default: false
responses:
'200':
description: 'Outlink metrics for the requested action rows.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getOutlink:
get:
tags:
- Actions
description: Returns metrics for a specific outlink URL.
operationId: Actions.getOutlink
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: outlinkUrl
in: query
description: The URL-encoded outlink URL to look up.
required: true
schema:
type: string
example: https://partner.example.com/signup
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
responses:
'200':
description: 'Metrics for the requested outlink URL, or an empty table if it is not found.
Example responses require Super User access. Use Try it out to see a live response.'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getSiteSearchKeywords:
get:
tags:
- Actions
description: Returns internal search keywords that produced search results.
operationId: Actions.getSiteSearchKeywords
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
responses:
'200':
description: 'Site search keywords that returned at least one result.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getSiteSearchNoResultKeywords:
get:
tags:
- Actions
description: Returns internal search keywords that produced no results.
operationId: Actions.getSiteSearchNoResultKeywords
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
responses:
'200':
description: 'Site search keywords that returned no results.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
/index.php?module=API&method=Actions.getSiteSearchCategories:
get:
tags:
- Actions
description: Returns internal search categories used by visitors on the site.
operationId: Actions.getSiteSearchCategories
parameters:
- $ref: '#/components/parameters/formatOptional'
- name: idSite
in: query
description: Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list ("1,4,5") or "all"
required: true
schema:
oneOf:
- type: integer
example: 1
- type: string
example: '1'
- type: array
items:
type: integer
example: 1
- name: period
in: query
description: The period to process, processes data for the period containing the specified date.
required: true
schema:
type: string
enum:
- day
- week
- month
- year
- range
example: day
- name: date
in: query
description: The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
required: true
schema:
type: string
example: yesterday
- name: segment
in: query
description: 'Custom segment to filter the report. Example: "referrerName==example.com" Supports AND (;) and OR (,) operators.'
required: false
schema:
type: string
responses:
'200':
description: 'Site search categories and their metrics.
Example responses require Super User access. Use Try it out to see a live response.'
content:
text/xml: []
application/json: []
application/vnd.ms-excel: []
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
default:
$ref: '#/components/responses/DefaultError'
components:
responses:
NotFound:
description: Resource not found.
content:
text/plain:
schema:
type: string
example: 'Error: The method is not available.'
text/html:
schema:
type: string
example: The method is not available.
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/ErrorXml'
ServerError:
description: Unexpected server error.
content:
text/plain:
schema:
type: string
example: 'Error: There was an error.'
text/html:
schema:
type: string
example: There was an error.
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/ErrorXml'
Unauthorized:
description: Authentication failed or missing token.
content:
text/plain:
schema:
type: string
example: 'Error: You must be logged in to access this functionality.'
text/html:
schema:
type: string
example: You must be logged in to access this functionality.
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/ErrorXml'
Forbidden:
description: Authenticated but not allowed to access the resource.
content:
text/plain:
schema:
type: string
example: 'Error: Not authorised.'
text/html:
schema:
type: string
example: Not authorised.
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/ErrorXml'
DefaultError:
description: Default error response (any non-2xx).
content:
text/plain:
schema:
type: string
example: 'Error: There was an error.'
text/html:
schema:
type: string
example: There was an error.
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/ErrorXml'
BadRequest:
description: Bad request (validation or missing parameters).
content:
text/plain:
schema:
type: string
example: 'Error: There was an error.'
text/html:
schema:
type: string
example: There was an error.
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/ErrorXml'
parameters:
formatOptional:
name: format
in: query
description: Response format. Defaults to `xml`. Use `original` to get the original PHP data structure.
required: false
schema:
type: string
default: xml
enum:
- xml
- json
- csv
- tsv
- html
- rss
- original
schemas:
ErrorXml:
description: Generic Matomo error payload in XML.
properties:
error:
properties:
message:
type: string
xml:
attribute: true
example: There was an error
type: object
xml:
name: error
type: object
xml:
name: result
Error:
description: Generic Matomo error payload.
required:
- result
- message
properties:
result:
type: string
example: error
message:
type: string
example: There was an error
code:
type: integer
type: object
additionalProperties: true
securitySchemes:
MatomoToken:
type: http
description: Paste your token generated from Personal > Security. Swagger will send it as a Bearer token.
scheme: bearer
externalDocs:
description: Matomo Reporting API developer page
url: https://developer.matomo.org/api-reference/reporting-api/