BYTETOOLS

GitLab API

Free GitLab API with no key for public projects: repositories, issues, merge requests, pipelines and releases. Works on gitlab.com and self-hosted. Tested.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-20

What is the GitLab API?

The GitLab REST API provides free, key-free access to public project data — repositories, issues, merge requests, CI pipelines and releases — on gitlab.com and any self-hosted GitLab instance.

Public GitLab data is readable without authentication, covering repositories, issues, merge requests and CI pipeline results. The same API works identically against self-hosted GitLab, which is a large share of enterprise Git hosting.

The CI/CD endpoints are what distinguish it from other Git host APIs: pipeline status, job logs and artefacts are all exposed, which makes it possible to build genuinely useful build dashboards without a separate CI integration.

Quick facts

Base URL
https://gitlab.com/api/v4
Authentication
Public data needs no auth. Private projects and writes require a personal access token.
Rate limit
Roughly 500 requests per minute per IP for unauthenticated requests on gitlab.com.
Pricing
Free for public data.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the GitLab API

Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.

1. List public GitLab projects

GET https://gitlab.com/api/v4/projects?per_page=1&order_by=star_count

curl
curl 'https://gitlab.com/api/v4/projects?per_page=1&order_by=star_count'
JavaScript (fetch)
const res = await fetch("https://gitlab.com/api/v4/projects?per_page=1&order_by=star_count");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://gitlab.com/api/v4/projects?per_page=1&order_by=star_count", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
[
  {
    "id": 13083,
    "description": "GitLab FOSS is a read-only mirror of GitLab, with all proprietary code removed.\n\nThis project was previously used to host GitLab Community Edition, but all development has now moved to https://gitlab.com/gitlab-org/gitlab.\n",
    "name": "GitLab FOSS",
    "name_with_namespace": "GitLab.org / GitLab FOSS",
    "path": "gitlab-foss",
    "path_with_namespace": "gitlab-org/gitlab-foss",
    "created_at": "2013-09-26T06:02:36.000Z",
    "default_branch": "master",
    "tag_list": [
      "Canonical",
      "hacktoberfest",
      "infra-mgmt Managed"
    ],
    "topics": [
      "Canonical",
      "hacktoberfest",
      "infra-mgmt Managed"
    ],
    "ssh_url_to_repo": "git@gitlab.com:gitlab-org/gitlab-foss.git",
    "http_url_to_repo": "https://gitlab.com/gitlab-org/gitlab-foss.git",
    "web_url": "https://gitlab.com/gitlab-org/gitlab-foss",
    "readme_url": "https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/README.md",
    "forks_count": 8268,
    "avatar_url": "https://gitlab.com/uploads/-/system/project/avatar/13083/project_avatar.png",
    "star_count": 7172,
    "last_activity_at": "2026-08-19T20:41:24.467Z",
    "visibility": "public",
    "namespace": {
      "id": 9970,
      "name": "GitLab.org",
      "path": "gitlab-org",
      "kind": "group",
      "full_path": "gitlab-org",
      "parent_id": null,
      "avatar_url": "/uploads/-/system/group/avatar/9970/project_avatar.png",
      "web_url": "https://gitlab.com/groups/gitlab-org"
    }
  }
]

Parameters

ParameterTypeRequiredDescription
projectspathOptionalList or search public projects. projects
per_pageintegerOptionalResults per page, max 100. 20
order_bystringOptionalid, name, created_at, last_activity_at or star_count. star_count
searchstringOptionalSearch term. kubernetes
projects/<id>/pipelinespathOptionalCI pipelines for a project. pipelines

Response fields

idinteger
Project id, used in all other project endpoints.
name / path_with_namespacestring
Project name and full path.
descriptionstring
Project description.
star_count / forks_countinteger
Popularity metrics.
last_activity_atstring
Timestamp of the most recent activity.
web_urlstring
Browser URL for the project.
visibilitystring
public, internal or private.

What you can build with the GitLab API

  • Build a CI/CD dashboard from pipeline data
  • Track issues and merge requests across projects
  • Display project activity on a team page
  • Write tooling that works against self-hosted GitLab

Common errors and how to fix them

Project id vs path

Most endpoints take a numeric id.

Fix: URL-encode the full path as an alternative, e.g. group%2Fproject.

401 on a project you can see in a browser

It is internal rather than public.

Fix: Internal visibility requires authentication even though it is not private.

Pagination headers ignored

Total counts are in response headers, not the body.

Fix: Read X-Total and X-Next-Page rather than expecting pagination metadata in the JSON.

GitLab API — frequently asked questions

Does the GitLab API need a token?

Not for public project data. Private and internal projects, and any write operation, require a personal access token.

Does the same code work with self-hosted GitLab?

Yes, that is a key advantage. Change the base URL and the same API works against any self-hosted instance.

How do I reference a project?

Either by numeric id, or by URL-encoding the full path — group%2Fsubgroup%2Fproject. The encoded slashes are required.

Where is the pagination information?

In response headers such as X-Total, X-Page and X-Next-Page, not in the JSON body — which catches people out.

Tools that pair with this API

GitLab is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.