# GitLab on Onekey > 20 endpoints for GitLab (20 stable, 0 beta), 1 to 5 credits each. Category: Developer platforms. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/gitlab Reference (Markdown): https://onekey.dev/docs/api/gitlab.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 20 mapped GitLab endpoints return each: - `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 - plus 15 platform-specific fields under `ext.` ## Endpoints ### gitlab.branches Branches of a GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/branches?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `entity.name`, `entity.updatedAt`, `entity.url`, `ext.commit`, `ext.isDefault`, `ext.protected` - Reference: https://onekey.dev/docs/api/gitlab/branches.md ### gitlab.commit One commit of a GitLab.com project (sha or ref). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/gitlab/commit?project=gitlab-org%2Fgitlab&ref=master` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - `ref` (string, required): Commit sha or branch/tag name - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.displayName`, `ext.additions`, `ext.deletions` - Reference: https://onekey.dev/docs/api/gitlab/commit.md ### gitlab.commits Recent commits of a GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/commits?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `author.displayName` - Reference: https://onekey.dev/docs/api/gitlab/commits.md ### gitlab.contributors Top contributors of a GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/contributors?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `author.displayName`, `engagement.likes`, `ext.additions`, `ext.deletions` - Reference: https://onekey.dev/docs/api/gitlab/contributors.md ### gitlab.events Recent public activity events of a GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/events?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `content.id`, `content.title`, `content.createdAt`, `author.username`, `ext.action`, `ext.targetType` - Reference: https://onekey.dev/docs/api/gitlab/events.md ### gitlab.group GitLab.com group metadata. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/gitlab/group?group=gitlab-org` with header `x-api-key: YOUR_API_KEY` - Parameters: - `group` (string, required): Group path or numeric id - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `content.text`, `author.createdAt`, `ext.visibility` - Reference: https://onekey.dev/docs/api/gitlab/group.md ### gitlab.group_projects Projects of a GitLab.com group (most starred first). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/group_projects?group=gitlab-org` with header `x-api-key: YOUR_API_KEY` - Parameters: - `group` (string, required): Group path or numeric id - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url`, `entity.stats.stars`, `entity.stats.forks`, `entity.stats.openIssues`, `entity.createdAt`, `entity.updatedAt`, `package.defaultBranch`, `author.username`, `author.url`, `entity.tags`, `ext.visibility` - Reference: https://onekey.dev/docs/api/gitlab/group_projects.md ### gitlab.issue One issue of a GitLab.com project. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/gitlab/issue?project=gitlab-org%2Fgitlab&iid=1` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - `iid` (string, required): Issue iid - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `content.updatedAt`, `content.state`, `author.username`, `author.displayName`, `engagement.comments`, `engagement.likes`, `ext.labels` - Reference: https://onekey.dev/docs/api/gitlab/issue.md ### gitlab.issues Recent issues of a GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/issues?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `content.updatedAt`, `content.state`, `author.username`, `author.displayName`, `engagement.comments`, `engagement.likes`, `ext.labels` - Reference: https://onekey.dev/docs/api/gitlab/issues.md ### gitlab.languages Language breakdown (percent) of a GitLab.com project. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/gitlab/languages?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `ext.languages` - Reference: https://onekey.dev/docs/api/gitlab/languages.md ### gitlab.merge_request One merge request of a GitLab.com project. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/gitlab/merge_request?project=gitlab-org%2Fgitlab&iid=1` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - `iid` (string, required): Merge request iid - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `content.updatedAt`, `content.state`, `author.username`, `author.displayName`, `engagement.comments`, `engagement.likes`, `ext.labels`, `ext.mergedAt`, `ext.sourceBranch` - Reference: https://onekey.dev/docs/api/gitlab/merge_request.md ### gitlab.merge_requests Recent merge requests of a GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/merge_requests?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `content.updatedAt`, `content.state`, `author.username`, `author.displayName`, `engagement.comments`, `engagement.likes`, `ext.labels`, `ext.mergedAt`, `ext.sourceBranch` - Reference: https://onekey.dev/docs/api/gitlab/merge_requests.md ### gitlab.pipelines Recent CI pipelines of a public GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/pipelines?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `content.id`, `content.state`, `content.url`, `content.createdAt`, `content.updatedAt`, `ext.ref`, `ext.sha` - Reference: https://onekey.dev/docs/api/gitlab/pipelines.md ### gitlab.project GitLab.com project metadata. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/gitlab/project?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url`, `entity.stats.stars`, `entity.stats.forks`, `entity.stats.openIssues`, `entity.createdAt`, `entity.updatedAt`, `package.defaultBranch`, `author.username`, `author.url`, `entity.tags`, `ext.visibility` - Reference: https://onekey.dev/docs/api/gitlab/project.md ### gitlab.search Search public GitLab projects (most starred first). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/search?q=gitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `content.createdAt`, `engagement.likes`, `engagement.shares`, `author.username`, `author.url` - Reference: https://onekey.dev/docs/api/gitlab/search.md ### gitlab.search_groups Search public GitLab.com groups. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/search_groups?q=gitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `content.text` - Reference: https://onekey.dev/docs/api/gitlab/search_groups.md ### gitlab.subgroups Subgroups of a GitLab.com group. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/subgroups?group=gitlab-org` with header `x-api-key: YOUR_API_KEY` - Parameters: - `group` (string, required): Group path or numeric id - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `content.text` - Reference: https://onekey.dev/docs/api/gitlab/subgroups.md ### gitlab.tags Tags of a GitLab.com project. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/tags?project=gitlab-org%2Fgitlab` with header `x-api-key: YOUR_API_KEY` - Parameters: - `project` (string, required): Project path (group/project) or numeric id - Fields returned: `content.title`, `content.text`, `content.id`, `content.createdAt` - Reference: https://onekey.dev/docs/api/gitlab/tags.md ### gitlab.topic_projects Public GitLab.com projects by topic (most starred first). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/gitlab/topic_projects?topic=cli` with header `x-api-key: YOUR_API_KEY` - Parameters: - `topic` (string, required): Topic - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url`, `entity.stats.stars`, `entity.stats.forks`, `entity.stats.openIssues`, `entity.createdAt`, `entity.updatedAt`, `package.defaultBranch`, `author.username`, `author.url`, `entity.tags`, `ext.visibility` - Reference: https://onekey.dev/docs/api/gitlab/topic_projects.md ### gitlab.user GitLab.com public user profile. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/gitlab/user?username=gitlab-bot` with header `x-api-key: YOUR_API_KEY` - Parameters: - `username` (string, required): GitLab username - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.url`, `author.avatarUrl`, `ext.state` - Reference: https://onekey.dev/docs/api/gitlab/user.md ## Sample request ```bash curl "https://api.onekey.dev/v1/gitlab/commit?project=gitlab-org%2Fgitlab&ref=master" \ -H "x-api-key: YOUR_API_KEY" ```