Skip to main content
GET
Get country metrics

Authorizations

x-api-key
string
header
required

A server-side Bily API key created under Settings > AI tools > Access keys. Select the intended workspace before creating it.

Headers

x-bily-organization-id
string

An organization ID returned by GET /context or GET /organizations. Omit it when a scoped key supplies the organization. Otherwise provide it when no organization is selected.

Example:

"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"

Path Parameters

resourceUrl
string
required

The canonical website or Shopify hostname returned by customer context. The hostname determines the resource type.

Example:

"store.example.com"

Query Parameters

startDate
string<date>
required

First date to include, in YYYY-MM-DD format.

endDate
string<date>
required

Last date to include, in YYYY-MM-DD format.

channel
string

Optional normalized channel, such as facebook or google.

adId
string

Filter to one ad ID.

filterCountry
string

Comma-separated country codes.

filterDeviceType
string

Comma-separated device types.

filterOS
string

Comma-separated operating systems.

filterBrowser
string

Comma-separated browser names.

filterProductId
string

Comma-separated product IDs.

dimension_source
enum<string>

Dimension attribution context.

Available options:
conversion,
first_touch

Response

Request completed successfully.

shop
string
required
date
string<date>
required
time
string
required
channel
string
required
country
string
required
region
string
required
conversions
number
required
conv_value
number
required
currency
string | null
visitors
number
sessions
number
customers
number