# GitLab Public Projects API Scraper (`ahmdshrif/gitlab-public-projects-api-scraper`) Actor

Exports GitLab public project metadata—stars, forks, topics, namespace, and repo URLs—pulled directly from GitLab's official REST API.

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

## Pricing

$0.20 / 1,000 project record scrapeds

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?

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 Public Projects API Scraper

Exports GitLab public project metadata — stars, forks, topics, namespace, and repo URLs — pulled directly from GitLab's official REST API. Built for developers, researchers, and lead-gen teams who need structured data on public GitLab projects (open source tooling surveys, dependency/ecosystem mapping, sourcing companies or maintainers running self-hosted or public GitLab groups) without writing their own API pagination and auth handling.

### Why this scraper

- Pulls straight from GitLab's official JSON API (`gitlab.com/api/v4/projects`) rather than parsing rendered HTML pages, so there's no markup to break and no parsing errors — output reflects the API's live data at request time.
- Returns 24 flat fields per project, including full namespace details (group/user, path, web URL) and both HTTPS/SSH clone URLs, in one row — no follow-up calls needed to resolve namespace info.
- Priced at $0.0002 per record, well under a per-record cost of $0.0004 and far cheaper than per-start pricing models once you're pulling more than a handful of projects.

### Output fields

| Field | Type | Description |
|---|---|---|
| id | integer | GitLab project ID |
| name | string | Project name |
| name\_with\_namespace | string | Project name including owning namespace |
| path | string | URL-safe project path |
| path\_with\_namespace | string | Full path including namespace, e.g. gitlab-org/gitlab |
| description | string | Project description text |
| created\_at | string | ISO timestamp the project was created |
| last\_activity\_at | string | ISO timestamp of last project activity |
| default\_branch | string | Default git branch name |
| star\_count | integer | Number of stars |
| forks\_count | integer | Number of forks |
| visibility | string | Project visibility level (e.g. public) |
| web\_url | string | GitLab web URL for the project |
| http\_url\_to\_repo | string | HTTPS clone URL |
| ssh\_url\_to\_repo | string | SSH clone URL |
| readme\_url | string | URL to the project README |
| avatar\_url | string | Project avatar image URL |
| topics | string | Comma-separated list of project topics/tags |
| namespace\_id | integer | ID of the owning namespace (group or user) |
| namespace\_name | string | Name of the owning namespace |
| namespace\_path | string | Path of the owning namespace |
| namespace\_kind | string | Namespace kind: group or user |
| namespace\_full\_path | string | Full path of the owning namespace |
| namespace\_web\_url | string | Web URL of the owning namespace |

### Input

```json
{
  "startUrls": [
    { "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=star_count" }
  ],
  "maxItems": 50
}
```

### Output

```json
{
  "id": 13083,
  "name": "GitLab FOSS",
  "name_with_namespace": "GitLab.org / GitLab FOSS",
  "path": "gitlab-foss",
  "path_with_namespace": "gitlab-org/gitlab-foss",
  "description": "GitLab FOSS is a read-only mirror of GitLab, with all proprietary code removed.\n\nThis project was previously used to host GitLab Community Edition, but all development has now moved to https://gitlab.com/gitlab-org/gitlab.\n",
  "created_at": "2013-09-26T06:02:36.000Z",
  "last_activity_at": "2026-08-29T13:24:14.593Z",
  "default_branch": "master",
  "star_count": 7171,
  "forks_count": 8276,
  "visibility": "public",
  "web_url": "https://gitlab.com/gitlab-org/gitlab-foss",
  "http_url_to_repo": "https://gitlab.com/gitlab-org/gitlab-foss.git",
  "ssh_url_to_repo": "git@gitlab.com:gitlab-org/gitlab-foss.git",
  "readme_url": "https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/README.md",
  "avatar_url": "https://gitlab.com/uploads/-/system/project/avatar/13083/project_avatar.png?v=1788009854",
  "topics": "Canonical, hacktoberfest, infra-mgmt Managed",
  "namespace_id": 9970,
  "namespace_name": "GitLab.org",
  "namespace_path": "gitlab-org",
  "namespace_kind": "group",
  "namespace_full_path": "gitlab-org",
  "namespace_web_url": "https://gitlab.com/groups/gitlab-org"
}
```

### Pricing

Pay $0.0002 per project record scraped. Pulling 50 projects (one API page) costs about $0.01; scraping 5,000 projects costs about $1.00.

### Use cases

- Tracking star/fork growth of open source projects under a specific GitLab group (e.g. monitoring `gitlab-org` subprojects over time) for an internal OSS health dashboard.
- Building a lead list of companies and teams running active public GitLab groups, using namespace and web\_url fields to find contact-worthy organizations.
- Auditing topics and default branches across a namespace's projects to standardize CI/CD conventions or find unmaintained repos (via `last_activity_at`).

# Actor input Schema

## `startUrls` (type: `array`):

Pages to export.

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

Stop after this many records.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=star_count"
    },
    {
      "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=last_activity_at"
    },
    {
      "url": "https://gitlab.com/api/v4/projects?per_page=50&visibility=public"
    }
  ],
  "maxItems": 50
}
```

# Actor output Schema

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

One structured record per input URL.

# 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 = {
    "startUrls": [
        {
            "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=star_count"
        },
        {
            "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=last_activity_at"
        },
        {
            "url": "https://gitlab.com/api/v4/projects?per_page=50&visibility=public"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmdshrif/gitlab-public-projects-api-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 = { "startUrls": [
        { "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=star_count" },
        { "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=last_activity_at" },
        { "url": "https://gitlab.com/api/v4/projects?per_page=50&visibility=public" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ahmdshrif/gitlab-public-projects-api-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 '{
  "startUrls": [
    {
      "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=star_count"
    },
    {
      "url": "https://gitlab.com/api/v4/projects?per_page=50&order_by=last_activity_at"
    },
    {
      "url": "https://gitlab.com/api/v4/projects?per_page=50&visibility=public"
    }
  ]
}' |
apify call ahmdshrif/gitlab-public-projects-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ahmdshrif/gitlab-public-projects-api-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/HUXOo9ViirPPdctCc/builds/TsvSkBuLnpH8YD8I3/openapi.json
