Segment

SegmentSize

Get size of a single Segment using SegmentQL, not saved.

This api is very rate throttled, 1/10 seconds.

# Post a SegmentQL query to size api to fetch size
curl -s -XPOST "https://api.lytics.io/api/segment/size" \
    -H "Content-type: text/plain" \
    -H "Authorization: your_api_token" \
    -d'

FILTER AND (
    visits > 5,
    last_visit >= "now-30d",
    scores.momentum >  10
)

' | jq '.'

post/api/segment/size

Request

  • Base URL
    https://api.lytics.io
  • URL
    https://api.lytics.io/api/segment/size
  • Auth
    API key in header Authorization

Response

OK

Example response

{
  "data": {
    "id": "",
    "name": "active",
    "slug_name": "active",
    "size": 10402
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.