---
ai:
  exclude: true
search:
  tags:
    - Space Label
    - GET
seo:
  description: >-
    Returns a paginated list of all Labels used by Content… Reference for the
    GET /rest/api/space/{spaceKey}/labels endpoint in the Confluence Data Center
    API.
sidebar:
  label: Fetch all labels
  badge: GET
title: Fetch all labels
type: openapi-operation
---
Returns a paginated list of all Labels used by Content within the given Space. This includes Labels used by Pages, Blog Posts, and other Content types.

Example request URI:
`https://example.com/confluence/rest/api/space/TEST/labels`

`GET /rest/api/space/{spaceKey}/labels`

**Responses**

- `200` — a JSON representation of the lists label, or an empty list if no labels are found.
- `403` — If the calling user does not have permission to view the given space.
- `404` — Returned if there is no space with the given spaceKey.

Response example, 200:

```json
{
  "results": [
    {
      "prefix": "my",
      "name": "label",
      "id": "1234",
      "label": "string"
    }
  ],
  "start": 25,
  "limit": 25,
  "size": 25,
  "_links": {
    "base": "http://localhost:8085/rest/api",
    "self": "http://localhost:8085/rest/api",
    "context": "http://localhost:8085/rest/api",
    "next": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50",
    "prev": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"
  }
}
```
