# GitLab Projects Scraper – Repos, Stars, Forks & Activity (`ninhothedev/gitlab-projects-scraper`) Actor

$0.35/1K 🔥 Fast GitLab scraper! Public projects — stars, forks, topics, description & activity by search or path. JSON, CSV, Excel or API in seconds. Enter a query or path & pull thousands of repos for dev & market intel ⚡

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

## Pricing

from $0.35 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## GitLab Projects Scraper 🦊

**Scrape GitLab projects at scale — stars, forks, topics, visibility, activity dates and full metadata — with no API key for public repos.** Search GitLab by keyword or pull exact repositories by `group/path` or numeric id, and export clean structured data to JSON, CSV, Excel, or the Apify API.

> Built for developers, data teams, DevRel, recruiters and market researchers who need GitLab repository intelligence without wrestling the REST API, pagination, or URL-encoding.

***

### ✨ What it does

- 🔍 **Search mode** — search all public GitLab projects for a keyword and get results **sorted by star count (descending)**.
- 🎯 **Projects mode** — fetch full detail for specific repos by `group/path` (e.g. `gitlab-org/gitlab`) or numeric id. Namespace paths are URL-encoded for you.
- ⭐ **Rich fields** — stars, forks, topics, description, visibility, last activity & creation timestamps, web URL.
- 🚫 **No API key required** for public projects. Runs fine on datacenter proxies.
- 📦 **Clean output** — one row per project, ready for JSON / CSV / Excel / Google Sheets.

### 📥 Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | select | `search` (query, sorted by stars) or `projects` (ids or `group/path`). |
| `query` | string | Keyword for search mode. Prefilled with `kubernetes`. |
| `projects` | array | Repo refs for projects mode, e.g. `["gitlab-org/gitlab","fdroid/fdroidclient"]`. |
| `maxItems` | integer | Cap on returned projects (1–1000, default 100). |

#### Example input

```json
{
  "mode": "search",
  "query": "kubernetes",
  "maxItems": 100
}
```

```json
{
  "mode": "projects",
  "projects": ["gitlab-org/gitlab", "fdroid/fdroidclient"],
  "maxItems": 100
}
```

### 📤 Output

Each dataset item:

```json
{
  "id": 278964,
  "name": "GitLab",
  "full_name": "GitLab.org / GitLab",
  "path": "gitlab-org/gitlab",
  "description": "GitLab is an open source end-to-end software development platform.",
  "web_url": "https://gitlab.com/gitlab-org/gitlab",
  "stars": 6064,
  "forks": 12215,
  "topics": ["devops", "ci-cd", "git"],
  "visibility": "public",
  "last_activity_at": "2026-07-01T10:00:00.000Z",
  "created_at": "2011-01-01T00:00:00.000Z",
  "url": "https://gitlab.com/gitlab-org/gitlab",
  "scraped_at": "2026-07-03T01:00:00Z"
}
```

### 💡 Use cases

- **Competitive & market research** — track the most-starred projects in a topic (kubernetes, terraform, rust…).
- **Developer lead generation** — find active open-source projects and the teams behind them.
- **DevRel & community** — monitor forks, stars, and activity on your ecosystem's repos.
- **Data science** — build datasets of open-source activity across GitLab.
- **Due diligence** — snapshot a project's popularity and maintenance signals.

### 💰 Pricing

Pay-as-you-go, roughly **~$1 per 1,000 projects** scraped (input + output). GitLab's public API is free, so your cost is essentially Apify compute + a small per-result margin. A 100-project run costs pennies. See the live pricing on the actor page.

### ⚙️ How it works

The actor calls the **GitLab REST API v4** (`https://gitlab.com/api/v4`). Requests use `curl_cffi` with Chrome browser impersonation (great on datacenter IPs) and fall back to the standard library automatically. Search paginates by star count; detail lookups URL-encode `group/path` refs. Runs are async and batched (≤50) for speed, and fail loudly if zero projects come back.

### 📊 Comparison

| | This actor | Manual API scripts | Generic web scrapers |
|---|---|---|---|
| No API key (public) | ✅ | ✅ | ⚠️ |
| Sorted-by-stars search | ✅ | ⚠️ manual | ❌ |
| `group/path` encoding | ✅ auto | ⚠️ manual | ❌ |
| Clean structured export | ✅ | ❌ | ⚠️ |
| Pagination handled | ✅ | ❌ | ⚠️ |

### 🔗 Related actors

- [GitHub Scraper](https://apify.com/ninhothedev/github-scraper)
- [npm Package Scraper](https://apify.com/ninhothedev/npm-package-scraper)
- [Docker Hub Scraper](https://apify.com/ninhothedev/docker-hub-scraper)
- [Stack Overflow Scraper](https://apify.com/ninhothedev/stackoverflow-scraper)

### 🛟 Support

Questions, bugs, or a field you want added? Open an issue on the actor page or contact us through Apify — we usually reply within a day.

### 🔎 Keywords

gitlab scraper, gitlab api, gitlab projects, scrape gitlab, gitlab stars, gitlab forks, gitlab topics, repository scraper, open source data, devops data, git repositories, gitlab search, gitlab metadata, project popularity, gitlab crawler

# Actor input Schema

## `mode` (type: `string`):

How to collect projects. 'search' queries GitLab and returns projects sorted by star count. 'projects' fetches full detail for the specific repos you list below.

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

Keyword to search GitLab projects (used when mode = 'search'). Results are ordered by star count, descending.

## `projects` (type: `array`):

List of project references to fetch when mode = 'projects'. Each item is a numeric project id or a namespace path like 'gitlab-org/gitlab'. Paths are URL-encoded automatically.

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

Maximum number of projects to return (1-1000).

## Actor input object example

```json
{
  "mode": "search",
  "query": "kubernetes",
  "projects": [
    "gitlab-org/gitlab",
    "fdroid/fdroidclient"
  ],
  "maxItems": 100
}
```

# 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 = {
    "query": "kubernetes",
    "projects": [
        "gitlab-org/gitlab",
        "fdroid/fdroidclient"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/gitlab-projects-scraper").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 = {
    "query": "kubernetes",
    "projects": [
        "gitlab-org/gitlab",
        "fdroid/fdroidclient",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/gitlab-projects-scraper").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 '{
  "query": "kubernetes",
  "projects": [
    "gitlab-org/gitlab",
    "fdroid/fdroidclient"
  ]
}' |
apify call ninhothedev/gitlab-projects-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/lObdMPK7AKTtNT40f/builds/Rsgnj8lHeT6hafVfC/openapi.json
