Skip to Content
APIParameters Reference

Parameters Reference

Complete reference for all API parameters.

Standard Parameters

These parameters are required or commonly used in most API requests.

idSite

The website ID to query.

ValueDescription
1Single website
1,2,3Multiple websites
allAll websites (limited support)
&idSite=1

period

The time period for the report.

ValueDescription
dayDaily data
weekWeekly data (week containing the date)
monthMonthly data
yearYearly data
rangeCustom date range
&period=day

date

The date or date range for the report.

Single dates:

ValueDescription
todayCurrent day
yesterdayPrevious day
YYYY-MM-DDSpecific date

Relative ranges:

ValueDescription
lastXLast X periods including today
previousXX periods before today
lastWeekPrevious calendar week
lastMonthPrevious calendar month
lastYearPrevious calendar year

Date ranges (with period=range):

&period=range&date=2024-01-01,2024-01-31

format

The output format.

ValueDescription
JSONJSON format (recommended)
xmlXML format
csvComma-separated values
tsvTab-separated values
htmlHTML table
rssRSS feed
originalPHP serialized (for internal use)
&format=JSON

token_auth

Authentication token.

&token_auth=YOUR_TOKEN_HERE

See Authentication for details.

Optional Parameters

Pagination & Limiting

filter_limit

Number of rows to return.

ValueDescription
10Return 10 rows
100Return 100 rows (default)
-1Return all rows
&filter_limit=25

filter_offset

Number of rows to skip (for pagination).

&filter_offset=20&filter_limit=10

filter_truncate

Truncate results and aggregate remaining rows into “Others”.

&filter_truncate=10

Sorting

filter_sort_column

Column to sort by.

&filter_sort_column=nb_visits

filter_sort_order

Sort direction.

ValueDescription
descDescending (highest first)
ascAscending (lowest first)
&filter_sort_order=desc

Column Selection

showColumns

Only include specified columns (comma-separated).

&showColumns=nb_visits,nb_actions,bounce_rate

hideColumns

Exclude specified columns (comma-separated).

&hideColumns=logo,segment

Filtering

filter_pattern

Regular expression to match row labels.

&filter_pattern=google

filter_column

Column to apply filter_pattern to (default: label).

&filter_column=label&filter_pattern=blog

filter_excludelowpop

Column to use for minimum value threshold.

&filter_excludelowpop=nb_visits&filter_excludelowpop_value=10

filter_excludelowpop_value

Minimum value for the filter_excludelowpop column.

Hierarchical Data

expanded

Include subtables in the response.

ValueDescription
0Only top level (default)
1Include all subtables
&expanded=1

flat

Flatten hierarchical data into single table.

&flat=1

idSubtable

Request a specific subtable by ID.

&idSubtable=123

Formatting

language

Language for translated strings (2-letter code).

&language=en

translateColumnNames

Translate column names to specified language.

ValueDescription
0Use technical names
1Use translated names
&translateColumnNames=1

format_metrics

Control metric formatting.

ValueDescription
0Raw values (no formatting)
1Formatted values (with %, currency, etc.)
&format_metrics=1

Segments

segment

Filter data by segment conditions.

&segment=browserCode==FF;countryCode==US

See Segmentation for complete documentation.

Advanced

showMetadata

Include metadata in response (available since Matomo 5.4).

ValueDescription
1Include metadata (default)
0Exclude metadata
&showMetadata=0

disable_generic_filters

Disable all generic filters.

&disable_generic_filters=1

disable_queued_filters

Disable presentation filters.

&disable_queued_filters=1

Metric Definitions

Understanding the metrics returned by the API.

General Metrics

MetricDescription
nb_visitsNumber of visits (sessions)
nb_uniq_visitorsNumber of unique visitors
nb_usersNumber of identified users (with User ID)
nb_actionsTotal actions (pageviews, downloads, etc.)
bounce_countNumber of bounced visits
sum_visit_lengthTotal visit duration in seconds
max_actionsMaximum actions in a single visit
nb_visits_convertedVisits with goal conversions
nb_conversionsTotal goal conversions
revenueTotal revenue from goals

Page Metrics

MetricDescription
nb_hitsNumber of page views
entry_nb_visitsVisits that started on this page
exit_nb_visitsVisits that ended on this page
sum_time_spentTotal time spent on page (seconds)
bounce_ratePercentage of single-page visits
exit_ratePercentage of visits that exited from this page
avg_time_on_pageAverage time on page (seconds)

Event Metrics

MetricDescription
nb_eventsNumber of events
nb_events_with_valueEvents with a value set
sum_event_valueTotal of event values
min_event_valueMinimum event value
max_event_valueMaximum event value
avg_event_valueAverage event value

Ecommerce Metrics

MetricDescription
revenueTotal revenue
quantityNumber of items sold
ordersNumber of orders
avg_priceAverage item price
avg_quantityAverage items per order

Processed Metrics

These are calculated metrics that may appear in responses:

MetricDescription
bounce_ratebounce_count / nb_visits
nb_actions_per_visitnb_actions / nb_visits
avg_time_on_sitesum_visit_length / nb_visits
conversion_ratenb_visits_converted / nb_visits

Method-Specific Parameters

Some API methods accept additional parameters:

Goals Methods

ParameterDescription
idGoalSpecific goal ID
abandonedCartsInclude abandoned carts (1 or 0)

Live Methods

ParameterDescription
lastMinutesGet data from last N minutes
filter_limitNumber of visitors to return

Actions Methods

ParameterDescription
pageUrlFilter by specific URL
pageNameFilter by page title
depthDepth of URL hierarchy

Next Steps

Last updated on