---
title: "Count Variables"
method: POST
path: "/api/variables/count"
tags: ["Variables"]
---

# Count Variables

`POST /api/variables/count`

## Headers

- `x-prefect-api-version` string

## Request body

- BodyCountVariablesVariablesCountPost
  - `variables` VariableFilter — Filter variables. Only variables matching all criteria will be returned
    - `operator` 'and_' | 'or_' — Operators for combining filter criteria.
    - `id` VariableFilterId — Filter by `Variable.id`.
      - `any_` string[] — A list of variable ids to include
    - `name` VariableFilterName — Filter by `Variable.name`.
      - `any_` string[] — A list of variables names to include
      - `like_` string — A string to match variable names against. This can include SQL wildcard characters like `%` and `_`.
    - `value` VariableFilterValue — Filter by `Variable.value`.
      - `any_` string[] — A list of variables value to include
      - `like_` string — A string to match variable value against. This can include SQL wildcard characters like `%` and `_`.
    - `tags` VariableFilterTags — Filter by `Variable.tags`.
      - `operator` 'and_' | 'or_' — Operators for combining filter criteria.
      - `all_` string[] — A list of tags. Variables will be returned only if their tags are a superset of the list
      - `is_null_` boolean — If true, only include Variables without tags

## Response `200`

Successful Response

- integer

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/prefecthq/apis/untitled-api-2.md) · [All operations](https://skmtc.net/prefecthq/apis/untitled-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prefecthq/untitled-api-2/revisions/29ba6c4f8837/schema)
