# Traffic

Returns a summary of bot and user traffic from AI sources visiting your website, including total visits and provider breakdown.

## Request

```
GET /v1/traffic/overview
```

### Query Parameters

| Parameter    | Type              | Required | Default    | Description         |
| ------------ | ----------------- | -------- | ---------- | ------------------- |
| `start_date` | string (ISO 8601) | No       | 7 days ago | Start of date range |
| `end_date`   | string (ISO 8601) | No       | Today      | End of date range   |

## Response

### Success (200 OK)

```json
{
  "success": true,
  "data": {
    "totalBotVisits": 12847,
    "totalUserVisits": 3421,
    "providerBreakdown": [
      {
        "provider": "OPENAI",
        "botVisits": 5234,
        "userVisits": 1456
      },
      {
        "provider": "GEMINI",
        "botVisits": 4123,
        "userVisits": 1089
      },
      {
        "provider": "PERPLEXITY",
        "botVisits": 3490,
        "userVisits": 876
      }
    ]
  }
}
```

### Fields

| Field                            | Type    | Description                                |
| -------------------------------- | ------- | ------------------------------------------ |
| `totalBotVisits`                 | integer | Total AI bot/crawler visits to your site   |
| `totalUserVisits`                | integer | Total user visits from AI search referrals |
| `providerBreakdown`              | array   | Per-provider traffic breakdown             |
| `providerBreakdown[].provider`   | string  | AI provider name                           |
| `providerBreakdown[].botVisits`  | integer | Bot visits from this provider              |
| `providerBreakdown[].userVisits` | integer | User referrals from this provider          |

## Examples

### curl

```bash
curl "https://app.limy.ai/api/v1/traffic/overview?\
start_date=2026-03-01&end_date=2026-03-31" \
  -H "X-API-Key: YOUR_API_KEY"
```

### Python

```python
response = requests.get(
    f"https://app.limy.ai/api/v1/traffic/overview",
    headers={"X-API-Key": API_KEY},
    params={"start_date": "2026-03-01", "end_date": "2026-03-31"}
)

data = response.json()['data']
print(f"Bot visits: {data['totalBotVisits']}, User visits: {data['totalUserVisits']}")

for provider in data['providerBreakdown']:
    print(f"  {provider['provider']}: {provider['botVisits']} bot / {provider['userVisits']} user")
```

### JavaScript

```javascript
const response = await fetch(
  `https://app.limy.ai/api/v1/traffic/overview?start_date=2026-03-01&end_date=2026-03-31`,
  { headers: { 'X-API-Key': API_KEY } }
);

const { data } = await response.json();
console.log(`Bot: ${data.totalBotVisits}, User: ${data.totalUserVisits}`);
data.providerBreakdown.forEach(p =>
  console.log(`  ${p.provider}: ${p.botVisits} bot / ${p.userVisits} user`)
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-reference.limy.ai/analytics/overview-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
