Skip to main content
The mint analytics command gives you access to your documentation analytics from the terminal. This is useful for scripting analytics reports, piping data into other tools, and quick checks without opening the dashboard.

Prerequisites

You must log in to use analytics commands. Run mint login to authenticate with your Mintlify account. See Preview locally for details on authentication.

View key metrics

Display a summary of views, visitors, searches, feedback, and assistant usage:
Use flags to filter by date range or page:
  • --from: Start date in YYYY-MM-DD format. Defaults to 7 days ago.
  • --to: End date in YYYY-MM-DD format. Defaults to today.
  • --page: Filter to a specific page path.
Example analytics stats flags

View search analytics

See what your users are searching for, with hit counts and click-through rates:
Use flags to filter by query string or page:
  • --query: Filter by search query substring.
  • --page: Filter to a specific page path.
Example analytics search flags

View feedback

Review feedback submitted by users on your documentation pages:
Use flags to aggregate feedback by page, or filter to code snippet feedback:
  • --type: Aggregate feedback by page or code snippet. Defaults to page.
  • --page: Filter to a specific page path.
Example analytics feedback flags

View assistant conversations

List recent conversations and conversation category buckets from the AI assistant:
Each list output includes an ID for each entry. Pass that ID to the corresponding view command to see full details:

Choose an output format

All analytics commands default to plain output, which is tab-separated and suitable for piping to other tools. Use --format to change the output:
The CLI automatically detects AI agent environments like Claude Code or non-interactive terminals and defaults to JSON output.

Set defaults with config

To avoid repeating common flags, set defaults with mint config. The configuration saves in ~/.config/mintlify/config.json. When you run mint login, the CLI sets the subdomain key. If you have multiple deployments, the CLI prompts you to choose one. You can override the default at any time with mint config set subdomain <subdomain>. Available configuration keys:
Example configs
Once set, analytics commands use these values automatically:
To view or clear a value, run: