---
title: "SegmentSize"
method: POST
path: "/api/segment/size"
tags: ["Segment"]
---

# SegmentSize

`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`

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

```

## Response `200`

OK

- SegmentSizeModel
  - `data` object
    - `id` string
    - `name` string
    - `slug_name` string
    - `size` number

---

[API](https://skmtc.dev/lytics/apis/v1-lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/v1-lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/v1-lytics-api/revisions/339fd1d88486?raw)
