{
  "openapi": "3.0.1",
  "info": {
    "title": "Zigistry Scraper",
    "description": "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).",
    "version": "1.0",
    "x-build-id": "0f1xdq402g3QqlwL7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~zigistry-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-zigistry-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/crawlerbros~zigistry-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-zigistry-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/crawlerbros~zigistry-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-zigistry-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byRepo",
              "trending"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "packageType": {
            "title": "Package type",
            "enum": [
              "packages",
              "programs"
            ],
            "type": "string",
            "description": "Zigistry catalogs both reusable libraries (packages) and end-user applications (programs).",
            "default": "packages"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Full-text query against name/description/keywords. Leave blank (with a topic) or use `*` to browse all.",
            "default": "http"
          },
          "topic": {
            "title": "Topic (mode=search)",
            "type": "string",
            "description": "Filter to repos tagged with this GitHub/Codeberg topic, e.g. `web`, `gui`, `game`, `zig-package`."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "intelligent",
              "stars",
              "dependents",
              "recently_updated",
              "newly_added",
              "name",
              "forks",
              "issues",
              "zig_version"
            ],
            "type": "string",
            "description": "Order of emitted records (mode=search).",
            "default": "intelligent"
          },
          "sortDir": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction to apply to `sortBy` (mode=search).",
            "default": "desc"
          },
          "repos": {
            "title": "Repositories (mode=byRepo)",
            "type": "array",
            "description": "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`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "version": {
            "title": "Version (mode=byRepo)",
            "type": "string",
            "description": "Optional exact release tag to fetch instead of the latest (applies to all `repos`)."
          },
          "category": {
            "title": "Category (mode=trending)",
            "enum": [
              "",
              "recently_updated",
              "most_used",
              "latest",
              "web",
              "gui",
              "games"
            ],
            "type": "string",
            "description": "Curated list to fetch. `web`/`gui`/`games` only apply when Package type = Packages. Leave blank to fetch all categories.",
            "default": ""
          },
          "provider": {
            "title": "Source host filter",
            "enum": [
              "",
              "github",
              "codeberg"
            ],
            "type": "string",
            "description": "Only include repos hosted on this forge.",
            "default": ""
          },
          "minStars": {
            "title": "Min stars",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only include repos with at least this many stars."
          },
          "language": {
            "title": "Primary language filter",
            "type": "string",
            "description": "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.",
            "default": ""
          },
          "license": {
            "title": "License filter",
            "enum": [
              "",
              "MIT",
              "Apache-2.0",
              "GPL-3.0",
              "GPL-2.0",
              "LGPL-3.0",
              "LGPL-2.1",
              "AGPL-3.0",
              "MPL-2.0",
              "BSD-3-Clause",
              "BSD-2-Clause",
              "0BSD",
              "Unlicense",
              "Zlib",
              "ISC",
              "BSL-1.0",
              "CC0-1.0",
              "EUPL-1.2",
              "MIT-0",
              "WTFPL"
            ],
            "type": "string",
            "description": "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.",
            "default": ""
          },
          "excludeArchived": {
            "title": "Exclude archived repos",
            "type": "boolean",
            "description": "Drop repos that have been archived by their owner.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}