# Analytics actions

> Analytics: 9 Xholic actions (7 read, 2 change), each with its MCP tool, REST endpoint and CLI command.

Source: https://docs.xholic.ai/actions/analytics/

9 actions. Every field marked *Required* must be sent; `account`, `dryRun`, `idempotencyKey`, `confirmCredits` and `quoteId` are the [control fields](/api/responses/#control-fields) every surface adds.

## Analytics

`analytics.summary` · read

Totals and a daily series for a period: impressions, engagement, followers, posts and replies counted separately.

- **MCP tool:** `get_analytics`. Loaded by default in MCP clients.
- **REST:** `GET /v1/analytics/summary`
- **CLI:** `xholic analytics summary`
- **Scope:** `read`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `read`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `range` | "today" \\| "7d" \\| "14d" \\| "30d" \\| "60d" \\| "90d" \\| "180d" \\| "all" | No | Default: `"30d"`. |
| `timezone` | string ≤ 80 chars | No | Default: `"UTC"`. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |

## How posts did

`analytics.content` · read

How the account's posts performed, compared with its normal. Search for one post or sort a period.

- **MCP tool:** `how_did_it_do`. Loaded by default in MCP clients.
- **REST:** `GET /v1/analytics/content`
- **CLI:** `xholic analytics content`
- **Scope:** `read`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `read`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `range` | "today" \\| "7d" \\| "14d" \\| "30d" \\| "60d" \\| "90d" \\| "180d" \\| "all" | No | Default: `"30d"`. |
| `timezone` | string ≤ 80 chars | No | Default: `"UTC"`. |
| `search` | string ≤ 100 chars | No | Default: `""`. |
| `sort` | "publishedAt" \\| "impressions" \\| "engagements" \\| "engagementRate" \\| "likes" \\| "replies" \\| "reposts" \\| "bookmarks" | No | Default: `"impressions"`. |
| `limit` | integer 1–20 | No | Default: `10`. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |

## Growth funnel

`analytics.growth` · read

The follower funnel for the last 7 and 30 days (impressions to profile visits to follows), its weakest step and the profile check score. Stored data only.

- **MCP tool:** `analytics_growth`. Catalog: reach it with `find_actions` and `run_read_action`, or turn on the full toolset.
- **REST:** `GET /v1/analytics/growth`
- **CLI:** `xholic analytics growth`
- **Scope:** `read`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `read`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |

## Analytics sync status

`analytics.import_status` · read

Whether the account's post history is still importing, up to date or delayed, and how far it got.

- **MCP tool:** `analytics_import_status`. Catalog: reach it with `find_actions` and `run_read_action`, or turn on the full toolset.
- **REST:** `GET /v1/analytics/import-status`
- **CLI:** `xholic analytics import-status`
- **Scope:** `read`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `read`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |

## Export post stats (CSV)

`analytics.export_posts_csv` · read

Every post in a period with its numbers as CSV text (up to 5,000 rows). Filters match how_did_it_do.

- **MCP tool:** `analytics_export_posts_csv`. Catalog: reach it with `find_actions` and `run_read_action`, or turn on the full toolset.
- **REST:** `GET /v1/analytics/export-posts-csv`
- **CLI:** `xholic analytics export-posts-csv`
- **Scope:** `read`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `read`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `range` | "today" \\| "7d" \\| "14d" \\| "30d" \\| "60d" \\| "90d" \\| "180d" \\| "all" | No |  |
| `timezone` | string ≤ 100 chars | No | IANA timezone such as America/New_York. Use the user's timezone. |
| `kind` | "ALL" \\| "POST" \\| "REPLY" \\| "REPOST" \\| "QUOTE" | No |  |
| `origin` | "NEURON" \\| "BRAIN" \\| "REMIX" \\| "SCHEDULER" \\| "EXTENSION" \\| "NATIVE_X" \\| "UNKNOWN" or "ALL" | No |  |
| `format` | "TEXT" \\| "IMAGE" \\| "VIDEO" \\| "LINK" \\| "THREAD" \\| "ARTICLE" or "ALL" | No |  |
| `search` | string ≤ 160 chars | No |  |
| `sort` | "publishedAt" \\| "impressions" \\| "engagements" \\| "engagementRate" \\| "likes" \\| "replies" \\| "reposts" \\| "quotes" \\| "bookmarks" \\| "profileClicks" \\| "urlClicks" \\| "followerGain" \\| "bookmarkRate" \\| "replyRate" \\| "shareRate" \\| "firstDayImpressions" \\| "baselineMultiple" | No |  |
| `direction` | "asc" \\| "desc" | No |  |
| `from` | string | No | First day, YYYY-MM-DD; overrides range. |
| `to` | string | No | Last day, YYYY-MM-DD. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |

## Export daily stats (CSV)

`analytics.export_daily_csv` · read

Daily totals for a period (posts, impressions, engagement, follower change) as CSV text.

- **MCP tool:** `analytics_export_daily_csv`. Catalog: reach it with `find_actions` and `run_read_action`, or turn on the full toolset.
- **REST:** `GET /v1/analytics/export-daily-csv`
- **CLI:** `xholic analytics export-daily-csv`
- **Scope:** `read`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `read`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `range` | "today" \\| "7d" \\| "14d" \\| "30d" \\| "60d" \\| "90d" \\| "180d" \\| "all" | No |  |
| `timezone` | string ≤ 100 chars | No | IANA timezone such as America/New_York. Use the user's timezone. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |

## Analytics imports

`analytics.list_imports` · read

X analytics CSV files imported into this account, with the days each one covered.

- **MCP tool:** `analytics_list_imports`. Catalog: reach it with `find_actions` and `run_read_action`, or turn on the full toolset.
- **REST:** `GET /v1/analytics/list-imports`
- **CLI:** `xholic analytics list-imports`
- **Scope:** `read`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `read`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |

## Import X analytics CSV

`analytics.import_csv` · write

Import the account overview CSV exported from X analytics to fill in past days. If the file looks like another account's, it is refused until confirmOwnership is true; ask the user first. Call it only when the user asked for this in the conversation; never on your own initiative.

- **MCP tool:** `analytics_import_csv`. Catalog: reach it with `find_actions` and `run_write_action`, or turn on the full toolset.
- **REST:** `POST /v1/analytics/import-csv`
- **CLI:** `xholic analytics import-csv`
- **Scope:** `write`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `write`
- **Undo:** from the activity log, which runs `analytics.delete_import`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `csv` | string ≤ 200000 chars | Yes | The CSV file's text. |
| `confirmOwnership` | boolean | No |  |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |
| `dryRun` | boolean | No | Return exactly what would happen without doing it. |
| `idempotencyKey` | string ≤ 200 chars | No | A unique key for this write. Repeating a call with the same key returns the first result instead of acting twice. |

## Remove an analytics import

`analytics.delete_import` · write

Remove an imported analytics file and the days it wrote. Call it only when the user asked for this in the conversation; never on your own initiative.

- **MCP tool:** `analytics_delete_import`. Catalog: reach it with `find_actions` and `run_write_action`, or turn on the full toolset.
- **REST:** `POST /v1/analytics/delete-import`
- **CLI:** `xholic analytics delete-import`
- **Scope:** `write`. Destructive: it can't be taken back
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `write`

**Input**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string ≤ 120 chars | Yes | Import id from analytics.list_imports. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |
| `dryRun` | boolean | No | Return exactly what would happen without doing it. |
| `idempotencyKey` | string ≤ 200 chars | No | A unique key for this write. Repeating a call with the same key returns the first result instead of acting twice. |
