# GitLab Trending Scraper (`ef12/gitlab-trending-scraper`) Actor

Scrape trending and popular GitLab projects by language and sort order. Get project names, descriptions, stars, forks, and activity dates via the GitLab REST API.

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

## Pricing

Pay per event

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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Trending Scraper

A serverless [Apify Actor](https://apify.com/actors) that fetches trending and popular public projects from [GitLab](https://gitlab.com) using the official [GitLab REST API](https://docs.gitlab.com/api/). No HTML scraping, no browser overhead — just clean API data delivered to your dataset.

### What does GitLab Trending Scraper do?

This Actor queries the `gitlab.com/api/v4/projects` endpoint to retrieve public GitLab projects sorted by stars, activity, creation date, or last update time. You can filter by programming language, set a minimum star threshold, or search by keywords in project names and descriptions. Results are pushed to the Apify dataset as structured JSON, ready for export, API access, or further processing.

Unlike web scrapers that parse HTML, this Actor calls the REST API directly — it's faster, more reliable, and won't break when the UI changes.

### Why use GitLab Trending Scraper?

**Discover popular open-source projects.** Whether you're looking for the most-starred Python libraries, the most active Rust frameworks, or trending new projects in your tech stack — this Actor surfaces them instantly.

**Market research and competitive analysis.** Track which types of projects gain traction, what languages dominate specific categories, and how activity patterns shift over time.

**Data enrichment and curation.** Build catalogs of relevant GitLab projects for internal tooling, training datasets, or community resources.

**CI/CD and automation pipelines.** Integrate with Apify's schedule, webhook, and API ecosystem to run recurring scans and feed results into your workflows.

**No authentication required.** GitLab's public projects API is free and open — you don't need an API token or proxy configuration to start scraping.

### Use Cases

- **Open-source discovery**: Find the top 100 most-starred projects each week and push them to a Slack channel or Airtable base.
- **Language trend analysis**: Monitor which programming languages are gaining the most projects each month, filtered by `sort=activity` and a language filter.
- **Competitive benchmarking**: Track star and fork counts for projects in your domain to benchmark your own project's growth.
- **Seed data for recommendation engines**: Build a curated dataset of high-quality open-source projects for a tool discovery platform.
- **Data pipeline feedstock**: Use Apify's API to trigger this Actor hourly, pass results through a webhook, and feed them into a dashboard or database.

### How to use GitLab Trending Scraper

1. **Run the Actor** — Open the Actor in Apify Console and click **Run**. Or use the API with a POST request.
2. **Configure input** — Set your sort order, filters, and result limits in the Input tab. See the **Input** section below for all available options.
3. **Get your data** — When the run finishes, the results appear in the **Output** tab. You can export them as JSON, CSV, HTML, Excel, or XML.

#### Running locally

```bash
apify run --input-file=test-input.json
````

### Input

All input fields are optional except when noted.

| Field | Type | Default | Description |
| ------- | ------ | --------- | ------------- |
| `sort` | enum | `stars` | Sort criterion. Options: `stars`, `activity`, `created`, `updated` |
| `language` | string | — | Filter by primary programming language (e.g., `python`, `javascript`, `rust`) |
| `max_results` | integer | `25` | Maximum number of projects to return (max `100`) |
| `min_stars` | integer | `0` | Only include projects with at least this many stars |
| `search` | string | — | Optional search query matched against project name and description |

#### Example input

```json
{
    "sort": "stars",
    "language": "python",
    "max_results": 10,
    "min_stars": 100,
    "search": "machine learning"
}
```

### Output

Each result is a JSON object with the following fields:

```json
{
    "name": "GitLab",
    "full_path": "gitlab-org/gitlab",
    "url": "https://gitlab.com/gitlab-org/gitlab",
    "description": "GitLab is a complete DevOps platform...",
    "language": "Ruby",
    "stars": 6068,
    "forks": 4600,
    "open_issues_count": 720,
    "last_activity_at": "2026-07-11T23:51:42.143Z",
    "created_at": "2013-09-26T06:02:36.000Z",
    "visibility": "public",
    "readme_url": "https://gitlab.com/gitlab-org/gitlab/-/blob/master/README.md"
}
```

You can download the dataset in formats such as JSON, HTML, CSV, or Excel from the Apify Console.

#### Data fields

| Field | Type | Description |
| ------- | ------ | ------------- |
| `name` | string | Project name |
| `full_path` | string | Full namespace and path (e.g., `gitlab-org/gitlab`) |
| `url` | string | GitLab project URL |
| `description` | string | Project description |
| `language` | string | Primary programming language (nullable) |
| `stars` | integer | Star count |
| `forks` | integer | Fork count |
| `open_issues_count` | integer | Number of open issues |
| `last_activity_at` | string | ISO 8601 timestamp of last activity |
| `created_at` | string | ISO 8601 timestamp of creation |
| `visibility` | string | Visibility level (always `public` for this scraper) |
| `readme_url` | string | Direct URL to the project's README file |

### Pricing / Cost estimation

How much does it cost to scrape GitLab trending projects?

Each Actor run charges a small startup event (`apify-actor-start` at $0.00005) and a per-result event (`result` at $0.003) for results beyond the **first 10 free results per run**.

For example:

- **5 results**: $0.00005 (only the startup fee, no result charges)
- **25 results**: $0.00005 + 15 × $0.003 = **$0.045**
- **100 results**: $0.00005 + 90 × $0.003 = **$0.27**

Results are counted per run — running the same query twice with `max_results: 100` charges twice.

### Tips and advanced options

- Use `search` together with `sort` to find projects matching a specific topic sorted by popularity. For example, search for `"machine learning"` with `sort=stars` to find the most-starred ML projects on GitLab.
- Use the `language` filter to narrow results to a specific programming language. This filter is applied after the API fetch, so results capped at `max_results` might include mixed-language projects if the API doesn't return enough language-tagged results.
- Set `min_stars` to filter out small or experimental projects. The default `0` returns everything, which includes projects with no stars and no activity.
- For recurring monitoring, schedule the Actor in Apify Console to run daily or weekly, and use webhooks to push results to your own infrastructure.

### FAQ, disclaimers, and support

**Is this legal?** Yes. This Actor scrapes only public projects using GitLab's official REST API. All data is publicly accessible without authentication. You should review and comply with GitLab's Terms of Service when using their API.

**Why doesn't the API return languages for some projects?** GitLab's API only reports a primary language when the project has detectable source code. Configuration-only repositories or projects without recognized languages return `null`.

**I need a custom version of this Actor.** Submit an issue on the Issues tab or contact the author for custom development and consulting.

**Found a bug or have a feature request?** Open an issue on the [GitHub repository](https://github.com/apify/fleet) or the Apify Actor's Issues tab.

# Actor input Schema

## `sort` (type: `string`):

Sort projects by this criterion

## `language` (type: `string`):

Filter by primary programming language (e.g. python, javascript, rust)

## `max_results` (type: `integer`):

Maximum number of projects to return

## `min_stars` (type: `integer`):

Only include projects with at least this many stars

## `search` (type: `string`):

Optional search query to filter by project name/description

## Actor input object example

```json
{
  "sort": "stars",
  "language": "",
  "max_results": 25,
  "min_stars": 0,
  "search": ""
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ef12/gitlab-trending-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ef12/gitlab-trending-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 '{}' |
apify call ef12/gitlab-trending-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GitLab Trending Scraper",
        "description": "Scrape trending and popular GitLab projects by language and sort order. Get project names, descriptions, stars, forks, and activity dates via the GitLab REST API.",
        "version": "0.0",
        "x-build-id": "iTAmbs5ASo6Hza7Vd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ef12~gitlab-trending-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ef12-gitlab-trending-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/ef12~gitlab-trending-scraper/runs": {
            "post": {
                "operationId": "runs-sync-ef12-gitlab-trending-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/ef12~gitlab-trending-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-ef12-gitlab-trending-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",
                "properties": {
                    "sort": {
                        "title": "Sort by",
                        "enum": [
                            "stars",
                            "activity",
                            "created",
                            "updated"
                        ],
                        "type": "string",
                        "description": "Sort projects by this criterion",
                        "default": "stars"
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Filter by primary programming language (e.g. python, javascript, rust)",
                        "default": ""
                    },
                    "max_results": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of projects to return",
                        "default": 25
                    },
                    "min_stars": {
                        "title": "Minimum Stars",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include projects with at least this many stars",
                        "default": 0
                    },
                    "search": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Optional search query to filter by project name/description",
                        "default": ""
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
