# AI assistants and crawlers

> Visitors from ChatGPT, Perplexity, Claude and Gemini, and which AI crawlers read your pages.

More and more people ask an AI assistant instead of searching. Okidoki shows which assistants send you visitors, and, if your server reports them, which AI crawlers read your pages. You find it in your dashboard under **Reports**, as **Does AI send people here?**

## Assistants

When an answer in an AI assistant links to your site and someone clicks, the visit comes from the assistant's site. Okidoki recognises these:

| Assistant | Recognised from |
| --- | --- |
| ChatGPT | chatgpt.com, chat.openai.com |
| Perplexity | perplexity.ai |
| Claude | claude.ai |
| Gemini | gemini.google.com |
| Copilot | copilot.microsoft.com |
| Meta AI | meta.ai |
| Grok | grok.com |
| DeepSeek | chat.deepseek.com |
| Mistral | chat.mistral.ai |
| Other AI | you.com, phind.com |

These visits are in the channel **AI assistants**, so you can filter every report by it. See [Sources and channels](https://docs.okidoki.sh/reports/sources).

Okidoki cannot see what someone asked the assistant. Some assistant apps send no referrer at all, and those visits show up as direct.

## AI crawlers

AI companies also send crawlers that read your pages, to train models, to build a search index, or to answer someone right now. Crawlers do not run JavaScript, so the Okidoki script never sees them. Your site's own server can report them with one request each.

```text title="Report an AI crawler"
POST https://okidoki.sh/api/event
{"k":"ok_your_site_key","t":"b","p":"/pricing","a":"<the request's user agent>"}
```

Send the body as plain text or JSON. Okidoki keeps only the crawler's name and the path. A request from anything that is not a known AI crawler is dropped.

In Next.js middleware it looks like this:

```ts title="middleware.ts"
import { NextResponse, type NextFetchEvent, type NextRequest } from 'next/server';

const AI_CRAWLERS = /GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|Claude-SearchBot|PerplexityBot|Perplexity-User|Google-Extended|Bytespider|CCBot|meta-external/i;

export function middleware(req: NextRequest, event: NextFetchEvent) {
  const ua = req.headers.get('user-agent') ?? '';
  if (AI_CRAWLERS.test(ua)) {
    event.waitUntil(
      fetch('https://okidoki.sh/api/event', {
        method: 'POST',
        body: JSON.stringify({ k: 'ok_your_site_key', t: 'b', p: req.nextUrl.pathname, a: ua }),
      }),
    );
  }
  return NextResponse.next();
}
```

> [!TIP]
> An agent can add this for you. Ask it to *report AI crawlers to Okidoki*; the instructions are in [llms.txt](https://okidoki.sh/llms.txt).

The crawlers Okidoki knows:

| Crawler | Company | Reads pages for |
| --- | --- | --- |
| `GPTBot` | OpenAI | Training |
| `OAI-SearchBot` | OpenAI | Search |
| `ChatGPT-User` | OpenAI | Answer now |
| `ClaudeBot` | Anthropic | Training |
| `Claude-SearchBot` | Anthropic | Search |
| `Claude-User` | Anthropic | Answer now |
| `PerplexityBot` | Perplexity | Search |
| `Perplexity-User` | Perplexity | Answer now |
| `Google-Extended` | Google | Training |
| `Gemini-Deep-Research` | Google | Answer now |
| `Applebot-Extended` | Apple | Training |
| `Meta-ExternalAgent` | Meta | Training |
| `Meta-ExternalFetcher` | Meta | Answer now |
| `Bytespider` | ByteDance | Training |
| `CCBot` | Common Crawl | Training |
| `MistralAI-User` | Mistral | Answer now |
| `DuckAssistBot` | DuckDuckGo | Answer now |
| `Amazonbot` | Amazon | Search |

**Training** crawlers collect pages to train models. **Search** crawlers build an index for AI search. **Answer now** crawlers fetch a page because someone asked about it right now.

Crawler requests are never counted as visitors or page views. They only show up in this list.

## For agents

The [sources report](https://docs.okidoki.sh/api/reference#reports) has `ai_assistants` (visitors per assistant) and `ai_crawlers` (fetches per crawler, with owner and purpose).

