# Traffic by Page

Returns which pages on your website are receiving visits from AI sources (both bot crawlers and user referrals).

## Request

```
GET /v1/traffic/pages
```

### 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": [
    {
      "page": "/products/simatic-s7-1500",
      "title": "Widget Pro X1 | Acme",
      "visits": 2341,
      "uniqueVisitors": 1856,
      "providers": ["OPENAI", "GEMINI", "PERPLEXITY"]
    },
    {
      "page": "/industries/automation",
      "title": "Industrial Automation Solutions | Acme",
      "visits": 1672,
      "uniqueVisitors": 1344,
      "providers": ["OPENAI", "GEMINI"]
    },
    {
      "page": "/about",
      "title": "About Acme",
      "visits": 987,
      "uniqueVisitors": 821,
      "providers": ["PERPLEXITY"]
    }
  ]
}
```

### Fields

| Field            | Type      | Description                                  |
| ---------------- | --------- | -------------------------------------------- |
| `page`           | string    | Page path on your website                    |
| `title`          | string    | Page title                                   |
| `visits`         | integer   | Total visits from AI sources                 |
| `uniqueVisitors` | integer   | Unique visitors from AI sources              |
| `providers`      | string\[] | Which AI providers sent traffic to this page |

## Examples

### curl

```bash
curl "https://app.limy.ai/api/v1/traffic/pages?\
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/pages",
    headers={"X-API-Key": API_KEY},
    params={"start_date": "2026-03-01", "end_date": "2026-03-31"}
)

for page in response.json()['data']:
    print(f"{page['page']}: {page['visits']} visits ({', '.join(page['providers'])})")
```

### JavaScript

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

const { data } = await response.json();
data.forEach(p =>
  console.log(`${p.page}: ${p.visits} visits`)
);
```


---

# 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/pages.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.
