Docs·Workspace

GET/api/v1/spreelytics/meta/property-count

Count a property

Returns how much data sits behind one property: the number the report builder shows under a property it describes. Event and visit properties are counted over the last 90 days; a segment is counted over all time.

Every role can call it, Viewer included.

Keys: an account key or an audience key. Getting started explains both kinds.

Parameters

PropInTypeNotes
contactListIdquerystringThe audience id, a UUID. With an audience key it must be that key's own audience.
namequerystringRequired. The property, named the way filters name it: a standard property such as country or utm_source, profile. plus an attribute for a person attribute, a custom event property key, or cohort: plus a segment id. An unknown segment id answers 400, as does a custom name with characters other than letters, digits, _, . and -.
event?querystringOptional, for a custom property only: count only this event's rows that carry the key. page_view works too.

Response

PropTypeNotes
countnumberEvents that carry a non-empty value, for an event property or a custom one. Visits, for a property of the visit such as country, browser or entry_page. Distinct people seen, for a person attribute (for profile.identified, everyone seen). Members, for a segment.

Request

curl 'https://app.spreelytics.com/api/v1/spreelytics/meta/property-count?contactListId=…&name=…' \
  -H 'Authorization: Bearer YOUR_API_KEY'
const url = new URL('https://app.spreelytics.com/api/v1/spreelytics/meta/property-count');
url.searchParams.set('contactListId', '…');
url.searchParams.set('name', '…');

const res = await fetch(url, {
  headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
const data = await res.json();
import requests

res = requests.get(
    "https://app.spreelytics.com/api/v1/spreelytics/meta/property-count",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"contactListId": "…", "name": "…"},
)
data = res.json()

Response

{
  "count": 0
}

See your own numbers today.

Free up to 100k events a month · no credit card

Contact

Tell us what you need.

A real person reads these. We usually reply within one working day.

Or email us directly at contact@spreelytics.com.