Source: https://usedataowl.com/docs/api/website/goals
Markdown source: https://usedataowl.com/docs/api/website/goals.md
Description: Goals and custom events with completions, unique visitors and conversion rate.

# Get goals

`GET https://usedataowl.com/api/v1/analytics/goals`

Permission: `analytics:read`. MCP tool: `datasense_analytics_goals_breakdown`.

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

```sh
curl "https://usedataowl.com/api/v1/analytics/goals?startAt=2026-10-01&endAt=2026-10-26" \
  -H "Authorization: Bearer ds_sk_xxx"
```

With an account token, add `websiteId`:

```sh
curl "https://usedataowl.com/api/v1/analytics/goals?websiteId=YOUR_SITE_ID" \
  -H "Authorization: Bearer ds_at_xxx"
```

## Response

```json
{
  "status": "success",
  "data": { … }
}
```

Errors use the [standard error format](/docs/api#errors).
