{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Repo Intel — Search, Stars, Activity, Contributors",
    "description": "GitHub repository intelligence for AI agents and analysts: explicit repos, repository search with qualifiers (stars, language, topic, dates, license), org/user listings.",
    "version": "0.1",
    "x-build-id": "1q5epCcfpLu8sLMHa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~github-repo-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-github-repo-intel",
        "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/yadroo~github-repo-intel/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-github-repo-intel",
        "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/yadroo~github-repo-intel/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-github-repo-intel",
        "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",
        "properties": {
          "repos": {
            "title": "Repositories",
            "type": "array",
            "description": "Explicit repositories to analyse. Accepts `owner/repo`, full github.com URLs (sub-paths, `.git`, query strings are tolerated) or `git@github.com:owner/repo.git`. Each is fetched with all enabled enrichments.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Repository search queries",
            "type": "array",
            "description": "GitHub repository-search queries (same syntax as github.com/search?type=repositories). Free text plus qualifiers: `stars:>500`, `language:typescript`, `topic:mcp`, `created:>=2026-01-01`, `pushed:>2026-06-01`, `license:mit`, `archived:false`, `fork:false`, `org:apify`, `user:someone`, `in:name,description,readme`, `good-first-issues:>5`, `help-wanted-issues:>0`, `is:public`, `template:false`. The structured filters below are appended automatically unless you already wrote that qualifier. Each query returns up to `maxItems` repositories (GitHub caps any search at 1000). Not code search — `path:`/`extension:` are rejected.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "best-match",
              "stars",
              "forks",
              "help-wanted-issues",
              "updated"
            ],
            "type": "string",
            "description": "Sort order for `searchQueries` (GitHub search API `sort`).",
            "default": "best-match"
          },
          "searchOrder": {
            "title": "Search order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction for `searchSort`. Ignored for best-match.",
            "default": "desc"
          },
          "orgs": {
            "title": "Organisations",
            "type": "array",
            "description": "GitHub organisation logins (e.g. `apify`, `vercel`) — lists their repositories via GET /orgs/{org}/repos, newest push first, up to `maxItems` each after filters.",
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "GitHub user logins — lists their public repositories via GET /users/{user}/repos, up to `maxItems` each after filters.",
            "items": {
              "type": "string"
            }
          },
          "listType": {
            "title": "Listing type (orgs/users)",
            "enum": [
              "sources",
              "all",
              "public",
              "forks",
              "member"
            ],
            "type": "string",
            "description": "Which repositories to list for `orgs`/`users`. For users the API only supports all/owner/member, so `sources`/`forks`/`public` are emulated by filtering owner repos.",
            "default": "sources"
          },
          "listSort": {
            "title": "Listing sort (orgs/users)",
            "enum": [
              "pushed",
              "updated",
              "created",
              "full_name"
            ],
            "type": "string",
            "description": "Server-side sort for `orgs`/`users` listings (descending).",
            "default": "pushed"
          },
          "maxItems": {
            "title": "Max repositories per query / org / user",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap for each search query and each org/user listing (explicit `repos` are always all fetched). Keep small without a token: each listed repo costs 0 extra requests unless `enrichListed` is on.",
            "default": 20
          },
          "minStars": {
            "title": "Min stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only repositories with at least this many stars (search: `stars:>=N`)."
          },
          "maxStars": {
            "title": "Max stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only repositories with at most this many stars — useful to find early-stage projects or acquisition targets."
          },
          "language": {
            "title": "Primary language",
            "type": "string",
            "description": "Primary language exactly as GitHub names it (e.g. `TypeScript`, `Python`, `Go`, `Rust`, `Jupyter Notebook`). Case-insensitive."
          },
          "pushedAfter": {
            "title": "Pushed after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "YYYY-MM-DD. Only repositories with a commit push on/after this date (search: `pushed:>=DATE`). Good proxy for 'still maintained'."
          },
          "createdAfter": {
            "title": "Created after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "YYYY-MM-DD. Only repositories created on/after this date — find new entrants in a niche."
          },
          "excludeForks": {
            "title": "Exclude forks",
            "type": "boolean",
            "description": "Drop forked repositories (search: `fork:false`).",
            "default": false
          },
          "excludeArchived": {
            "title": "Exclude archived",
            "type": "boolean",
            "description": "Drop archived (read-only) repositories (search: `archived:false`).",
            "default": false
          },
          "enrichListed": {
            "title": "Enrich search / listing results",
            "type": "boolean",
            "description": "Also run the enrichments below on repositories found via `searchQueries`, `orgs` and `users`. Off = only the fields GitHub returns in list responses (stars, forks, language, license, topics, dates, open issues) — zero extra requests.",
            "default": false
          },
          "includeReleases": {
            "title": "Latest releases",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "How many latest releases to include (tag, name, date, prerelease flag). Also fills `latestRelease` and `daysSinceRelease`. 0 = skip.",
            "default": 5
          },
          "includeContributors": {
            "title": "Top contributors",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many top contributors (login, commit count, bot flag) to include. Also fills `contributorsCount` (total) and `topContributorShare` (% of commits by #1 — bus-factor signal). 0 = skip.",
            "default": 10
          },
          "includeLanguages": {
            "title": "Language breakdown",
            "type": "boolean",
            "description": "Fetch /languages → `languages` (percent by bytes) and `languageBytes`.",
            "default": true
          },
          "includeCommitActivity": {
            "title": "Commit activity (52 weeks)",
            "type": "boolean",
            "description": "Fetch weekly commit counts → `commits52w`, `commits12w`, `commits4w`, `activeWeeks52w`, `lastActiveWeek`. GitHub computes this lazily; for a cold repo the first call may return nothing (the actor retries a few times, then leaves nulls and warns).",
            "default": true
          },
          "includeLatestCommit": {
            "title": "Latest commit + total commits",
            "type": "boolean",
            "description": "Fetch the latest commit on the default branch (`latestCommit`: sha, date, author, message) and derive `totalCommits` from pagination headers — one request.",
            "default": false
          },
          "includeCommunityProfile": {
            "title": "Community health profile",
            "type": "boolean",
            "description": "Fetch /community/profile → `community`: health %, presence of README, LICENSE, CONTRIBUTING, code of conduct, issue/PR templates. Useful for open-source due diligence.",
            "default": false
          },
          "includeIssuePrSplit": {
            "title": "Split open issues vs pull requests",
            "type": "boolean",
            "description": "GitHub's `openIssues` counts issues AND pull requests together. This runs two issue-search queries per repo to fill `openIssuesOnly` and `openPullRequests`. Costs the search-API quota (10 requests/min without token, 30 with) — enable for small batches or with a token.",
            "default": false
          },
          "includeReadme": {
            "title": "Include README (first 4000 chars)",
            "type": "boolean",
            "description": "Decode the repository README and include the first 4000 characters as `readme` plus `readmeUrl`.",
            "default": false
          },
          "fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Optional whitelist of top-level output fields (e.g. `[\"stars\",\"forks\",\"pushedAt\",\"commits4w\"]`). `id`, `fullName`, `url`, `fetchedAt` are always kept. Empty = all fields.",
            "items": {
              "type": "string"
            }
          },
          "token": {
            "title": "GitHub token (optional)",
            "type": "string",
            "description": "Personal access token or GitHub App token (no scopes needed for public data). Raises limits from 60 to 5000 core requests/hour and from 10 to 30 search requests/minute, and lets you read private repositories you have access to. The actor works without it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}