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

# Referrers

> Returns traffic sources ranked by pageviews. Direct traffic (no referrer) is returned as (direct).

**domain** `string` *required*

Your project's domain, e.g. `example.com`.

**period** `string`

Time period. See Periods on [Account API](https://www.openrevenue.com/docs/api/account-api.md#periods) page. Defaults to 30d.

**limit** `integer`

Max results to return. Maximum 100, default 10.

## Response

**period** `string`

Resolved reporting period.

**data\[].referrer** `string`

Referrer URL or (direct).

**data\[].pageviews** `number`

Pageviews from the referrer.

**data\[].visitors** `number`

Unique visitors from the referrer.

## Errors

| Status | Error | Description |
| - | - | - |
| `401` | `Invalid or missing API key` | The Authorization header is missing or the Bearer token is invalid. |
| `404` | `Project not found` | No project with that domain exists for the authenticated user. |

```javascript JavaScript theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/referrers?period=30d", {
  headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})

const referrers = await res.json()
```

```bash cURL theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
curl "https://api.openrevenue.com/api/v1/projects/example.com/referrers?period=30d" \
  -H "Authorization: Bearer openrevenue_your_key"
```

```json 200 theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
{
  "period": "30d",
  "data": [
    { "referrer": "(direct)", "pageviews": 62, "visitors": 20 },
    { "referrer": "https://l.instagram.com/", "pageviews": 19, "visitors": 18 },
    { "referrer": "https://www.google.com/", "pageviews": 7, "visitors": 5 }
  ]
}
```


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