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

# Devices

> Returns visitor breakdown by device type, browser, and operating system — all in a single response.

**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.

## Response

**period** `string`

Resolved reporting period.

**devices\[].name** `string`

Device type such as Mobile, Desktop, Tablet, or Unknown.

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

Unique visitors for that device type.

**browsers\[].name** `string`

Browser name.

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

Unique visitors for that browser.

**os\[].name** `string`

Operating system name.

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

Unique visitors for that operating system.

## 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/devices?period=30d", {
  headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})

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

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

```json 200 theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
{
  "period": "30d",
  "devices": [
    { "name": "Mobile", "visitors": 28 },
    { "name": "Desktop", "visitors": 7 }
  ],
  "browsers": [
    { "name": "Chrome", "visitors": 18 },
    { "name": "Safari", "visitors": 12 },
    { "name": "Firefox", "visitors": 5 }
  ],
  "os": [
    { "name": "Android", "visitors": 16 },
    { "name": "iOS", "visitors": 11 },
    { "name": "Windows", "visitors": 5 }
  ]
}
```


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