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

| lastWeek | A date in the previous calendar week (pair with period=week) | | lastMonth | A date in the previous calendar month (pair with period=month) | | lastYear | A date in the previous calendar year (pair with period=year) |

Multi-period ranges (one row per period):

ValueDescription
lastXLast X periods including today
previousXX periods before today

Date ranges (with period=range):

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

format

The output format.

ValueDescription
JSONJSON format (recommended)
xmlXML format
csvComma-separated values
tsvTab-separated values
htmlHTML table
rssRSS feed (only when date is a multi-period range like last10)
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 the specified language. Only affects the CSV, RSS, and HTML output formats — with JSON/XML you always get technical names.

ValueDescription
0Use technical names (default)
1Use translated names
&translateColumnNames=1

format_metrics

Control metric formatting.

ValueDescription
bcPercent values formatted, everything else raw (default)
0Raw values (no formatting)
1Formatted values (with %, currency, etc.)
&format_metrics=1

convertToUnicode

CSV/TSV only: by default (1) exports are UTF-16LE for Excel compatibility. Set 0 for plain UTF-8 — do this whenever a script consumes the CSV.

&format=csv&convertToUnicode=0

Segments

segment

Filter data by segment conditions.

&segment=browserCode==FF;countryCode==us

See Segmentation for complete documentation.

Advanced

label

Return only the row matching a given label.

&label=Nice%20Keyword

pivotBy

Pivot a report by another dimension; combine with pivotByColumn (which metric to show) and pivotByColumnLimit (max columns before grouping into “Others”).

&pivotBy=Referrers.Keyword&pivotByColumn=nb_visits

filter_pattern_recursive

Like filter_pattern, but searches recursively through subtables (Actions/Downloads/Outlinks reports); pair with filter_column_recursive.

show_dimensions

With flat=1, output each dimension as its own column instead of one combined label.

&flat=1&show_dimensions=1

showMetadata

Include metadata in the response.

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 (on Goals.get)
abandonedCarts=1On the Goals.getItems* ecommerce item reports: report abandoned-cart items instead of ordered items

Live Methods

ParameterDescription
lastMinutesTime window in minutes (required for Live.getCounters)
minTimestampOnly visits after this Unix timestamp (Live.getLastVisitsDetails)
filter_limitNumber of visits to return

Actions Methods

ParameterDescription
depthDepth of URL hierarchy to return (Actions.getPageUrls)
pageUrlFirst argument of the singular Actions.getPageUrl method (stats for one exact URL); similarly pageName for Actions.getPageTitle, downloadUrl for Actions.getDownload, outlinkUrl for Actions.getOutlink

Next Steps

Last updated on