Skip to content

List all project labels

GET
/api/v4/projects/{id}/labels

Lists all labels for a specified project. By default, this request returns 20 results at a time because the API results are paginated.

id
required
One of:
string

The ID or URL-encoded path of the project

with_counts
boolean
nullable

Include issue and merge request counts

include_ancestor_groups
boolean
default: true nullable

Include ancestor groups

search
string
nullable

Keyword to filter labels by. This feature was added in GitLab 13.6

archived
boolean
nullable

Filter by archived status. This feature was added in GitLab 18.10

page
integer
default: 1 nullable

Current page number

Example
1
per_page
integer
default: 20 nullable

Number of items per page

Example
20

OK

Media type application/json
object
id
integer format: int64
name
string
description
string
text_color
string
description_html
string
color
string
archived
boolean
open_issues_count
integer
closed_issues_count
integer
open_merge_requests_count
integer
subscribed
boolean
priority
integer
is_project_label
boolean
Example
{
"id": 1,
"name": "bug",
"description": "Bug reported by user",
"text_color": "#FFFFFF",
"description_html": "<p>Bug reported by user</p>",
"color": "#FF0000",
"archived": false,
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1,
"subscribed": false,
"priority": 10
}

Bad Request

Not Found