> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptingcompany.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI traffic

> See which AI bots visit your site, which pages they read, and how that traffic changes, from the TPC CLI.

# AI traffic

`tpc ai-traffic` reports AI bot visits to a product's website: totals over time, the most active bots, the most crawled pages, per-path breakdowns, and recent crawl activity. Every command is read-only. Pass `--scope <org-slug>/<product-slug>` to select the product.

```bash theme={null}
tpc ai-traffic summary --scope pro-org/my-product --period 30d --compare
tpc ai-traffic top-bots --scope pro-org/my-product --period 7d
tpc ai-traffic top-pages --scope pro-org/my-product --period 30d --provider openai
tpc ai-traffic activity --scope pro-org/my-product --since 24h
```

For share of voice and citations in AI answers, see [Analytics](https://docs.promptingcompany.com/cli/commands/analytics.md).

## Date windows

Every command except `activity` takes a date window:

* `--period 7d`, `30d`, `90d`, `180d`, or `365d` for a window ending today (UTC).
* `--start` and `--end` with ISO dates (`2026-01-01`) for a fixed range. Pass both, and don't combine them with `--period`.

With no date flags, commands cover the last 30 days.

## Filter by AI provider

`summary`, `trends`, `top-pages`, `paths`, `breakdown`, and `activity` take `--provider`. Pass a comma-separated list or repeat the flag; values are case-insensitive.

| Value | Matches |
| - | - |
| `openai` | All OpenAI bots. `gptbot`, `chatgpt`, and `oai-searchbot` pick one. |
| `anthropic` or `claude` | All Anthropic bots. `claudebot` and `claude-user` pick one. |
| `perplexity` | Both Perplexity bots. `perplexitybot` and `perplexity-user` pick one. |
| `gemini`, `google`, `deepseek` | Google Gemini user traffic, Google's foundation-model crawler, and DeepSeek. |

Any other value must match a provider name exactly as `top-bots` prints it. On `activity`, `--provider` keeps rows whose provider names contain the value.

## Summary

```bash theme={null}
tpc ai-traffic summary --scope pro-org/my-product --period 90d --granularity week
tpc ai-traffic summary --scope pro-org/my-product --period 30d --category inference
tpc ai-traffic summary --scope pro-org/my-product --period 30d --compare
```

Prints visits, unique IPs, and unique pages per `--granularity` bucket (`day`, the default, `week`, or `month`). `--category` keeps one traffic category: `inference`, `pre-training`, `crawlers`, `virtual-browser`, or `unknown`. `--compare` replaces the table with the total for the window, the total for the previous window of the same length, and the change.

## Trends

```bash theme={null}
tpc ai-traffic trends --scope pro-org/my-product --period 90d --granularity week
tpc ai-traffic trends --scope pro-org/my-product --period 30d --provider openai --compare wow
```

Prints visits per bucket and provider. `--compare wow` or `--compare mom` adds the value from a week or a month earlier and the change.

## Top bots and top pages

```bash theme={null}
tpc ai-traffic top-bots --scope pro-org/my-product --period 30d --bot GPTBot
tpc ai-traffic top-pages --scope pro-org/my-product --period 30d --sort recency --page-size 50
```

`top-bots` ranks providers by visits, with each one's category. `--bot` keeps providers whose name contains the text. `--page` and `--page-size` paginate (up to 100 per page).

`top-pages` ranks pages by visits, with each page's title, domain, and number of distinct bot providers. `--sort recency` orders by the latest visit instead, `--path` keeps pages under a path prefix, and `--page` and `--page-size` paginate (up to 1,000 per page). With `--provider`, `--path`, or `--sort recency`, the CLI works from the 1,000 most-visited pages.

## Paths

```bash theme={null}
tpc ai-traffic paths --scope pro-org/my-product --period 30d --path /blog
tpc ai-traffic paths --scope pro-org/my-product --period 30d --path '/blog/*'
```

Prints one row per page path and provider, most visits first. `--path /blog` keeps `/blog` and every page under it. End the prefix with `*` to merge those pages into one row per provider.

## Breakdown

```bash theme={null}
tpc ai-traffic breakdown --scope pro-org/my-product --period 30d --by provider
tpc ai-traffic breakdown --scope pro-org/my-product --period 30d --by category
tpc ai-traffic breakdown --scope pro-org/my-product --period 30d --by category --categories /blog,/docs,/api
```

Prints visits and share of total for each provider (`--by provider`, the default) or each page category (`--by category`). Categories are the first path segment, such as `/blog`, unless you pass `--categories`; then each page goes to the first matching prefix and the rest go to `other`.

## Recent activity

```bash theme={null}
tpc ai-traffic activity --scope pro-org/my-product --limit 25
tpc ai-traffic activity --scope pro-org/my-product --since 7d --path /docs --provider anthropic
tpc ai-traffic activity --scope pro-org/my-product --limit 25 --offset 25
```

Prints the most recently crawled paths with their visit counts, the providers seen on each, and the last visit time. `--limit` (default 50, up to 1,000) and `--offset` page through the results. `--since` (`1h`, `6h`, `12h`, `24h`, `7d`, `30d`, or `90d`), `--provider`, and `--path` filter the rows on the page you fetched, so a filtered page can hold fewer than `--limit` rows.

## Filter by path on summary, trends, and breakdown

On `summary`, `trends`, and `breakdown --by provider`, `--path` keeps the days on which a matching page appears in the sampled top paths. The visit counts still cover every page on those days. For per-page counts, use `top-pages`, `paths`, or `breakdown --by category`.

## Output formats

Every `ai-traffic` command accepts `--format text` (the default), `--format json`, or `--format csv`. JSON and CSV rows include the product slug and, except on `activity`, the date window.

```bash theme={null}
tpc ai-traffic trends --scope pro-org/my-product --period 90d --granularity week --format csv > ai-traffic.csv
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.