Skip to Content
APICommon API Methods

Common API Methods

Reference for the most frequently used API methods.

Visit Summary

VisitsSummary.get

Get overall visit metrics for a website.

&method=VisitsSummary.get

Returns:

  • nb_uniq_visitors — Unique visitors
  • nb_visits — Total visits
  • nb_actions — Total actions
  • nb_users — Identified users
  • bounce_rate — Bounce rate
  • nb_actions_per_visit — Actions per visit
  • avg_time_on_site — Average visit duration

Example:

?module=API&method=VisitsSummary.get&idSite=1&period=day&date=yesterday&format=JSON&token_auth=TOKEN

Response:

{ "nb_uniq_visitors": 1250, "nb_visits": 1543, "nb_actions": 4521, "nb_users": 0, "bounce_rate": "42%", "nb_actions_per_visit": 2.93, "avg_time_on_site": 185 }

Page Analytics

Actions.getPageUrls

Get page view data by URL.

&method=Actions.getPageUrls

Optional parameters:

  • expanded=1 — Include subdirectories
  • flat=1 — Flatten URL hierarchy

Example:

?module=API&method=Actions.getPageUrls&idSite=1&period=month&date=today&format=JSON&filter_limit=10&token_auth=TOKEN

Actions.getPageTitles

Get page view data by page title.

&method=Actions.getPageTitles

Actions.getEntryPageUrls

Get entry (landing) pages.

&method=Actions.getEntryPageUrls

Actions.getExitPageUrls

Get exit pages.

&method=Actions.getExitPageUrls

Actions.getDownloads

Get file download data.

&method=Actions.getDownloads

Get outbound link clicks.

&method=Actions.getOutlinks

Actions.getSiteSearchKeywords

Get internal site search queries.

&method=Actions.getSiteSearchKeywords

Traffic Sources

Referrers.getAll

Get all traffic source data.

&method=Referrers.getAll

Referrers.getReferrerType

Get traffic by channel type (direct, search, website, campaign, social).

&method=Referrers.getReferrerType

Referrers.getKeywords

Get search keywords (when available).

&method=Referrers.getKeywords

Referrers.getSearchEngines

Get traffic by search engine.

&method=Referrers.getSearchEngines

Referrers.getWebsites

Get referral traffic by website.

&method=Referrers.getWebsites

Referrers.getCampaigns

Get campaign traffic (UTM tagged).

&method=Referrers.getCampaigns

Referrers.getSocials

Get social media traffic.

&method=Referrers.getSocials

Visitor Information

UserCountry.getCountry

Get visitors by country.

&method=UserCountry.getCountry

UserCountry.getRegion

Get visitors by region/state.

&method=UserCountry.getRegion

UserCountry.getCity

Get visitors by city.

&method=UserCountry.getCity

DevicesDetection.getType

Get visitors by device type (desktop, smartphone, tablet).

&method=DevicesDetection.getType

DevicesDetection.getBrowsers

Get visitors by browser.

&method=DevicesDetection.getBrowsers

DevicesDetection.getOsVersions

Get visitors by operating system.

&method=DevicesDetection.getOsVersions

Resolution.getResolution

Get visitors by screen resolution.

&method=Resolution.getResolution

Time-Based Analytics

VisitTime.getVisitInformationPerLocalTime

Get visits by hour of day.

&method=VisitTime.getVisitInformationPerLocalTime

VisitTime.getByDayOfWeek

Get visits by day of week.

&method=VisitTime.getByDayOfWeek

Engagement

VisitorInterest.getNumberOfVisitsPerVisitDuration

Get visits by duration (how long visitors stayed).

&method=VisitorInterest.getNumberOfVisitsPerVisitDuration

VisitorInterest.getNumberOfVisitsPerPage

Get visits by pages viewed per visit.

&method=VisitorInterest.getNumberOfVisitsPerPage

VisitFrequency.get

Get returning vs new visitor metrics.

&method=VisitFrequency.get

Goals

Goals.get

Get goal conversion data.

&method=Goals.get

Optional parameters:

  • idGoal=1 — Specific goal ID (omit for all goals)

Example:

?module=API&method=Goals.get&idSite=1&period=month&date=today&idGoal=1&format=JSON&token_auth=TOKEN

Goals.getGoals

Get list of configured goals.

&method=Goals.getGoals

Events

Events.getCategory

Get events by category.

&method=Events.getCategory

Events.getAction

Get events by action.

&method=Events.getAction

Events.getName

Get events by name.

&method=Events.getName

Real-Time

Live.getCounters

Get real-time visitor counts.

&method=Live.getCounters

Parameters:

  • lastMinutes=30 — Time window in minutes

Example:

?module=API&method=Live.getCounters&idSite=1&lastMinutes=30&format=JSON&token_auth=TOKEN

Live.getLastVisitsDetails

Get detailed information about recent visits.

&method=Live.getLastVisitsDetails

Parameters:

  • filter_limit=10 — Number of visitors to return

Returns detailed visit info including:

  • Pages viewed
  • Actions taken
  • Visitor attributes
  • Referrer information
  • Goal conversions

All-in-One

API.get

Get multiple metrics in a single request.

&method=API.get

Optional parameters:

  • columns=nb_visits,nb_actions — Specific metrics to return

Example:

?module=API&method=API.get&idSite=1&period=month&date=today&format=JSON&token_auth=TOKEN

This returns key metrics from multiple modules in one response.

Metadata

API.getReportMetadata

Get metadata about all available reports.

&method=API.getReportMetadata

Returns information about available reports, their metrics, and dimensions.

API.getSegmentsMetadata

Get metadata about available segments.

&method=API.getSegmentsMetadata

Returns all segment names, acceptable values, and documentation.

Site Management

SitesManager.getAllSites

Get list of all websites.

&method=SitesManager.getAllSites

SitesManager.getSiteFromId

Get details for a specific website.

&method=SitesManager.getSiteFromId&idSite=1

Premium Features

Funnels (if enabled)

&method=Funnels.get &method=Funnels.getFunnelFlow

Form Analytics (if enabled)

&method=FormAnalytics.get &method=FormAnalytics.getFormFieldsOverview

Media Analytics (if enabled)

&method=MediaAnalytics.get &method=MediaAnalytics.getVideoTitles

Heatmaps/Session Recordings (if enabled)

&method=HeatmapSessionRecording.getRecordings

Request Patterns

Daily Trend (last 30 days)

&period=day&date=last30

Returns one row per day.

Monthly Comparison

&period=month&date=previous12

Returns one row per month for the last 12 months.

Current vs Previous Period

Make two requests:

  1. &period=month&date=today — Current month
  2. &period=month&date=lastMonth — Previous month

Year-to-Date

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

Next Steps

Last updated on