# Gitlab Scraper (`klondikeking/gitlab-scraper`) Actor

- **URL**: https://apify.com/klondikeking/gitlab-scraper.md
- **Developed by:** [Pierrick McD0nald](https://apify.com/klondikeking) (community)
- **Categories:** Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 project extracteds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Scraper

Extract comprehensive project, user, and group data from GitLab with enterprise-grade reliability. Perfect for DevOps intelligence, competitive analysis, open source research, and marketplace monitoring.

### What This Actor Does

GitLab Scraper extracts detailed metadata from GitLab projects, including stars, forks, issues, merge requests, README content, topics, and contributor information. Unlike basic scrapers, it uses GitLab's official REST API for maximum reliability and data completeness.

#### Key Features

- **Project Search**: Find projects by keywords across all of GitLab
- **User Profile Scraping**: Extract all projects from specific users
- **Group Intelligence**: Scrape complete project listings from groups/organizations
- **Deep Metadata**: Stars, forks, issues, merge requests, topics, and more
- **README Extraction**: Optionally fetch README content for analysis
- **Pagination Support**: Handle large result sets automatically
- **Rate Limit Resilience**: Built-in retry logic and respectful API usage

### Use Cases

#### 1. DevOps Intelligence
Monitor popular container images, CI/CD configurations, and DevOps tooling trends. Track which projects are gaining traction in the developer community and identify emerging technologies before they become mainstream.

#### 2. Competitive Analysis
Analyze competitor open source strategies by tracking their GitLab presence. Monitor their most popular projects, development velocity, and community engagement metrics.

#### 3. Open Source Research
Academic researchers and analysts can study open source trends, technology adoption patterns, and collaborative development practices across the GitLab ecosystem.

#### 4. Talent Sourcing
Identify active developers and high-quality projects for recruitment purposes. Filter by programming language, activity level, and community engagement.

#### 5. Marketplace Monitoring
Track plugin and extension ecosystems hosted on GitLab. Monitor version updates, community feedback, and adoption metrics.

### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `searchQueries` | string[] | No | Search terms to find projects (e.g., "machine learning", "react") |
| `projectPaths` | string[] | No | Specific project paths like "gitlab-org/gitlab" |
| `userNames` | string[] | No | GitLab usernames to extract projects from |
| `groupPaths` | string[] | No | GitLab groups to extract all projects from |
| `maxResults` | integer | Yes | Maximum projects to extract (1-1000) |
| `includeDetails` | boolean | No | Fetch README content and merge request counts |
| `proxyConfiguration` | object | No | Proxy settings (uses Apify Proxy by default) |

#### Example Input

```json
{
  "searchQueries": ["machine learning", "docker"],
  "userNames": ["gitlab-org"],
  "maxResults": 50,
  "includeDetails": true
}
````

### Output Schema

Each extracted project includes:

```json
{
  "id": 12345,
  "name": "example-project",
  "path": "example-project",
  "pathWithNamespace": "user/example-project",
  "description": "A sample project description",
  "webUrl": "https://gitlab.com/user/example-project",
  "starsCount": 150,
  "forksCount": 45,
  "openIssuesCount": 12,
  "mergeRequestsCount": 3,
  "defaultBranch": "main",
  "visibility": "public",
  "archived": false,
  "createdAt": "2023-01-15T10:30:00Z",
  "lastActivityAt": "2024-01-20T14:22:00Z",
  "language": "Python",
  "topics": ["machine-learning", "data-science"],
  "tagList": ["v1.0", "stable"],
  "readmeContent": "## Example Project\\n\\nThis is the README...",
  "owner": {
    "id": 67890,
    "username": "user",
    "name": "User Name",
    "webUrl": "https://gitlab.com/user"
  },
  "containerRegistryEnabled": true,
  "issuesEnabled": true,
  "mergeRequestsEnabled": true,
  "wikiEnabled": true
}
```

### Pricing

This Actor uses **Pay Per Event** pricing:

- **$0.001 per project extracted**

Example costs:

- 100 projects = $0.10
- 1,000 projects = $1.00
- 10,000 projects = $10.00

No monthly fees, no minimums. Pay only for what you use.

### Rate Limits & Performance

- GitLab API rate limits: 10 requests/second for unauthenticated requests
- This Actor respects rate limits with automatic backoff
- Average extraction speed: ~30-60 projects/minute with details enabled
- Recommended maxResults: 50-100 for initial testing

### FAQ

**Q: Can I scrape private repositories?**
A: No, this Actor only extracts publicly available data from GitLab.

**Q: What happens if GitLab API is down?**
A: The Actor has built-in retry logic (3 attempts) and will gracefully handle temporary API failures.

**Q: Can I extract historical data?**
A: The Actor extracts current state data. For historical trends, run the Actor periodically and compare results.

### Limitations

- Public projects only (private repos require authentication not supported)
- GitLab.com only (self-hosted GitLab instances not supported)
- README extraction requires the project to have a README.md file
- Merge request counts may be limited by GitLab API pagination

### Support

Open an issue on this Actor's Apify page for questions, feature requests, or bug reports.

***

*Built for developers who need reliable GitLab intelligence at scale.*

# Actor input Schema

## `searchQueries` (type: `array`):

Search terms to find GitLab projects (e.g., 'machine learning', 'react')

## `projectPaths` (type: `array`):

Specific project paths to scrape (e.g., 'gitlab-org/gitlab')

## `userNames` (type: `array`):

GitLab usernames to scrape projects from

## `groupPaths` (type: `array`):

GitLab groups to scrape projects from

## `maxResults` (type: `integer`):

Maximum number of projects to extract per query

## `includeDetails` (type: `boolean`):

Fetch additional details like README, merge requests, and issues count

## `proxyConfiguration` (type: `object`):

Proxy settings for scraping GitLab

## Actor input object example

```json
{
  "searchQueries": [
    "machine learning",
    "react"
  ],
  "projectPaths": [
    "gitlab-org/gitlab",
    "microsoft/vscode"
  ],
  "userNames": [
    "gitlab-org"
  ],
  "groupPaths": [
    "gitlab-org"
  ],
  "maxResults": 50,
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset containing all extracted GitLab projects

## `stats` (type: `string`):

Execution statistics including project count and API calls

# 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 = {
    "searchQueries": [
        "machine learning",
        "react"
    ],
    "projectPaths": [
        "gitlab-org/gitlab",
        "microsoft/vscode"
    ],
    "userNames": [
        "gitlab-org"
    ],
    "groupPaths": [
        "gitlab-org"
    ],
    "maxResults": 50,
    "includeDetails": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("klondikeking/gitlab-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 = {
    "searchQueries": [
        "machine learning",
        "react",
    ],
    "projectPaths": [
        "gitlab-org/gitlab",
        "microsoft/vscode",
    ],
    "userNames": ["gitlab-org"],
    "groupPaths": ["gitlab-org"],
    "maxResults": 50,
    "includeDetails": True,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

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

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

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "machine learning",
    "react"
  ],
  "projectPaths": [
    "gitlab-org/gitlab",
    "microsoft/vscode"
  ],
  "userNames": [
    "gitlab-org"
  ],
  "groupPaths": [
    "gitlab-org"
  ],
  "maxResults": 50,
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call klondikeking/gitlab-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=klondikeking/gitlab-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Gitlab Scraper",
        "version": "1.0",
        "x-build-id": "yNVkKcJH4JUI3ajju"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/klondikeking~gitlab-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-klondikeking-gitlab-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/klondikeking~gitlab-scraper/runs": {
            "post": {
                "operationId": "runs-sync-klondikeking-gitlab-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/klondikeking~gitlab-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-klondikeking-gitlab-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "maxResults"
                ],
                "properties": {
                    "searchQueries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "Search terms to find GitLab projects (e.g., 'machine learning', 'react')",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "projectPaths": {
                        "title": "Project Paths",
                        "type": "array",
                        "description": "Specific project paths to scrape (e.g., 'gitlab-org/gitlab')",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "userNames": {
                        "title": "Usernames",
                        "type": "array",
                        "description": "GitLab usernames to scrape projects from",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "groupPaths": {
                        "title": "Group Paths",
                        "type": "array",
                        "description": "GitLab groups to scrape projects from",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of projects to extract per query",
                        "default": 100
                    },
                    "includeDetails": {
                        "title": "Include Detailed Data",
                        "type": "boolean",
                        "description": "Fetch additional details like README, merge requests, and issues count",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for scraping GitLab",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
