Gitlab
Automate GitLab interaction programmatically
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Development
- Data source
- public-apis + marcelscruz
- Documentation / URL
- https://docs.gitlab.com/ee/api/
Overview
The GitLab API exposes projects, repositories, issues, MRs, CI/CD pipelines, users, groups, and more — on GitLab.com or any self-hosted GitLab instance. Public data is readable anonymously (verified live on gitlab.com); personal/project tokens or OAuth unlock everything else.
Quick Start
Public projects — no auth needed (verified live):
curl "https://gitlab.com/api/v4/projects?per_page=5"
A project’s details:
curl "https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab"
Project issues:
curl "https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab/issues?per_page=5"
User profile:
curl "https://gitlab.com/api/v4/users?username=octocat"
With a personal access token:
curl "https://gitlab.com/api/v4/projects?private_token=YOUR_TOKEN"
Authentication
- Anonymous: public reads work keyless (verified).
- Personal access token (GitLab → Preferences → Access Tokens): higher limits, private data.
- OAuth: for acting on behalf of users — the listing’s OAuth flag refers to this.
- Self-hosted instances expose the same API at
https://your-instance/api/v4.
Rate Limits & Notes
- Anonymous limits are modest (~few hundred req/hour on gitlab.com); tokens raise them.
- Project paths need URL-encoding (
gitlab-org%2Fgitlab). - Pagination via
page/per_page(max 100) andX-Next-Pageheaders. - GraphQL API available at
/api/graphqlfor complex queries.
FAQ
Is GitLab API free? Yes — public data is readable anonymously; tokens raise limits.
Do I need OAuth? Only for user-scoped actions — reads work anonymously or with a token.
Does it work on self-hosted GitLab?
Yes — same /api/v4 endpoints on any instance.
More in Development
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| 24 Pull Requests Project to promote open source collaboration during December | No auth | Yes | Yes | ↗ |
| Abacus Free and simple counting service. You can use it to track page hits and specific events | No auth | Yes | Unknown | ↗ |
| Agent Gateway 34+ AI agent infrastructure services including memory, wallets, and scheduling | API Key | Yes | Unknown | ↗ |
| AgentDeals Search and compare developer free tiers, startup credits, and pricing changes | No auth | Yes | Unknown | ↗ |
| Agify.io Estimates the age from a first name | No auth | Yes | Yes | ↗ |