What you get#
Onekey exposes GitLab as 20 endpoints behind one API key: 7 endpoints return one record (data is an object) and 13 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for GitLab also works for the rest of the developer platforms category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
branches | Branches of a GitLab.com project. | project* | 5 | stable |
commit | One commit of a GitLab.com project (sha or ref). | project*, ref* | 1 | stable |
commits | Recent commits of a GitLab.com project. | project* | 5 | stable |
contributors | Top contributors of a GitLab.com project. | project* | 5 | stable |
events | Recent public activity events of a GitLab.com project. | project* | 5 | stable |
group | GitLab.com group metadata. | group* | 1 | stable |
group_projects | Projects of a GitLab.com group (most starred first). | group* | 5 | stable |
issue | One issue of a GitLab.com project. | project*, iid* | 1 | stable |
issues | Recent issues of a GitLab.com project. | project* | 5 | stable |
languages | Language breakdown (percent) of a GitLab.com project. | project* | 1 | stable |
merge_request | One merge request of a GitLab.com project. | project*, iid* | 1 | stable |
merge_requests | Recent merge requests of a GitLab.com project. | project* | 5 | stable |
pipelines | Recent CI pipelines of a public GitLab.com project. | project* | 5 | stable |
project | GitLab.com project metadata. | project* | 1 | stable |
search | Search public GitLab projects (most starred first). | q* | 5 | stable |
search_groups | Search public GitLab.com groups. | q* | 5 | stable |
subgroups | Subgroups of a GitLab.com group. | group* | 5 | stable |
tags | Tags of a GitLab.com project. | project* | 5 | stable |
topic_projects | Public GitLab.com projects by topic (most starred first). | topic* | 5 | stable |
user | GitLab.com public user profile. | username* | 1 | stable |
A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.
Make a request#
This calls gitlab.commit (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/gitlab/commit?project=gitlab-org%2Fgitlab&ref=master" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from GitLab, with the same names as on every other platform. The count is how many of its 20 mapped endpoints return the field; a field the source lacks is null, never missing. 15 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
author.username | string | 13 |
author.displayName | string | 11 |
content.text | string | 11 |
content.createdAt | ISO 8601 date | 10 |
content.id | string | 10 |
content.title | string | 9 |
author.url | URL | 8 |
content.url | URL | 8 |
engagement.likes | integer | 6 |
content.state | string | 5 |
content.updatedAt | ISO 8601 date | 5 |
author.id | string | 4 |
engagement.comments | integer | 4 |
entity.name | string | 4 |
entity.updatedAt | ISO 8601 date | 4 |
entity.url | URL | 4 |
entity.createdAt | ISO 8601 date | 3 |
entity.description | string | 3 |
entity.id | string | 3 |
entity.stats.forks | integer | 3 |
entity.stats.openIssues | integer | 3 |
entity.stats.stars | integer | 3 |
entity.tags | list of strings | 3 |
package.defaultBranch | string | 3 |
author.avatarUrl | URL | 2 |
author.createdAt | ISO 8601 date | 1 |
engagement.shares | integer | 1 |
The full schema is in Unified schema.
Pricing#
GitLab calls cost 1 to 5 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.