# 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
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 per 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 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(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 '{}' |
apify call ef12/gitlab-trending-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ef12/gitlab-trending-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/yjZbZ4g8eluYis6y7/builds/iTAmbs5ASo6Hza7Vd/openapi.json
