Oops… problem during the request, please try again.
API quick documentation
All the data in Piwik is available through simple APIs. This plugin is the web service entry point, that you can call to get your Web Analytics data in xml, json, php, csv, etc.
For more information about the Piwik APIs, please have a look at the Introduction to Piwik API and the Piwik API Reference .
User authentication
If you want to request data within a script, a crontab, etc. you need to add the parameter &token_auth=anonymous to the API calls URLs that require authentication.
token_auth = anonymous
This token_auth is as secret as your login and password, do not share it!
Successfully loaded 13 APIs
Module LanguagesManager
- LanguagesManager.isLanguageAvailable (languageCode) [ Example in XML, PHP, Json, Csv, Basic html ]- LanguagesManager.getAvailableLanguages () [ Example in XML, PHP, Json, Csv, Basic html ]
- LanguagesManager.getAvailableLanguagesInfo () [ Example in XML, PHP, Json, Csv, Basic html ]
- LanguagesManager.getAvailableLanguageNames () [ Example in XML, PHP, Json, Csv, Basic html ]
- LanguagesManager.getTranslationsForLanguage (languageCode) [ Example in XML, PHP, Json, Csv, Basic html ]
- LanguagesManager.getLanguageForUser (login) [ No example available ]
- LanguagesManager.setLanguageForUser (login, languageCode) [ No example available ]
- LanguagesManager.getLanguageForSession () [ Example in XML, PHP, Json, Csv, Basic html ]
- LanguagesManager.setLanguageForSession (languageCode) [ Example in XML, PHP, Json, Csv, Basic html ]
Module Actions
- Actions.getPageUrls (idSite, period, date, expanded = '', idSubtable = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- Actions.getPageTitles (idSite, period, date, expanded = '', idSubtable = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Actions.getDownloads (idSite, period, date, expanded = '', idSubtable = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Actions.getOutlinks (idSite, period, date, expanded = '', idSubtable = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module Referers
- Referers.getRefererType (idSite, period, date, typeReferer = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- Referers.getKeywords (idSite, period, date, expanded = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getSearchEnginesFromKeywordId (idSite, period, date, idSubtable) [ No example available ]
- Referers.getSearchEngines (idSite, period, date, expanded = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getKeywordsFromSearchEngineId (idSite, period, date, idSubtable) [ No example available ]
- Referers.getCampaigns (idSite, period, date, expanded = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getKeywordsFromCampaignId (idSite, period, date, idSubtable) [ No example available ]
- Referers.getWebsites (idSite, period, date, expanded = '') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getUrlsFromWebsiteId (idSite, period, date, idSubtable) [ No example available ]
- Referers.getNumberOfDistinctSearchEngines (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getNumberOfDistinctKeywords (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getNumberOfDistinctCampaigns (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getNumberOfDistinctWebsites (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- Referers.getNumberOfDistinctWebsitesUrls (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module UserSettings
- UserSettings.getResolution (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- UserSettings.getConfiguration (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- UserSettings.getOS (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- UserSettings.getBrowser (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- UserSettings.getBrowserType (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- UserSettings.getWideScreen (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- UserSettings.getPlugin (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module UserCountry
- UserCountry.getCountry (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- UserCountry.getContinent (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- UserCountry.getNumberOfDistinctCountries (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module VisitsSummary
- VisitsSummary.get (idSite, period, date, columns = 'Array') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- VisitsSummary.getVisits (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitsSummary.getUniqueVisitors (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitsSummary.getActions (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitsSummary.getMaxActions (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitsSummary.getBounceCount (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitsSummary.getVisitsConverted (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitsSummary.getSumVisitsLength (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitsSummary.getSumVisitsLengthPretty (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module VisitFrequency
- VisitFrequency.get (idSite, period, date, columns = 'Array') [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- VisitFrequency.getVisitsReturning (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitFrequency.getActionsReturning (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitFrequency.getMaxActionsReturning (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitFrequency.getSumVisitsLengthReturning (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitFrequency.getBounceCountReturning (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
- VisitFrequency.getConvertedVisitsReturning (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module VisitTime
- VisitTime.getVisitInformationPerLocalTime (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- VisitTime.getVisitInformationPerServerTime (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module VisitorInterest
- VisitorInterest.getNumberOfVisitsPerVisitDuration (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]- VisitorInterest.getNumberOfVisitsPerPage (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]
Module ExampleAPI
- ExampleAPI.getPiwikVersion () [ Example in XML, PHP, Json, Csv, Basic html ]- ExampleAPI.getAnswerToLife () [ Example in XML, PHP, Json, Csv, Basic html ]
- ExampleAPI.getGoldenRatio () [ Example in XML, PHP, Json, Csv, Basic html ]
- ExampleAPI.getObject () [ Example in XML, PHP, Json, Csv, Basic html ]
- ExampleAPI.getNull () [ Example in XML, PHP, Json, Csv, Basic html ]
- ExampleAPI.getDescriptionArray () [ Example in XML, PHP, Json, Csv, Basic html ]
- ExampleAPI.getCompetitionDatatable () [ Example in XML, PHP, Json, Csv, Basic html ]
- ExampleAPI.getMoreInformationAnswerToLife () [ Example in XML, PHP, Json, Csv, Basic html ]
Module Provider
- Provider.getProvider (idSite, period, date) [ Example in XML, PHP, Json, Csv, Basic html , RSS of the last 10 days, 5 weeks, XML of the last 10 days ]Module UsersManager
- UsersManager.setUserPreference (userLogin, preferenceName, preferenceValue) [ No example available ]- UsersManager.getUserPreference (userLogin, preferenceName) [ No example available ]
- UsersManager.getUsers () [ Example in XML, PHP, Json, Csv, Basic html ]
- UsersManager.getUsersLogin () [ Example in XML, PHP, Json, Csv, Basic html ]
- UsersManager.getUsersSitesFromAccess (access) [ Example in XML, PHP, Json, Csv, Basic html ]
- UsersManager.getUsersAccessFromSite (idSite) [ Example in XML, PHP, Json, Csv, Basic html ]
- UsersManager.getSitesAccessFromUser (userLogin) [ Example in XML, PHP, Json, Csv, Basic html ]
- UsersManager.getUser (userLogin) [ Example in XML, PHP, Json, Csv, Basic html ]
- UsersManager.getUserByEmail (userEmail) [ No example available ]
- UsersManager.addUser (userLogin, password, email, alias = '') [ No example available ]
- UsersManager.updateUser (userLogin, password = '', email = '', alias = '') [ No example available ]
- UsersManager.deleteUser (userLogin) [ No example available ]
- UsersManager.userExists (userLogin) [ Example in XML, PHP, Json, Csv, Basic html ]
- UsersManager.userEmailExists (userEmail) [ No example available ]
- UsersManager.setUserAccess (userLogin, access, idSites) [ No example available ]
- UsersManager.getTokenAuth (userLogin, md5Password) [ No example available ]
Module SitesManager
- SitesManager.getJavascriptTag (idSite, piwikUrl = '', actionName = '') [ Example in XML, PHP, Json, Csv, Basic html ]- SitesManager.getSiteFromId (idSite) [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSiteUrlsFromId (idSite) [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getAllSitesId () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSitesWithAdminAccess () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSitesWithViewAccess () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSitesWithAtLeastViewAccess () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSitesIdWithAdminAccess () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSitesIdWithViewAccess () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSitesIdWithAtLeastViewAccess () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getSitesIdFromSiteUrl (url) [ No example available ]
- SitesManager.addSite (siteName, urls, excludedIps = '', excludedQueryParameters = '', timezone = '', currency = '') [ No example available ]
- SitesManager.deleteSite (idSite) [ No example available ]
- SitesManager.addSiteAliasUrls (idSite, urls) [ No example available ]
- SitesManager.setGlobalExcludedIps (excludedIps) [ No example available ]
- SitesManager.getExcludedQueryParametersGlobal () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.setGlobalExcludedQueryParameters (excludedQueryParameters) [ No example available ]
- SitesManager.getExcludedIpsGlobal () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getDefaultCurrency () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.setDefaultCurrency (defaultCurrency) [ No example available ]
- SitesManager.getDefaultTimezone () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.setDefaultTimezone (defaultTimezone) [ No example available ]
- SitesManager.updateSite (idSite, siteName, urls = '', excludedIps = '', excludedQueryParameters = '', timezone = '', currency = '') [ No example available ]
- SitesManager.getCurrencyList () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getCurrencySymbols () [ Example in XML, PHP, Json, Csv, Basic html ]
- SitesManager.getTimezonesList () [ Example in XML, PHP, Json, Csv, Basic html ]