---
title: list-attribute-label-counts
product: vercel
url: /docs/rest-api/feature-flags/list-attribute-label-counts
canonical_url: "https://vercel.com/docs/rest-api/feature-flags/list-attribute-label-counts"
last_updated: 2026-10-21
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about list-attribute-label-counts on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# List attribute label counts

```http
GET /v1/projects/{projectIdOrName}/feature-flags/labels/counts
```

List label counts for configured entity attributes, including empty ones.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `projectIdOrName` | string | Yes |  |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `entityKind` | string. maxLength: 128 | No |  |
| `limit` | integer. min: 1; max: 20; default: 20 | No |  |
| `cursor` | string. maxLength: 4096 | No | The continuation cursor from the previous response. |
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v1/projects/projectIdOrName/feature-flags/labels/counts?entityKind=string&limit=123&cursor=string&teamId=string&slug=string', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v1/projects/projectIdOrName/feature-flags/labels/counts?entityKind=string&limit=123&cursor=string&teamId=string&slug=string', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X GET 'https://api.vercel.com/v1/projects/projectIdOrName/feature-flags/labels/counts?entityKind=string&limit=123&cursor=string&teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
{
  "data": [
    {
      "attributeKey": "string",
      "entityKind": "string",
      "count": "123"
    }
  ],
  "pagination": {
    "next": "string"
  }
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "attributeKey",
          "count",
          "entityKind"
        ],
        "properties": {
          "attributeKey": {
            "type": "string"
          },
          "entityKind": {
            "type": "string"
          },
          "count": {
            "type": "number"
          }
        }
      }
    },
    "pagination": {
      "type": "object",
      "required": [
        "next"
      ],
      "properties": {
        "next": {
          "type": "string",
          "nullable": true
        }
      }
    }
  }
}
```

### 400: One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 402: The account is missing a payment so payment method must be updated

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

---

## Related

- [feature-flags endpoints](/docs/rest-api#feature-flags)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
