# Zigistry Scraper (`crawlerbros/zigistry-scraper`) Actor

Scrape Zigistry - the community index of Zig programming language packages and programs. Search or browse by topic, fetch full repo details with dependencies and releases, or pull curated trending lists (most-used, recently updated, web, GUI, games).

- **URL**: https://apify.com/crawlerbros/zigistry-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Developer tools, Automation, Lead generation
- **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/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

## Zigistry Scraper

Scrape [Zigistry](https://zigistry.dev) — the community-maintained index of packages and programs written in the [Zig](https://ziglang.org) programming language. Search or browse by topic, fetch full details for specific repositories (dependencies, releases, dependents), or pull curated trending lists. Pure HTTP against Zigistry's public JSON API — no auth, no proxy, no cookies.

### What this actor does

- **Three modes:** `search` (full-text + topic browse), `byRepo` (exact repo detail lookup), `trending` (curated lists)
- **Covers both catalogs:** reusable packages (libraries) and programs (applications)
- **Filters:** minimum stars, source host (GitHub/Codeberg), primary language, license (SPDX identifier), exclude archived repos
- **Sorting:** stars, dependents, recently updated, newly added, name, forks, issues, minimum Zig version
- **Empty fields are omitted** — you only ever see fields with real data

### Output per repository

- `id` — canonical repo id (e.g. `gh/hejsil/zig-clap`)
- `provider` — `github` or `codeberg`
- `ownerName`, `repoName`, `fullName`
- `description`, `primaryLanguage`, `license`
- `stargazerCount`, `forkCount`, `watchersCount`, `issuesCount`, `dependentsCount`
- `isArchived`, `isDisabled`, `isFork`
- `defaultBranchName`, `createdAt`, `pushedAt`
- `minimumZigVersion`
- `avatarUrl`, `repoUrl`, `sourceUrl` (the repo's GitHub/Codeberg page)
- **mode=byRepo only:** `latestVersion` (newest release, always populated even when `version` is pinned), `resolvedVersion` (present only when `version` was pinned to something other than the latest), `publishedAt`, `readmeUrl`, `isPrerelease`, `directoryFiles[]`, `dependencies[]` (`{name, url, hash, lazy, path}`), `releases[]`, `releaseCount`, `dependents[]` (capped at 25)
- `recordType: "package"` / `"program"`, `scrapedAt`
- **mode=trending only:** `trendingCategory` — which curated list (`recently_updated` / `most_used` / `latest` / `web` / `gui` / `games`) this record came from. When `category` is left blank (all categories), a repo that appears in more than one curated list is emitted once per list, each tagged with its own `trendingCategory` — use this field to tell those apart.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `byRepo` / `trending` |
| `packageType` | string | `packages` | `packages` / `programs` |
| `searchQuery` | string | – | Free-text query (mode=search) |
| `topic` | string | – | Filter by topic, e.g. `web`, `gui`, `game` |
| `sortBy` | string | `intelligent` | `stars` / `dependents` / `recently_updated` / `newly_added` / `name` / `forks` / `issues` / `zig_version` (`name` and `zig_version` are sorted client-side — see note below) |
| `sortDir` | string | `desc` | `asc` / `desc` |
| `repos` | array | – | Exact `owner/repo` (or `gh/owner/repo`, `cb/owner/repo`, full URL) list (mode=byRepo) |
| `version` | string | – | Exact release tag for `repos` lookups |
| `category` | string | (all) | Trending category (mode=trending) |
| `provider` | string | – | Filter by source host |
| `minStars` | int | – | Minimum star count |
| `language` | string | – | Filter by primary language (exact match, case-insensitive), e.g. `Zig`, `C`, `Rust` |
| `license` | string | – | Filter by SPDX license identifier (exact match, case-insensitive), e.g. `MIT`, `Apache-2.0`, `GPL-3.0` |
| `excludeArchived` | bool | `false` | Drop archived repos |
| `maxItems` | int | `50` | Hard cap (1–2000) |

#### Example: popular actively-maintained web packages

```json
{
  "mode": "search",
  "topic": "web",
  "sortBy": "stars",
  "excludeArchived": true,
  "minStars": 10,
  "maxItems": 30
}
```

#### Example: full detail on specific repos

```json
{
  "mode": "byRepo",
  "repos": ["hejsil/zig-clap", "floooh/sokol-zig", "cb/foreverzer0/klack"]
}
```

### Use cases

- Discover actively-maintained Zig libraries for a given domain (web, GUI, games)
- Audit a package's dependency tree and dependents before adopting it
- Track newly-added or trending Zig projects
- Build a curated "awesome-zig" style directory automatically

### FAQ

**Does this require a Zigistry account or API key?** No — Zigistry's package index is fully public.

**What's the difference between packages and programs?** Packages are reusable libraries meant to be depended on; programs are standalone applications. Zigistry maintains separate catalogs for each — set `packageType` accordingly.

**What does `sourceUrl` point to?** The repo's own GitHub or Codeberg page (`repoUrl`, duplicated as `sourceUrl`). Zigistry's own per-repo page is a client-rendered route with no server-side page to fetch, so it isn't used as a URL field here.

**Why does `sortBy: name` / `sortBy: zig_version` take longer than other sort options?** Zigistry's own API silently ignores those two sort keys server-side (confirmed empirically — `asc`/`desc` return different but equally unsorted order). To still deliver a correctly-sorted result, this actor fetches every matching record across all pages, sorts client-side, and then emits the top `maxItems`. Every other sort key (`stars`, `dependents`, `recently_updated`, `newly_added`, `forks`, `issues`, `intelligent`) is honored natively by Zigistry and streams page-by-page as usual.

**Why is `resolvedVersion` sometimes present and `latestVersion` sometimes absent?** When you pin `version` to an older release, Zigistry blanks its own `latest_version` field for that response — this actor backfills `latestVersion` from the repo's release list so it's always the true newest release. `resolvedVersion` is only added when the pinned version differs from the latest, so you can tell at a glance whether `dependencies`/`readmeUrl`/etc. describe an older release.

# Actor input Schema

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

What to fetch.

## `packageType` (type: `string`):

Zigistry catalogs both reusable libraries (packages) and end-user applications (programs).

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

Full-text query against name/description/keywords. Leave blank (with a topic) or use `*` to browse all.

## `topic` (type: `string`):

Filter to repos tagged with this GitHub/Codeberg topic, e.g. `web`, `gui`, `game`, `zig-package`.

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

Order of emitted records (mode=search).

## `sortDir` (type: `string`):

Direction to apply to `sortBy` (mode=search).

## `repos` (type: `array`):

Exact repos to fetch full details for. Accepts `owner/repo` (defaults to GitHub), `gh/owner/repo`, `cb/owner/repo`, or a full github.com/codeberg.org/zigistry.dev URL. E.g. `hejsil/zig-clap`.

## `version` (type: `string`):

Optional exact release tag to fetch instead of the latest (applies to all `repos`).

## `category` (type: `string`):

Curated list to fetch. `web`/`gui`/`games` only apply when Package type = Packages. Leave blank to fetch all categories.

## `provider` (type: `string`):

Only include repos hosted on this forge.

## `minStars` (type: `integer`):

Only include repos with at least this many stars.

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

Only include repos whose GitHub/Codeberg-detected primary language exactly matches this (case-insensitive), e.g. `Zig`, `C`, `C++`, `Rust`. Most repos are `Zig`; use this to find e.g. pure-C bindings or non-Zig tooling. Applied client-side.

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

Only include repos published under this SPDX license identifier (case-insensitive exact match against the repo's detected license file). Applied client-side -- Zigistry's search API silently ignores any `license` query param. Leave blank for any license. Repos with no detected/confidently-matched license are excluded when this filter is set.

## `excludeArchived` (type: `boolean`):

Drop repos that have been archived by their owner.

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "packageType": "packages",
  "searchQuery": "http",
  "sortBy": "intelligent",
  "sortDir": "desc",
  "repos": [],
  "category": "",
  "provider": "",
  "language": "",
  "license": "",
  "excludeArchived": false,
  "maxItems": 50
}
```

# Actor output Schema

## `repositories` (type: `string`):

Dataset containing all scraped Zigistry packages/programs.

# 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",
    "packageType": "packages",
    "searchQuery": "http",
    "sortBy": "intelligent",
    "sortDir": "desc",
    "repos": [],
    "category": "",
    "provider": "",
    "language": "",
    "license": "",
    "excludeArchived": false,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/zigistry-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",
    "packageType": "packages",
    "searchQuery": "http",
    "sortBy": "intelligent",
    "sortDir": "desc",
    "repos": [],
    "category": "",
    "provider": "",
    "language": "",
    "license": "",
    "excludeArchived": False,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/zigistry-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",
  "packageType": "packages",
  "searchQuery": "http",
  "sortBy": "intelligent",
  "sortDir": "desc",
  "repos": [],
  "category": "",
  "provider": "",
  "language": "",
  "license": "",
  "excludeArchived": false,
  "maxItems": 50
}' |
apify call crawlerbros/zigistry-scraper --silent --output-dataset

```

## MCP server setup

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