# vcpkg C++ Package Scraper (`crawlerbros/vcpkg-scraper`) Actor

Scrape the vcpkg.io catalog of 2,850+ C++ libraries. Full-text search, exact lookup by name, reverse-dependency ("used by") lookup, license/platform browsing, and popularity ranking. Pure public JSON, no auth, no proxy.

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

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## vcpkg C++ Package Scraper

Scrape the [vcpkg.io](https://vcpkg.io) catalog — Microsoft's open-source package manager for C and C++, with 2,850+ libraries. Full-text search, exact lookup by package name, reverse-dependency ("Used By") lookup, browse by license or platform support, and popularity ranking by dependent count. Pure public JSON/HTML, no auth, no login, no proxy required.

### What this actor does

- **Six modes:** `search`, `byNames`, `usedBy`, `browse`, `byLicense`, `byPlatform`
- **Full-text search** across every package's name and description
- **Reverse-dependency lookup** — find every package that depends on a given library (e.g. everything that depends on `fmt` or `boost-asio`)
- **Popularity ranking** — sort by how many other packages depend on a library
- **License & platform browsing** — filter by SPDX license or by Windows/Linux/macOS/Android/UWP/Xbox/etc. platform support
- **Optional version history** — full historical `Version#Port-Version` list per package
- **Empty fields are omitted** — every record only contains fields with real data

### Output per package

- `name` — canonical vcpkg package name (e.g. `fmt`, `boost-asio`)
- `version`, `portVersion`, `fullVersion` (e.g. `12.2.0#1`)
- `description` — full description (multi-paragraph descriptions are joined; falls back to the port's one-line `Summary` for the small number of packages that only publish that field)
- `homepage`, `documentation` — project URLs
- `license` — raw SPDX license expression (e.g. `MIT`, `MIT OR Apache-2.0`)
- `supports` — raw platform-support boolean expression (e.g. `!uwp & !xbox`), when the package has one
- `supportedPlatforms[]` — curated platform tokens derived from `supports`
- `dependencies[]`, `dependencyCount` — direct runtime/build dependency names
- `hostDependencies[]` — dependencies needed only at build time (cross-compilation helpers)
- `features[]`, `featureCount` — optional installable features
- `featureDetails[]` — `{name, description}` for each optional feature that publishes a description (covers ~99% of features across the catalog)
- `defaultFeatures[]` — features enabled by default
- `maintainers[]`
- `lastModified`, `lastCommit` — last registry update date and git commit SHA
- `dependentCount` — how many other cataloged packages depend on this one (computed from the full catalog)
- `dependsOnPackages[]` — present only on `mode=usedBy` results; which of your queried names this package depends on
- `versionHistory[]`, `versionCount` — present only when `includeVersionHistory=true` (mode=byNames); each entry is `{version, portVersion}`
- `vcpkgUrl` — the package's page on vcpkg.io
- `vcpkgPortSourceUrl` — the port's source folder on GitHub
- `catalogBaseline` — the git commit SHA of the [microsoft/vcpkg](https://github.com/microsoft/vcpkg) registry this catalog snapshot was generated from (vcpkg.io's `output.json` `Baseline` field), useful for reproducibility/audit trails
- `recordType: "package"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `byNames` / `usedBy` / `browse` / `byLicense` / `byPlatform` |
| `searchQuery` | string | `json` | Free-text query matched against name + description (mode=search) |
| `packageNames` | array | `["fmt"]` | Exact package name(s) — full lookup (mode=byNames) or reverse-dependency target(s) (mode=usedBy) |
| `includeVersionHistory` | boolean | `false` | Fetch full version history per package (mode=byNames only, capped at first 20 names) |
| `license` | string | – | SPDX license filter — dropdown of ~20 common licenses, or `custom` + `licenseContains` for any other |
| `licenseContains` | string | – | Free-text license substring (overrides `license` dropdown); use for long-tail SPDX ids |
| `platformToken` | string | – | Platform token: `windows`, `linux`, `osx`, `android`, `uwp`, `xbox`, `freebsd`, `openbsd`, `mingw`, `arm`, `arm64`, `x64`, `x86`, `static`, `native` |
| `platformMode` | string | `supports` | `supports` (package builds on this platform) or `excludes` (package explicitly does not) |
| `hasHomepage` | boolean | `false` | Only emit packages that publish a project homepage URL (mode=search) |
| `sortBy` | string | `relevance` | `relevance` / `name` / `lastModified` / `mostDependents` |
| `maxItems` | integer | `20` | Hard cap on emitted records (1–2857 — the full catalog) |
| `offset` | integer | `0` | Skip this many matching records (pagination) |

`license`, `platformToken`, `hasHomepage`, and `sortBy` also work as optional filters on `mode=search`, so you can combine a text query with a license and/or platform constraint in one call.

#### Example: full-text search with filters

```json
{
  "mode": "search",
  "searchQuery": "json",
  "license": "MIT",
  "hasHomepage": true,
  "sortBy": "mostDependents",
  "maxItems": 20
}
```

#### Example: exact lookup with version history

```json
{
  "mode": "byNames",
  "packageNames": ["fmt", "spdlog", "nlohmann-json"],
  "includeVersionHistory": true
}
```

#### Example: who depends on a library

```json
{
  "mode": "usedBy",
  "packageNames": ["fmt"],
  "sortBy": "mostDependents",
  "maxItems": 100
}
```

#### Example: browse most-depended-upon packages

```json
{
  "mode": "browse",
  "sortBy": "mostDependents",
  "maxItems": 50
}
```

#### Example: packages under a specific license

```json
{
  "mode": "byLicense",
  "license": "Apache-2.0",
  "maxItems": 200
}
```

#### Example: packages that support Linux but not Windows

```json
{
  "mode": "byPlatform",
  "platformToken": "linux",
  "platformMode": "supports",
  "maxItems": 200
}
```

### Use cases

- **Dependency audits** — check which C++ libraries in your stack have security-relevant licenses (GPL/AGPL) before shipping
- **Build-system tooling** — bulk-export dependency graphs for internal package mirrors
- **Open-source research** — study the C++ ecosystem's dependency graph, most-relied-upon libraries, and license distribution
- **Migration planning** — find every package that depends on a library you're about to deprecate or replace
- **Platform-support audits** — find which libraries you can rely on for a cross-platform (Linux/macOS/Windows) build
- **Developer tooling** — power an internal package-search UI or CLI autocomplete for your organization's C++ projects

### FAQ

**What is vcpkg?** [vcpkg](https://vcpkg.io) is Microsoft's open-source C/C++ package manager, used to build and install third-party libraries on Windows, Linux, and macOS. The catalog has 2,850+ ports (packages).

**What's a "port"?** vcpkg calls each package a "port" — the recipe that builds a given library from source for a given platform triplet.

**What are `Version` and `Port-Version`?** `Version` is the upstream library's release version. `Port-Version` increments when the *build recipe* changes without the underlying library version changing (bug fixes to the packaging itself). `fullVersion` combines both as `12.2.0#1`.

**Why do some packages have no `license` or `homepage`?** Not every port declares these fields in its manifest. The actor only includes fields the source actually provides — no placeholders.

**How is `dependentCount` computed?** By scanning the entire catalog once per run and counting every package whose dependencies (including dependencies gated behind an optional feature) reference the target package. It matches the "Used By" count shown on vcpkg.io's own package pages.

**What's the difference between `dependencies` and `features`?** `dependencies` are always installed. `features` are optional add-ons a consumer can opt into (e.g. a `benchmark` feature that pulls in a testing library only when enabled). `defaultFeatures` are features enabled automatically unless a consumer opts out.

**What does `supports` mean, and how does `platformToken` filtering work?** vcpkg ports declare a boolean platform expression (e.g. `!uwp & !xbox`, `linux | osx`) describing which platforms they build on. `platformToken` filtering evaluates that expression with your chosen token set to true and every other token false — this is precise for simple single-platform expressions (the vast majority) but can under-report compatibility for exotic multi-architecture expressions that combine an OS token with a specific CPU architecture token (e.g. `linux & x64`). Treat results as directionally accurate. Packages with no `supports` field at all have no platform restriction and are treated as universally supported.

**Why is `licenseContains` separate from `license`?** vcpkg ports use ~180 unique license strings, including SPDX combinators (`AND`/`OR`/`WITH`). The `license` dropdown covers the ~20 most common single SPDX identifiers (matched as a substring, so it also matches compound expressions like `MIT OR Apache-2.0`). For anything else, `licenseContains` accepts free text.

**How fresh is the data?** The catalog is Microsoft's live `vcpkg.io/output.json` export, regenerated whenever a port is added or updated in the [microsoft/vcpkg](https://github.com/microsoft/vcpkg) repository — typically several times a day.

**Is version history available for every mode?** Only as an opt-in enrichment on `mode=byNames` (`includeVersionHistory=true`), capped at the first 20 requested names per run, since it requires one extra page fetch per package.

**Is this affiliated with vcpkg or Microsoft?** No, this is a third-party actor using the public vcpkg.io catalog data. It is not affiliated with, endorsed by, or sponsored by Microsoft or the vcpkg project.

# Actor input Schema

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

What to fetch from the vcpkg catalog.

## `searchQuery` (type: `string`):

Free-text query matched against the package name and description (mode=search).

## `packageNames` (type: `array`):

Exact vcpkg package names, e.g. `fmt`, `boost-asio`, `openssl` (mode=byNames returns their full records; mode=usedBy returns every package that depends on any of them). Case-insensitive.

## `includeVersionHistory` (type: `boolean`):

Fetch the full historical version list (e.g. every published Version#Port-Version) for each looked-up package. Only applies to mode=byNames and is capped at the first 20 package names to keep runs bounded.

## `license` (type: `string`):

Filter to packages under this SPDX license (mode=byLicense requires this or `licenseContains`; also usable as an optional filter on mode=search). Matches as a substring, so `MIT` also matches compound expressions like `MIT OR Apache-2.0`. Choose "Other" to match free text via `licenseContains` instead.

## `licenseContains` (type: `string`):

Free-text substring to match against a package's license string. Overrides `license` when set. Use this for the ~160 long-tail SPDX identifiers not in the dropdown (e.g. `MPL-1.1`, `Python-2.0`, `NCSA`, `WTFPL`, `OFL-1.1`, `Ruby`).

## `platformToken` (type: `string`):

A vcpkg platform/triplet token parsed out of a package's `Supports` expression (mode=byPlatform requires this; also usable as an optional filter on mode=search).

## `platformMode` (type: `string`):

Whether `platformToken` should include packages that support the platform, or ones that explicitly exclude it.

## `hasHomepage` (type: `boolean`):

Only emit packages that publish a project homepage URL (mode=search).

## `sortBy` (type: `string`):

Result ordering for mode=search and mode=browse. `relevance` only applies when a search query is present.

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

Hard cap on emitted records.

## `offset` (type: `integer`):

Skip this many matching records before emitting (for pagination through large result sets).

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "json",
  "packageNames": [
    "fmt"
  ],
  "includeVersionHistory": false,
  "license": "",
  "platformToken": "",
  "platformMode": "supports",
  "hasHomepage": false,
  "sortBy": "relevance",
  "maxItems": 20,
  "offset": 0
}
```

# Actor output Schema

## `packages` (type: `string`):

Dataset containing all scraped vcpkg packages.

# 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 = {
    "mode": "search",
    "searchQuery": "json",
    "packageNames": [
        "fmt"
    ],
    "includeVersionHistory": false,
    "license": "",
    "platformToken": "",
    "platformMode": "supports",
    "hasHomepage": false,
    "sortBy": "relevance",
    "maxItems": 20,
    "offset": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/vcpkg-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 = {
    "mode": "search",
    "searchQuery": "json",
    "packageNames": ["fmt"],
    "includeVersionHistory": False,
    "license": "",
    "platformToken": "",
    "platformMode": "supports",
    "hasHomepage": False,
    "sortBy": "relevance",
    "maxItems": 20,
    "offset": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/vcpkg-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 '{
  "mode": "search",
  "searchQuery": "json",
  "packageNames": [
    "fmt"
  ],
  "includeVersionHistory": false,
  "license": "",
  "platformToken": "",
  "platformMode": "supports",
  "hasHomepage": false,
  "sortBy": "relevance",
  "maxItems": 20,
  "offset": 0
}' |
apify call crawlerbros/vcpkg-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/vcpkg-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/FjsriIziDOxAHKkvE/builds/tTAC0zJwzWednfw9R/openapi.json
