# GitLab Projects - Repositories by Stars and Activity (`alaudinburki/gitlab-projects`) Actor

Browse public GitLab repositories as flat rows - name, namespace, description, stars, forks and last activity. Free public API, no key.

- **URL**: https://apify.com/alaudinburki/gitlab-projects.md
- **Developed by:** [alaudin burki](https://apify.com/alaudinburki) (community)
- **Categories:** Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 92.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## GitLab Projects — Repositories by Stars and Activity

Browse public GitLab projects and get one flat row per repository: name, namespace path, description,
stars, forks, topics, default branch and activity dates. The GitLab API is public for public projects,
so no token is needed.

### How to use

1. Enter words to match in **Search text**, or a **Topic** tag such as `devops` or `kubernetes`, or
   leave both empty to browse the most-starred public projects.
2. Optionally set **Order by** to one of `id`, `name`, `path`, `created_at`, `updated_at`,
   `last_activity_at` or `star_count`. The sort direction is always descending, so `created_at` gives
   the newest projects first.
3. Run the Actor. The dataset holds one row per project; the `SUMMARY` key-value record shows how many
   rows came back and why the run stopped.

### Inputs

| Input | What it does | Default |
|---|---|---|
| `query` | Words matched by GitLab against project names and descriptions. | none — no search term |
| `topic` | GitLab topic tag to filter on, e.g. `devops` or `kubernetes`. | none — no topic filter |
| `orderBy` | Field to order by: `id`, `name`, `path`, `created_at`, `updated_at`, `last_activity_at` or `star_count`. | `star_count` |
| `maxItems` | Stop after this many rows. Capped at 20,000. | `500` |
| `maxPages` | Stop after this many requests. Each request returns up to 100 projects. Capped at 200. | `5` |

Example input:

```json
{ "query": "kubernetes", "topic": "devops", "orderBy": "star_count", "maxItems": 100, "maxPages": 1 }
```

### Output dataset

| Field | Meaning |
|---|---|
| `name` | Project display name, as GitLab stores it. Not unique on its own. |
| `pathWithNamespace` | Full path including group or user, e.g. `gitlab-org/gitlab-foss`. This is the unique one. |
| `description` | Project description. Null for projects that have none. |
| `stars` | Star count recorded by GitLab at the time of the run. |
| `forks` | Fork count recorded by GitLab at the time of the run. |
| `topics` | Topic tags, joined into one comma-separated string because a dataset row is flat. |
| `defaultBranch` | Name of the default branch, e.g. `main`. It is a project setting and can be anything. |
| `createdAt` | ISO 8601 timestamp of when the project was created. |
| `lastActivity` | ISO 8601 timestamp of the last recorded activity on the project. |
| `url` | Web URL of the project, e.g. `https://gitlab.com/group/project`. |

Each row also carries `id` (`gitlab:` followed by the numeric project id), `source`, `firstSeenAt` and
`scrapedAt`. Rows are de-duplicated by project id, so a project that appears on two pages is stored once.

### Why this is different

- It reads GitLab directly, at `gitlab.com`, without a token — the usual reason a GitLab export stalls
  is authentication, and public project listing does not need it.
- Every row carries both `pathWithNamespace` and the numeric project id, so results can be joined or
  revisited after a project is renamed.
- The topic, search, ordering and paging parameters are separate inputs rather than one query string,
  so the request is readable and repeatable.
- Array-valued topics are flattened to a string, which keeps the dataset sortable and exportable as
  CSV without a second step.
- `SUMMARY` records `truncated` and `stopReason`, so a capped run is visible instead of looking like a
  complete list.

### Limitations

- **Public projects only.** Private and internal repositories require an authenticated token, which
  this Actor does not ask for.
- Only `gitlab.com` is queried. Self-hosted GitLab instances are not covered.
- Star and fork counts are snapshots from the moment of the run, not historical series.
- The search is GitLab's own matching on names and descriptions; it is not a code search and does not
  look inside repositories.
- The topic filter matches the tag exactly, so a project tagged `dev-ops` will not match `devops`.
- The sort direction cannot be changed — results are always descending, so `orderBy: "name"` gives
  Z-to-A.
- A run stops at `maxItems` or `maxPages`; the 500-row, 5-request default truncates a broad query.

### FAQ

**Do I need a GitLab account or token?**
No. Public project listing is read without credentials, and the Actor sends none.

**Why does the same project name appear for different groups?**
`name` is not unique. Use `pathWithNamespace` or `id`; both are unique per project.

**Why are `topics` a string rather than a list?**
The dataset row must be flat, so the array is joined with commas. Split on `, ` if you need a list
back.

**Can I search inside repository code?**
No. This Actor lists projects and their metadata, not their files.

**What happens if GitLab rate-limits the run?**
Requests are spaced 200 ms apart and retried up to three times on rate-limit and server errors. If the
first request still fails, the run stops with an error rather than returning an empty dataset.

### Pricing and limits

Pricing is per event: one charge per run, with the current price shown on this Actor's Apify pricing
panel. Requests return up to 100 projects each; a run defaults to 500 rows over 5 requests and can be
raised to 20,000 rows and 200 requests. Requests are paced 200 ms apart and time out after 30 seconds.
The source is free to query.

# Actor input Schema

## `query` (type: `string`):

Words to match in project names and descriptions.

## `topic` (type: `string`):

GitLab topic tag, e.g. devops, kubernetes.

## `orderBy` (type: `string`):

id, name, path, created_at, updated_at, last_activity_at, star_count.

## `maxItems` (type: `integer`):

Stop after this many rows.

## `maxPages` (type: `integer`):

Stop after this many pages.

## Actor input object example

```json
{
  "maxItems": 500,
  "maxPages": 5
}
```

# Actor output Schema

## `results` (type: `string`):

One row per item, with the 10 fields listed under Views.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 500,
    "maxPages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("alaudinburki/gitlab-projects").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 500,
    "maxPages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("alaudinburki/gitlab-projects").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 500,
  "maxPages": 5
}' |
apify call alaudinburki/gitlab-projects --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alaudinburki/gitlab-projects"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rYMcX1NYgxuL5wNbS/builds/XyeaIJUzhcqDm6ro0/openapi.json
