{"openapi":"3.1.0","info":{"title":"Matomo Reporting API for Referrers plugin","version":"1.0.0"},"servers":[{"url":"https:\/\/demo-proxy.innocraft.cloud\/","description":"Current Matomo instance"}],"paths":{"\/index.php?module=API&method=Referrers.get":{"get":{"tags":["Referrers"],"description":"Returns the referrer overview report with distinct referrer counts and percentage metrics.","operationId":"Referrers.get","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"The site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"columns","in":"query","description":"Specific columns to include, or `false` to return all columns.","required":false,"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}],"responses":{"200":{"description":"Referrer overview rows with summary counts and processed percentage metrics.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getReferrerType":{"get":{"tags":["Referrers"],"description":"Returns a report describing visit information for each possible referrer type. The result is a datatable whose subtables are the reports for each parent row's referrer type.","operationId":"Referrers.getReferrerType","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"The site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"typeReferrer","in":"query","description":"Deprecated referrer type filter to restrict the returned rows.","required":false,"schema":{"oneOf":[{"type":"integer"},{"type":"string"}]}},{"name":"idSubtable","in":"query","description":"Referrer type ID to load directly instead of the overview report.","required":false,"schema":{"type":"integer"}},{"name":"expanded","in":"query","description":"`true` to load subtables eagerly, `false` to return only top-level rows.","required":false,"schema":{"type":"boolean","default":false}},{"name":"_setReferrerTypeLabel","in":"query","description":"`true` to replace referrer type IDs with human-readable labels.","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Report rows for each referrer type, or the selected referrer-type subreport.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getAll":{"get":{"tags":["Referrers"],"description":"Returns a flattened report containing all referrer subtables merged into one table.","operationId":"Referrers.getAll","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"The site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Flattened referrer report with subtables merged into the main table.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getKeywords":{"get":{"tags":["Referrers"],"description":"Returns search keywords that brought visits to the requested website.","operationId":"Referrers.getKeywords","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"expanded","in":"query","description":"`true` to load keyword subtables eagerly.","required":false,"schema":{"type":"boolean","default":false}},{"name":"flat","in":"query","description":"`true` to flatten subtables into the main table.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Search keyword rows for the requested period.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getSearchEnginesFromKeywordId":{"get":{"tags":["Referrers"],"description":"Returns the search engines associated with a specific keyword subtable.","operationId":"Referrers.getSearchEnginesFromKeywordId","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"The site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"idSubtable","in":"query","description":"Keyword subtable ID to expand.","required":true,"schema":{"type":"integer","example":2}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Search engine rows for the selected keyword.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getSearchEngines":{"get":{"tags":["Referrers"],"description":"Returns search engines that referred visits to the requested website.","operationId":"Referrers.getSearchEngines","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"expanded","in":"query","description":"`true` to load keyword subtables eagerly.","required":false,"schema":{"type":"boolean","default":false}},{"name":"flat","in":"query","description":"`true` to flatten subtables into the main table.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Search engine rows for the requested period.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getKeywordsFromSearchEngineId":{"get":{"tags":["Referrers"],"description":"Returns keywords for a specific search engine subtable.","operationId":"Referrers.getKeywordsFromSearchEngineId","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"The site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"idSubtable","in":"query","description":"Search engine subtable ID to expand.","required":true,"schema":{"type":"integer","example":2}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Keyword rows for the selected search engine.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getCampaigns":{"get":{"tags":["Referrers"],"description":"Returns campaigns that referred visits to the requested website.","operationId":"Referrers.getCampaigns","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"expanded","in":"query","description":"`true` to load campaign keyword subtables eagerly.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Campaign rows for the requested period.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getKeywordsFromCampaignId":{"get":{"tags":["Referrers"],"description":"Returns campaign keywords for a specific campaign subtable.","operationId":"Referrers.getKeywordsFromCampaignId","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"The site ID to query.","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"idSubtable","in":"query","description":"Campaign subtable ID to expand.","required":true,"schema":{"type":"integer","example":2}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campaign keyword rows for the selected campaign.\n\nExample responses require Super User access. Use Try it out to see a live response."},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getWebsites":{"get":{"tags":["Referrers"],"description":"Returns referring websites for the requested website.","operationId":"Referrers.getWebsites","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"expanded","in":"query","description":"`true` to load URL subtables eagerly.","required":false,"schema":{"type":"boolean","default":false}},{"name":"flat","in":"query","description":"`true` to flatten subtables into the main table.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Referring website rows for the requested period.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getUrlsFromWebsiteId":{"get":{"tags":["Referrers"],"description":"Returns individual referrer URLs for a specific website subtable.","operationId":"Referrers.getUrlsFromWebsiteId","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"idSubtable","in":"query","description":"Website subtable ID to expand.","required":true,"schema":{"type":"integer","example":2}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Referrer URL rows for the selected website.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getSocials":{"get":{"tags":["Referrers"],"description":"Returns report comparing the number of visits and related metrics for social network referrers.","operationId":"Referrers.getSocials","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"expanded","in":"query","description":"`true` to load URL subtables eagerly.","required":false,"schema":{"type":"boolean","default":false}},{"name":"flat","in":"query","description":"`true` to flatten subtables into the main table.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Social network referrer rows for the requested period.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getAIAssistants":{"get":{"tags":["Referrers"],"description":"Returns report comparing the number of visits and related metrics for AI assistant referrers.","operationId":"Referrers.getAIAssistants","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"expanded","in":"query","description":"`true` to load secondary-dimension subtables eagerly.","required":false,"schema":{"type":"boolean","default":false}},{"name":"flat","in":"query","description":"`true` to flatten subtables into the main table.","required":false,"schema":{"type":"boolean","default":false}},{"name":"secondaryDimension","in":"query","description":"Secondary dimension to group AI assistant rows by. Defaults to `entryPageUrl`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"AI assistant referrer rows for the requested period.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getUrlsForSocial":{"get":{"tags":["Referrers"],"description":"Returns report containing individual referrer URLs for a specific social networking site.","operationId":"Referrers.getUrlsForSocial","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"idSubtable","in":"query","description":"This ID does not reference a real DataTable record. Instead, it is the array index of an item in the Socials list file. The urls are filtered by the social network at this index. If null, no filtering is done and every social URL is returned.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Social referrer URL rows for the selected social network.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getEntryPageUrlsForAIAssistant":{"get":{"tags":["Referrers"],"description":"Returns report containing individual entry page URLs for a specific AI assistant.","operationId":"Referrers.getEntryPageUrlsForAIAssistant","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"idSubtable","in":"query","description":"This ID does not reference a real DataTable record. Instead, it is the array index of an item in the AI assistant list file. The urls are filtered by the AI assistant at this index. If null, no filtering is done and every AI assistant URL is returned.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Entry page URL rows for the selected AI assistant.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getEntryPageTitlesForAIAssistant":{"get":{"tags":["Referrers"],"description":"Returns report containing individual entry page names for a specific AI assistant.","operationId":"Referrers.getEntryPageTitlesForAIAssistant","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}},{"name":"idSubtable","in":"query","description":"This ID does not reference a real DataTable record. Instead, it is the array index of an item in the AI assistant list file. The titles are filtered by the AI assistant at this index. If null, no filtering is done and every AI assistant title is returned.","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Entry page title rows for the selected AI assistant.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getNumberOfDistinctSearchEngines":{"get":{"tags":["Referrers"],"description":"Returns the number of distinct search engines in the requested period.","operationId":"Referrers.getNumberOfDistinctSearchEngines","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Numeric archive result containing the number of distinct search engines.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getNumberOfDistinctSocialNetworks":{"get":{"tags":["Referrers"],"description":"Returns the number of distinct social networks in the requested period.","operationId":"Referrers.getNumberOfDistinctSocialNetworks","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Numeric archive result containing the number of distinct social networks.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getNumberOfDistinctKeywords":{"get":{"tags":["Referrers"],"description":"Returns the number of distinct search keywords in the requested period.","operationId":"Referrers.getNumberOfDistinctKeywords","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Numeric archive result containing the number of distinct keywords.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getNumberOfDistinctCampaigns":{"get":{"tags":["Referrers"],"description":"Returns the number of distinct campaigns in the requested period.","operationId":"Referrers.getNumberOfDistinctCampaigns","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Numeric archive result containing the number of distinct campaigns.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getNumberOfDistinctWebsites":{"get":{"tags":["Referrers"],"description":"Returns the number of distinct referring websites in the requested period.","operationId":"Referrers.getNumberOfDistinctWebsites","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Numeric archive result containing the number of distinct referring websites.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getNumberOfDistinctAIAssistants":{"get":{"tags":["Referrers"],"description":"Returns the number of distinct AI assistants in the requested period.","operationId":"Referrers.getNumberOfDistinctAIAssistants","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Numeric archive result containing the number of distinct AI assistants.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}},"\/index.php?module=API&method=Referrers.getNumberOfDistinctWebsitesUrls":{"get":{"tags":["Referrers"],"description":"Returns the number of distinct referrer URLs in the requested period.","operationId":"Referrers.getNumberOfDistinctWebsitesUrls","parameters":[{"$ref":"#\/components\/parameters\/formatOptional"},{"name":"idSite","in":"query","description":"Website ID(s) to query. - Single site ID (e.g. 1) - Multiple site IDs (e.g. [1, 4, 5]) - Comma-separated list (\"1,4,5\") or \"all\"","required":true,"schema":{"oneOf":[{"type":"integer","example":1},{"type":"string","example":"1"},{"type":"array","items":{"type":"integer"},"example":1}]}},{"name":"period","in":"query","description":"The period to process, processes data for the period containing the specified date.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},{"name":"date","in":"query","description":"The date or date range to process. 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).","required":true,"schema":{"type":"string","example":"yesterday"}},{"name":"segment","in":"query","description":"Custom segment to filter the report. Example: \"referrerName==example.com\" Supports AND (;) and OR (,) operators.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Numeric archive result containing the number of distinct referrer URLs.\n\nExample responses require Super User access. Use Try it out to see a live response.","content":{"text\/xml":[],"application\/json":[],"application\/vnd.ms-excel":[]}},"400":{"$ref":"#\/components\/responses\/BadRequest"},"401":{"$ref":"#\/components\/responses\/Unauthorized"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"404":{"$ref":"#\/components\/responses\/NotFound"},"500":{"$ref":"#\/components\/responses\/ServerError"},"default":{"$ref":"#\/components\/responses\/DefaultError"}}}}},"components":{"schemas":{"GenericSuccess":{"description":"Generic Matomo success payload.","required":["result","message"],"properties":{"result":{"type":"string","example":"success"},"message":{"type":"string","example":"ok"},"code":{"type":"integer","example":"200"}},"type":"object","example":{"result":"success","message":"ok"},"additionalProperties":true},"GenericSuccessXml":{"description":"Generic Matomo success payload in XML.","required":["success"],"properties":{"success":{"properties":{"message":{"type":"string","xml":{"attribute":true},"example":"ok"}},"type":"object","xml":{"name":"success"}}},"type":"object","xml":{"name":"result"},"example":{"success":{"message":"ok"}},"additionalProperties":true},"Error":{"description":"Generic Matomo error payload.","required":["result","message"],"properties":{"result":{"type":"string","example":"error"},"message":{"type":"string","example":"There was an error"},"code":{"type":"integer"}},"type":"object","additionalProperties":true},"ErrorXml":{"description":"Generic Matomo error payload in XML.","properties":{"error":{"properties":{"message":{"type":"string","xml":{"attribute":true},"example":"There was an error"}},"type":"object","xml":{"name":"error"}}},"type":"object","xml":{"name":"result"}}},"responses":{"BadRequest":{"description":"Bad request (validation or missing parameters).","content":{"text\/plain":{"schema":{"type":"string"},"example":"Error: There was an error."},"text\/html":{"schema":{"type":"string"},"example":"There was an error."},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/ErrorXml"}}}},"Unauthorized":{"description":"Authentication failed or missing token.","content":{"text\/plain":{"schema":{"type":"string"},"example":"Error: You must be logged in to access this functionality."},"text\/html":{"schema":{"type":"string"},"example":"You must be logged in to access this functionality."},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/ErrorXml"}}}},"Forbidden":{"description":"Authenticated but not allowed to access the resource.","content":{"text\/plain":{"schema":{"type":"string"},"example":"Error: Not authorised."},"text\/html":{"schema":{"type":"string"},"example":"Not authorised."},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/ErrorXml"}}}},"NotFound":{"description":"Resource not found.","content":{"text\/plain":{"schema":{"type":"string"},"example":"Error: The method is not available."},"text\/html":{"schema":{"type":"string"},"example":"The method is not available."},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/ErrorXml"}}}},"ServerError":{"description":"Unexpected server error.","content":{"text\/plain":{"schema":{"type":"string"},"example":"Error: There was an error."},"text\/html":{"schema":{"type":"string"},"example":"There was an error."},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/ErrorXml"}}}},"DefaultError":{"description":"Default error response (any non-2xx).","content":{"text\/plain":{"schema":{"type":"string"},"example":"Error: There was an error."},"text\/html":{"schema":{"type":"string"},"example":"There was an error."},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/ErrorXml"}}}},"GenericSuccessNoBody":{"description":"Generic 200 response with no body"},"GenericSuccess":{"description":"Generic 200 response","content":{"text\/plain":{"schema":{"type":"string"},"example":"Success:ok"},"text\/html":{"schema":{"type":"string"},"example":""},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GenericSuccess"}},"application\/xml":{"schema":{"$ref":"#\/components\/schemas\/GenericSuccessXml"}}}},"GenericString":{"description":"Generic 200 response with only a string body","content":{"text\/plain":{"schema":{"type":"string"},"example":"Result: success"},"text\/html":{"schema":{"type":"string"},"example":"success"},"application\/json":{"schema":{"type":"string"}},"application\/xml":{"schema":{"type":"string"}}}},"GenericBoolean":{"description":"Generic 200 response with only true or false as the body","content":{"text\/plain":{"schema":{"type":"boolean"}},"text\/html":{"schema":{"type":"boolean"}},"application\/json":{"schema":{"type":"boolean"}},"application\/xml":{"schema":{"type":"boolean"}}}},"GenericInteger":{"description":"Generic 200 response with only an integer as the body","content":{"text\/plain":{"schema":{"type":"integer"}},"text\/html":{"schema":{"type":"integer"}},"application\/json":{"schema":{"type":"integer"}},"application\/xml":{"schema":{"type":"integer"}}}},"GenericArray":{"description":"Generic 200 response with array body","content":{"text\/plain":{"schema":{"type":"string"}},"text\/html":{"schema":{"type":"string"}},"application\/json":{"schema":{"type":"array","items":[]}},"application\/xml":{"schema":{"type":"array","items":[]}}}}},"parameters":{"moduleRequired":{"name":"module","in":"query","description":"Always `API` for Reporting API requests.","required":true,"schema":{"type":"string","default":"API"}},"methodRequired":{"name":"method","in":"query","description":"API method, e.g. `VisitsSummary.get` or `CustomAlerts.getAlert`.","required":true,"schema":{"type":"string","example":"CustomAlerts.getAlert"}},"formatRequired":{"name":"format","in":"query","description":"Response format such as `xml` or `json`. Use `original` to get the original PHP data structure.","required":true,"schema":{"type":"string","default":"xml","enum":["xml","json","csv","tsv","html","rss","original"]}},"formatOptional":{"name":"format","in":"query","description":"Response format. Defaults to `xml`. Use `original` to get the original PHP data structure.","required":false,"schema":{"type":"string","default":"xml","enum":["xml","json","csv","tsv","html","rss","original"]}},"idSiteRequired":{"name":"idSite","in":"query","description":"Matomo site ID.","required":true,"schema":{"type":"integer","example":1}},"idSiteOptional":{"name":"idSite","in":"query","description":"Matomo site ID.","required":false,"schema":{"type":"integer","example":1}},"periodRequired":{"name":"period","in":"query","description":"Reporting period.","required":true,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},"periodOptional":{"name":"period","in":"query","description":"Reporting period.","required":false,"schema":{"type":"string","enum":["day","week","month","year","range"],"example":"day"}},"dateRequired":{"name":"date","in":"query","description":"Date or range (e.g. `2025-08-01`, `yesterday`, `last30`, or `2025-08-01,2025-08-11`).","required":true,"schema":{"type":"string","example":"today"}},"dateOptional":{"name":"date","in":"query","description":"Date or range (e.g. `2025-08-01`, `yesterday`, `last30`, or `2025-08-01,2025-08-11`).","required":false,"schema":{"type":"string","example":"today"}},"segmentRequired":{"name":"segment","in":"query","description":"Segment expression; see `API.getSegmentDimensionMetadata`.","required":true,"schema":{"type":"string"}},"segmentOptional":{"name":"segment","in":"query","description":"Segment expression; see `API.getSegmentDimensionMetadata`.","required":false,"schema":{"type":"string"}},"expandedOptional":{"name":"expanded","in":"query","description":"If true, loads all subtables.","required":false,"schema":{"type":"integer","default":0,"enum":[0,1],"example":0}},"idSubtableOptional":{"name":"idSubtable","in":"query","description":"An in-database subtable ID.","required":false,"schema":{"type":"integer"}},"idSubtableRequired":{"name":"idSubtable","in":"query","description":"An in-database subtable ID.","required":true,"schema":{"type":"integer"}},"flatOptional":{"name":"flat","in":"query","description":"Flatten subtables into the parent table.","required":false,"schema":{"type":"integer","enum":[0,1],"example":0}},"filter_patternOptional":{"name":"filter_pattern","in":"query","description":"Regex to keep matching rows.","required":false,"schema":{"type":"string"}},"filter_columnOptional":{"name":"filter_column","in":"query","description":"Column to apply the regex to (e.g., `label`).","required":false,"schema":{"type":"string","example":"label"}},"filter_pattern_recursiveOptional":{"name":"filter_pattern_recursive","in":"query","description":"Recursive regex filter.","required":false,"schema":{"type":"string"}},"filter_column_recursiveOptional":{"name":"filter_column_recursive","in":"query","description":"Column for the recursive regex filter.","required":false,"schema":{"type":"string"}},"filter_excludelowpopOptional":{"name":"filter_excludelowpop","in":"query","description":"Column to threshold and exclude low values.","required":false,"schema":{"type":"string"}},"filter_excludelowpop_valueOptional":{"name":"filter_excludelowpop_value","in":"query","description":"Minimum value threshold for `filter_excludelowpop`.","required":false,"schema":{"type":"number","example":0}},"filter_sort_columnOptional":{"name":"filter_sort_column","in":"query","description":"Column to sort by.","required":false,"schema":{"type":"string"}},"filter_sort_orderOptional":{"name":"filter_sort_order","in":"query","description":"Sort direction.","required":false,"schema":{"type":"string","enum":["asc","desc"],"example":"desc"}},"filter_truncateOptional":{"name":"filter_truncate","in":"query","description":"Row index after which rows are removed.","required":false,"schema":{"type":"integer"}},"filter_limitOptional":{"name":"filter_limit","in":"query","description":"Maximum number of rows to return.","required":false,"schema":{"type":"integer"}},"filter_offsetOptional":{"name":"filter_offset","in":"query","description":"Row offset.","required":false,"schema":{"type":"integer"}},"keep_summary_rowOptional":{"name":"keep_summary_row","in":"query","description":"Keep the summary row.","required":false,"schema":{"type":"integer","enum":[0,1],"example":1}},"disable_generic_filtersOptional":{"name":"disable_generic_filters","in":"query","description":"Disable generic filters (those above).","required":false,"schema":{"type":"integer","enum":[0,1],"example":0}},"disable_queued_filtersOptional":{"name":"disable_queued_filters","in":"query","description":"Skip queued filters.","required":false,"schema":{"type":"integer","enum":[0,1],"example":0}},"hideColumnsOptional":{"name":"hideColumns","in":"query","description":"Comma-separated list of columns to hide.","required":false,"schema":{"type":"string"}},"showColumnsOptional":{"name":"showColumns","in":"query","description":"Comma-separated list of columns to include.","required":false,"schema":{"type":"string"}},"labelOptional":{"name":"label","in":"query","description":"Keep only rows with these label(s). Supports path via '>' and arrays.","required":false,"schema":{"type":"string"}},"idGoalRequired":{"name":"idGoal","in":"query","description":"The ID of a configured goal.","required":true,"schema":{"type":"integer"}},"idGoalOptional":{"name":"idGoal","in":"query","description":"The ID of a configured goal.","required":false,"schema":{"type":"integer"}}},"securitySchemes":{"MatomoToken":{"type":"http","description":"Paste your token generated from Personal > Security. Swagger will send it as a Bearer token.","scheme":"bearer"}}},"security":[{"MatomoToken":[]}],"tags":[{"name":"Referrers","description":"The Referrers API lets you access reports about websites, search engines, keywords, social networks, AI assistants, and campaigns used to access your website. For example, \"getKeywords\" returns all search engine keywords (with general analytics metrics<\/a> for each keyword), \"getWebsites\" returns referrer websites (along with the full Referrer URL if the parameter &expanded=1 is set). \"getReferrerType\" returns the Referrer overview report. \"getCampaigns\" returns the list of all campaigns (and all campaign keywords if the parameter &expanded=1 is set). \"getSocials\" returns social network referrers, and \"getAIAssistants\" returns AI assistant referrers."}],"externalDocs":{"description":"Matomo Reporting API developer page","url":"https:\/\/developer.matomo.org\/api-reference\/reporting-api\/"}}