---
title: "GitLab API: public project search, project details as JSON"
description: "GitLab API for public project search, project details, releases and group or user projects on GitLab.com as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/gitlab
---

[APIs](https://perceptlayer.com/apis) / [Apps and media](https://perceptlayer.com/verticals/apps) / GitLab

1 credit per call 5 endpoints 13 datapoints 

# GitLab API

GitLab API for public project search, project details, releases and group or user projects on GitLab.com as JSON. 1 credit per successful call.

[Get a free API key](https://perceptlayer.com/signup) Run it below

GitLab

GET /v1/gitlab/projects-search?query=terraform&per\_page=10 

```
{
  "success": true,
  "data": {
    "page": 1,
    "has_more": true,
    "count": 10,
    "items": [
      {
        "id": 14292404,
        "path": "gitlab-org/gitlab-environment-toolkit",
        "name": "GitLab Environment Toolkit",
        "description": "The GitLab Environment Toolkit (`GET`) is a set of opinionated [Terraform](https://www.terraform.io/) and [Ansible](https://www.ansible.com/) scripts to assist with deploying scaled GitLab environments following the [Reference Architectures…",
        "stars": 279,
        "forks": 373,
        "default_branch": "main",
        "visibility": "public",
        "created_at": "2019-09-13T12:52:36.365Z",
        "last_activity_at": "2026-12-01T06:10:51.765Z",
        "url": "https://gitlab.com/gitlab-org/gitlab-environment-toolkit",
        "avatar_url": "https://gitlab.com/uploads/-/system/project/avatar/14292404/tanuki-blueprint.png?v=1796105451",
        "namespace": {
          "name": "GitLab.org",
          "path": "gitlab-org",
          "kind": "group"
        }
      },
      {
        "id": 18943607,
        "path": "gitlab-org/terraform-images",
        "name": "Terraform Images",
        "description": "Terraform images for GitLab CI",
        "stars": 169,
        "forks": 364,
        "topics": [
          "hacktoberfest"
        ],
        "default_branch": "master",
        "visibility": "public",
        "created_at": "2020-05-22T20:10:05.491Z",
        "last_activity_at": "2026-11-19T18:26:50.220Z",
        "url": "https://gitlab.com/gitlab-org/terraform-images",
        "namespace": {
          "name": "GitLab.org",
          "path": "gitlab-org",
          "kind": "group"
        }
      },
      {
        "id": 40916776,
        "path": "gitlab-org/terraform-provider-gitlab",
        "name": "GitLab Terraform Provider",
        "description": "Official GitLab Terraform Provider. ",
        "stars": 130,
        "forks": 355,
        "topics": [
          "hacktoberfest",
          "infrastructure as code",
          "terraform"
        ],
        "default_branch": "main",
        "visibility": "public",
        "created_at": "2022-11-09T12:12:48.760Z",
        "last_activity_at": "2026-12-01T08:53:35.809Z",
        "url": "https://gitlab.com/gitlab-org/terraform-provider-gitlab",
        "avatar_url": "https://gitlab.com/uploads/-/system/project/avatar/40916776/gitlab_configure_group_logo.png?v=1796115215",
        "namespace": {
          "name": "GitLab.org",
          "path": "gitlab-org",
          "kind": "group"
        }
      }
    ]
  },
  "meta": {
    "request_id": "req_d2895f23828c494f8e6db1a5c0325b5c",
    "credits_charged": 1,
    "credits_remaining": 1998
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

Sample data

## What one call returns

A recorded run of `projects-search`: the fields and shapes you will get, shortened to 3 items.

| # | id integer | path string | name string | description string | stars integer | forks integer | default\_branch string | visibility string | created\_at string | last\_activity\_at string | url url | avatar\_url url | namespace object |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 14292404 | gitlab-org/gitlab-environment-toolkit | GitLab Environment Toolkit | The GitLab Environment Toolkit (\`GET\`) is a set of opinionated \[Terraform\](https://www.terraform.io/) and \[Ansible\](https://www.ansible.com/) scripts to assist with deploying scaled GitLab environments following the \[Reference Architectures… | 279 | 373 | main | public | 2019-09-13T12:52:36.365Z | 2026-12-01T06:10:51.765Z | https://gitlab.com/gitlab-org/gitlab-environment-toolkit | https://gitlab.com/uploads/-/system/project/avatar/14292404/tanuki-blueprint.png?v=1796105451 | {3 fields} |
| 2 | 18943607 | gitlab-org/terraform-images | Terraform Images | Terraform images for GitLab CI | 169 | 364 | master | public | 2020-05-22T20:10:05.491Z | 2026-11-19T18:26:50.220Z | https://gitlab.com/gitlab-org/terraform-images | — | {3 fields} |
| 3 | 40916776 | gitlab-org/terraform-provider-gitlab | GitLab Terraform Provider | Official GitLab Terraform Provider. | 130 | 355 | main | public | 2022-11-09T12:12:48.760Z | 2026-12-01T08:53:35.809Z | https://gitlab.com/gitlab-org/terraform-provider-gitlab | https://gitlab.com/uploads/-/system/project/avatar/40916776/gitlab\_configure\_group\_logo.png?v=1796115215 | {3 fields} |

Recorded from our API · 3 items shown · 13 datapoints per item GET /v1/gitlab/projects-search?query=terraform&per\_page=10

13 datapoints

### Identity

-   id integer
-   name string
-   namespace object

### Contact

-   url url
-   avatar\_url url

### Reputation

-   stars integer

### Other

-   path string
-   description string
-   forks integer
-   default\_branch string
-   visibility string
-   created\_at string
-   last\_activity\_at string

Playground

## Run this API

cURL shell 

```
curl "https://api.perceptlayer.com/v1/gitlab/projects-search?query=terraform&per_page=10" \
  -H "X-API-Key: $API_KEY"
```

GitLab · 5 endpoints

## Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

| Endpoint | Required parameters | Returns | Cost |
| --- | --- | --- | --- |
| [GET `/v1/gitlab/group-projects`](https://perceptlayer.com/apis/gitlab/group-projects) | `group` +4 optional | `id` `path` `name` `description` `stars` `forks` +8 more | 1 credit |
| [GET `/v1/gitlab/project`](https://perceptlayer.com/apis/gitlab/project) | `id` | `id` `path` `name` `description` `stars` `forks` +11 more | 1 credit |
| [GET `/v1/gitlab/projects-search`](https://perceptlayer.com/apis/gitlab/projects-search) | `query` +4 optional | `id` `path` `name` `description` `stars` `forks` +8 more | 1 credit |
| [GET `/v1/gitlab/releases`](https://perceptlayer.com/apis/gitlab/releases) | `id` +2 optional | `tag` `name` `released_at` `created_at` `upcoming` `notes` +5 more | 1 credit |
| [GET `/v1/gitlab/user-projects`](https://perceptlayer.com/apis/gitlab/user-projects) | `username` +3 optional | `id` `path` `name` `description` `stars` `forks` +7 more | 1 credit |

Overview

## About the GitLab API

## What you can get

The GitLab API returns public project data from GitLab.com as JSON through 5 endpoints. Sort fields are `star_count`, `last_activity_at`, `created_at` or `name`, and lists page with `page` and `per_page` (1 to 100).

-   **Search:** `projects-search` takes a `query`, with `order_by`, `sort` (desc or asc), `page` and `per_page`.
-   **Projects:** `project` takes an `id`, either a path such as `gitlab-org/gitlab-runner` or a numeric id.
-   **Releases:** `releases` takes a project `id`, with `page` and `per_page`, newest first.
-   **Groups and users:** `group-projects` takes a `group` path (a subgroup such as `gitlab-org/ci-cd` works too), with `include_subgroups`, `order_by`, `page` and `per_page`. `user-projects` takes a `username`, with `order_by`, `page` and `per_page`.

The recorded `projects-search` for "terraform" returns `items`, each with `id`, `path`, `name`, `description`, `stars`, `forks`, `topics`, `default_branch`, `visibility`, `created_at`, `last_activity_at`, `url`, `avatar_url` and `namespace`, plus `page` and `has_more`. The top result, `gitlab-org/gitlab-environment-toolkit`, had 279 stars and 373 forks. `project` adds `license`, `readme_url` and `clone_url`.

## How a call works

Search, then look up: `GET /v1/gitlab/projects-search?query=terraform&per_page=10` with your key in the `X-API-Key` header returns each project's `path`; pass it as `id` to `project` or `releases`, for example `GET /v1/gitlab/releases?id=gitlab-org/gitlab-runner&per_page=5`. A project's `namespace.path` goes to `group-projects` as `group`, or to `user-projects` as `username` when `namespace.kind` is user. Check `has_more` before asking for the next `page`; `group-projects`, `user-projects` and `releases` also report a `total` (299 releases for `gitlab-org/gitlab-runner` in the recording). Answers come from a cache for up to an hour, so stars and last activity can be up to an hour old. Every successful call costs 1 credit; failed calls cost nothing.

Apps and media JSON REST MCP

### More apps and media APIs

[Apple App Store](https://perceptlayer.com/apis/apple-app-store) [Apple Podcasts](https://perceptlayer.com/apis/apple-podcasts) [arXiv](https://perceptlayer.com/apis/arxiv) [Audible](https://perceptlayer.com/apis/audible) [Bandcamp](https://perceptlayer.com/apis/bandcamp) [Chrome Web Store](https://perceptlayer.com/apis/chrome-web-store) [CISA KEV](https://perceptlayer.com/apis/cisa-kev) [ClinicalTrials.gov](https://perceptlayer.com/apis/clinicaltrials) [Coursera](https://perceptlayer.com/apis/coursera) [crates.io](https://perceptlayer.com/apis/crates-io) [Crossref](https://perceptlayer.com/apis/crossref) [Discogs](https://perceptlayer.com/apis/discogs)

Use cases

### Track new releases of the GitLab-hosted tools you depend on, with tag, date and notes

`Use the GitLab API to track new releases of the GitLab-hosted tools you depend on, with tag, date and notes` 

### List every public project in a group, ranked by stars or recent activity

`Use the GitLab API to list every public project in a group, ranked by stars or recent activity` 

### Find GitLab projects on a topic and compare stars, forks and last activity

`Use the GitLab API to find GitLab projects on a topic and compare stars, forks and last activity` 

### Check a project's licence and default branch before adopting it

`Use the GitLab API to check a project's licence and default branch before adopting it` 

FAQ

## Questions

**How much does the GitLab API cost?**

Each successful call costs one credit, and each page of results is one call. New accounts get free credits to start, and credit packs bring the price down as you scale.

**Which projects does it cover?**

Public projects on GitLab.com only. Private and internal projects, and self-managed GitLab instances, are not covered.

**Is there a user profile endpoint?**

No. \`user-projects\` returns a \`user\` block with \`id\`, \`username\`, \`name\`, \`state\`, \`avatar\_url\` and \`url\` next to that user's public projects (22 for \`sytses\` in the recording), but there is no separate profile endpoint.

**Do I need a GitLab account?**

No. You call this GitLab API with your Perceptlayer key in the \`X-API-Key\` header, with no GitLab login or token.

**Is this the official GitLab API?**

No. Perceptlayer is an independent service and is not affiliated with GitLab. It returns GitLab data as JSON with a Perceptlayer key, so there is no GitLab developer account, app review or partner approval to get first. It only reads data: if GitLab has an official API and you need to act on your own GitLab account, such as posting, managing orders or reading private data, use that one.

**Should I build a GitLab scraper instead?**

You can, but a GitLab scraper is code you maintain: page changes break it, requests get blocked, and GitLab's terms govern how you collect data. The GitLab API gives you 5 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

## Try the GitLab API with 100 free credits

No credit card. Failed calls are never billed.

[Get a free API key](https://perceptlayer.com/signup) [Read the docs](https://docs.perceptlayer.com)
