Matomo Reporting API (index.php entrypoint)

The single /index.php dispatch entrypoint through which every Matomo Reporting API method is invoked, by supplying module=API and method=Module.Action. This entry documents the entrypoint contract itself — the shared parameters (idSite, period, date, segment, format, token_auth) and the bulk-request form — rather than any one module. The per-module contracts are the 59 OpenAPI documents generated by Matomo's own ApiReference plugin.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/matomo-index-php-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

matomo-index-php-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Matomo Reporting Index.php API
  version: v1
  description: 'Programmatic access to Matomo analytics reports. All Reporting API calls

    are dispatched through a single `/index.php` entrypoint by supplying

    `module=API` and a `method=Module.MethodName` query parameter. The API

    exposes 200+ methods across modules like VisitsSummary, Actions,

    Referrers, UserCountry, DevicesDetection, and Goals.

    '
  contact:
    name: Matomo Developer Documentation
    url: https://developer.matomo.org/api-reference/reporting-api
servers:
- url: https://{matomo_host}
  description: Your Matomo instance (self-hosted or Matomo Cloud)
  variables:
    matomo_host:
      default: demo.matomo.cloud
security:
- TokenAuth: []
tags:
- name: Index.php
paths:
  /index.php:
    get:
      summary: Invoke a Matomo Reporting API method
      operationId: callReportingApi
      description: 'All Matomo Reporting API methods are invoked via this single

        endpoint by passing `module=API` and the `method` parameter

        (for example `VisitsSummary.get` or `Actions.getPageUrls`).

        '
      parameters:
      - $ref: '#/components/parameters/Module'
      - $ref: '#/components/parameters/Method'
      - $ref: '#/components/parameters/IdSite'
      - $ref: '#/components/parameters/Period'
      - $ref: '#/components/parameters/Date'
      - $ref: '#/components/parameters/Format'
      - $ref: '#/components/parameters/Segment'
      - $ref: '#/components/parameters/TokenAuth'
      responses:
        '200':
          description: Report data in the requested format.
      tags:
      - Index.php
    post:
      summary: Invoke a Matomo Reporting API method (POST, recommended for token in body)
      operationId: callReportingApiPost
      parameters:
      - $ref: '#/components/parameters/Module'
      - $ref: '#/components/parameters/Method'
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                idSite:
                  type: string
                period:
                  type: string
                  enum:
                  - day
                  - week
                  - month
                  - year
                  - range
                date:
                  type: string
                format:
                  type: string
                  enum:
                  - xml
                  - json
                  - csv
                  - tsv
                  - html
                  - rss
                segment:
                  type: string
                token_auth:
                  type: string
                  description: Auth token (recommended in POST body for security).
                urls:
                  type: array
                  items:
                    type: string
                  description: 'URL-encoded sub-requests when using

                    `method=API.getBulkRequest`.

                    '
      responses:
        '200':
          description: Report data in the requested format.
      tags:
      - Index.php
components:
  parameters:
    Segment:
      in: query
      name: segment
      required: false
      schema:
        type: string
    Method:
      in: query
      name: method
      required: true
      schema:
        type: string
      description: '`Module.MethodName`, for example `VisitsSummary.get`,

        `Actions.getPageUrls`, `Referrers.getKeywords`,

        `UserCountry.getCountry`, `API.getBulkRequest`.

        '
    Format:
      in: query
      name: format
      required: false
      schema:
        type: string
        enum:
        - xml
        - json
        - csv
        - tsv
        - html
        - rss
        default: xml
    IdSite:
      in: query
      name: idSite
      required: false
      schema:
        type: string
      description: Site ID (or comma-separated list / `all`).
    Date:
      in: query
      name: date
      required: false
      schema:
        type: string
      description: Date in YYYY-MM-DD or magic keywords (today, yesterday, lastWeek).
    TokenAuth:
      in: query
      name: token_auth
      required: false
      schema:
        type: string
      description: 'Matomo auth token. Prefer passing in POST body for security.

        '
    Module:
      in: query
      name: module
      required: true
      schema:
        type: string
        enum:
        - API
    Period:
      in: query
      name: period
      required: false
      schema:
        type: string
        enum:
        - day
        - week
        - month
        - year
        - range
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: query
      name: token_auth
      description: 'Matomo auth token created in Administration > Personal > Security >

        Auth tokens. May be passed as a query parameter or, preferably, in

        the POST body.

        '