Get devices
Visitors by device type: Desktop, Mobile or Tablet. Each row has visitors, pageviews and revenue attributed to sessions that started there.
GET https://usedatasense.com/api/v1/analytics/devices
Permission: analytics:read. MCP tool: datasense_analytics_devices.
Request
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
websiteId |
query | string | With an account token | The website to query. Required with an account token or OAuth connection that can reach several websites; omit with a ds_sk_ website key. |
startAt |
query | string | No | First day of the range, YYYY-MM-DD. Must be sent with endAt. Omit both for all time. |
endAt |
query | string | No | Last day of the range (inclusive), YYYY-MM-DD. Must be sent with startAt. |
timezone |
query | string | No | IANA timezone for the days and buckets, such as America/New_York. Defaults to the website's timezone. |
filter_page |
query | string | No | Only pageviews of this path, such as /pricing. |
filter_referrer |
query | string | No | Only visits from this referrer domain, such as google.com, or Direct. |
filter_campaign |
query | string | No | Only visits with this utm_campaign. |
filter_country |
query | string | No | Only visitors from this ISO country code, such as US. |
filter_region |
query | string | No | Only this region, as CC:Name, such as US:California. |
filter_city |
query | string | No | Only this city, as CC:Name, such as US:San Francisco. |
filter_browser |
query | string | No | Only this browser, such as Chrome. |
filter_os |
query | string | No | Only this operating system, such as iOS. |
filter_device |
query | string | No | Only this device type: Desktop, Mobile or Tablet. |
orderBy |
query | string | No | Rank by visitors, or by attributed revenue (rows with revenue only). One of visitors, revenue. Default visitors. |
limit |
query | integer | No | How many rows to return, up to 1000. Default 10. 1 to 1000. |
sh
curl "https://usedatasense.com/api/v1/analytics/devices?startAt=2026-10-01&endAt=2026-10-26" \
-H "Authorization: Bearer ds_sk_xxx"With an account token, add websiteId:
sh
curl "https://usedatasense.com/api/v1/analytics/devices?websiteId=YOUR_SITE_ID" \
-H "Authorization: Bearer ds_at_xxx"Response
json
{
"status": "success",
"data": { … }
}Errors use the standard error format.