Common API Methods
Reference for the most frequently used API methods.
Visit Summary
VisitsSummary.get
Get overall visit metrics for a website.
&method=VisitsSummary.getReturns:
nb_uniq_visitors— Unique visitorsnb_visits— Total visitsnb_actions— Total actionsnb_users— Identified usersbounce_rate— Bounce ratenb_actions_per_visit— Actions per visitavg_time_on_site— Average visit duration
Example:
?module=API&method=VisitsSummary.get&idSite=1&period=day&date=yesterday&format=JSON&token_auth=TOKENResponse:
{
"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.getPageUrlsOptional parameters:
expanded=1— Include subdirectoriesflat=1— Flatten URL hierarchy
Example:
?module=API&method=Actions.getPageUrls&idSite=1&period=month&date=today&format=JSON&filter_limit=10&token_auth=TOKENActions.getPageTitles
Get page view data by page title.
&method=Actions.getPageTitlesActions.getEntryPageUrls
Get entry (landing) pages.
&method=Actions.getEntryPageUrlsActions.getExitPageUrls
Get exit pages.
&method=Actions.getExitPageUrlsActions.getDownloads
Get file download data.
&method=Actions.getDownloadsActions.getOutlinks
Get outbound link clicks.
&method=Actions.getOutlinksActions.getSiteSearchKeywords
Get internal site search queries.
&method=Actions.getSiteSearchKeywordsTraffic Sources
Referrers.getAll
Get all traffic source data.
&method=Referrers.getAllReferrers.getReferrerType
Get traffic by channel type (direct, search, website, campaign, social).
&method=Referrers.getReferrerTypeReferrers.getKeywords
Get search keywords (when available).
&method=Referrers.getKeywordsReferrers.getSearchEngines
Get traffic by search engine.
&method=Referrers.getSearchEnginesReferrers.getWebsites
Get referral traffic by website.
&method=Referrers.getWebsitesReferrers.getCampaigns
Get campaign traffic (UTM tagged).
&method=Referrers.getCampaignsReferrers.getSocials
Get social media traffic.
&method=Referrers.getSocialsVisitor Information
UserCountry.getCountry
Get visitors by country.
&method=UserCountry.getCountryUserCountry.getRegion
Get visitors by region/state.
&method=UserCountry.getRegionUserCountry.getCity
Get visitors by city.
&method=UserCountry.getCityDevicesDetection.getType
Get visitors by device type (desktop, smartphone, tablet).
&method=DevicesDetection.getTypeDevicesDetection.getBrowsers
Get visitors by browser.
&method=DevicesDetection.getBrowsersDevicesDetection.getOsVersions
Get visitors by operating system.
&method=DevicesDetection.getOsVersionsResolution.getResolution
Get visitors by screen resolution.
&method=Resolution.getResolutionTime-Based Analytics
VisitTime.getVisitInformationPerLocalTime
Get visits by hour of day.
&method=VisitTime.getVisitInformationPerLocalTimeVisitTime.getByDayOfWeek
Get visits by day of week.
&method=VisitTime.getByDayOfWeekEngagement
VisitorInterest.getNumberOfVisitsPerVisitDuration
Get visits by duration (how long visitors stayed).
&method=VisitorInterest.getNumberOfVisitsPerVisitDurationVisitorInterest.getNumberOfVisitsPerPage
Get visits by pages viewed per visit.
&method=VisitorInterest.getNumberOfVisitsPerPageVisitFrequency.get
Get returning vs new visitor metrics.
&method=VisitFrequency.getGoals
Goals.get
Get goal conversion data.
&method=Goals.getOptional 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=TOKENGoals.getGoals
Get list of configured goals.
&method=Goals.getGoalsEvents
Events.getCategory
Get events by category.
&method=Events.getCategoryEvents.getAction
Get events by action.
&method=Events.getActionEvents.getName
Get events by name.
&method=Events.getNameReal-Time
Live.getCounters
Get real-time visitor counts.
&method=Live.getCountersParameters:
lastMinutes=30— Time window in minutes
Example:
?module=API&method=Live.getCounters&idSite=1&lastMinutes=30&format=JSON&token_auth=TOKENLive.getLastVisitsDetails
Get detailed information about recent visits.
&method=Live.getLastVisitsDetailsParameters:
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.getOptional 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=TOKENThis returns key metrics from multiple modules in one response.
Metadata
API.getReportMetadata
Get metadata about all available reports.
&method=API.getReportMetadataReturns information about available reports, their metrics, and dimensions.
API.getSegmentsMetadata
Get metadata about available segments.
&method=API.getSegmentsMetadataReturns all segment names, acceptable values, and documentation.
Site Management
SitesManager.getAllSites
Get list of all websites.
&method=SitesManager.getAllSitesSitesManager.getSiteFromId
Get details for a specific website.
&method=SitesManager.getSiteFromId&idSite=1Premium Features
Funnels (if enabled)
&method=Funnels.get
&method=Funnels.getFunnelFlowForm Analytics (if enabled)
&method=FormAnalytics.get
&method=FormAnalytics.getFormFieldsOverviewMedia Analytics (if enabled)
&method=MediaAnalytics.get
&method=MediaAnalytics.getVideoTitlesHeatmaps/Session Recordings (if enabled)
&method=HeatmapSessionRecording.getRecordingsRequest Patterns
Daily Trend (last 30 days)
&period=day&date=last30Returns one row per day.
Monthly Comparison
&period=month&date=previous12Returns one row per month for the last 12 months.
Current vs Previous Period
Make two requests:
&period=month&date=today— Current month&period=month&date=lastMonth— Previous month
Year-to-Date
&period=range&date=2024-01-01,todayNext Steps
- Code Examples — Working code in multiple languages
- Segmentation — Filter these methods with segments
- Parameters Reference — Additional parameters