{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Scraper — Repos, Issues, PRs & Code",
    "description": "Scrape GitHub deeply — repos, issues, PRs, code search, contributors, releases, READMEs, commits, users, trending. 11 modes in one actor for AI coding agents (Claude Code, Cursor, Copilot). Optional PAT for 5K req/hr. MCP-ready, flat JSON output.",
    "version": "0.1",
    "x-build-id": "4dcGdJA84Gm22kFMo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~github-deep-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-github-deep-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/khadinakbar~github-deep-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-github-deep-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/khadinakbar~github-deep-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-github-deep-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": "Scraping mode",
            "enum": [
              "repo",
              "repo-search",
              "issues",
              "prs",
              "code-search",
              "contributors",
              "releases",
              "readme",
              "commits",
              "user",
              "trending"
            ],
            "type": "string",
            "description": "Which GitHub surface to scrape. One actor, 11 modes. Pick exactly one. 'repo' = full metadata for one repo (50+ fields). 'repo-search' = keyword/qualifier search. 'issues'/'prs' = list issues/PRs for a repo with comments, labels, reviews. 'code-search' = search code across GitHub (REQUIRES GITHUB_TOKEN env var). 'contributors' = repo contributors with profile data. 'releases' = release history with assets. 'readme' = full README markdown + rendered text. 'commits' = commit history with author, files, stats. 'user' = user/org profile + their repos. 'trending' = trending repos by language and timeframe. NOT for private repos or GitHub Enterprise.",
            "default": "repo"
          },
          "repo": {
            "title": "Repository (owner/name)",
            "type": "string",
            "description": "GitHub repository in 'owner/name' format (e.g., 'facebook/react'). Required for modes: repo, issues, prs, contributors, releases, readme, commits. Accepts full URL too — 'https://github.com/facebook/react' is normalised. NOT used for repo-search, code-search, user, trending modes."
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text query with GitHub search qualifiers (e.g., 'language:typescript stars:>1000 web framework'). Used by modes: repo-search, code-search. Supports all GitHub search operators (language:, stars:, forks:, user:, org:, path:, extension:, in:). NOT a repository identifier — for that use the 'repo' field."
          },
          "user": {
            "title": "User or organization login",
            "type": "string",
            "description": "GitHub user or organization login (e.g., 'torvalds' or 'apify'). Required for mode 'user'. Returns profile, repos, organizations, and (if available) social accounts. NOT a repo path — for that use 'repo' field."
          },
          "language": {
            "title": "Programming language filter",
            "type": "string",
            "description": "Optional language filter for trending mode (e.g., 'python', 'rust', 'typescript'). Lowercase, hyphenated for multi-word. For repo-search use 'language:python' inside the query field instead. Empty = all languages."
          },
          "timeframe": {
            "title": "Trending timeframe",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ],
            "type": "string",
            "description": "Time window for trending mode. 'daily' = today's trending repos, 'weekly' = this week, 'monthly' = this month. GitHub publishes these lists at github.com/trending. Only used by mode 'trending'. Default: daily.",
            "default": "daily"
          },
          "state": {
            "title": "Issue / PR state",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Filter issues or PRs by state. 'open' = only open, 'closed' = only closed, 'all' = both. Only used by modes 'issues' and 'prs'. Default: open. GitHub's UI default is open, so leave as 'open' for most agent use.",
            "default": "open"
          },
          "since": {
            "title": "Since (ISO 8601 date)",
            "type": "string",
            "description": "Only return items updated/created at or after this ISO 8601 date (e.g., '2026-01-01' or '2026-01-01T00:00:00Z'). Used by modes 'issues', 'prs', 'commits'. Empty = no lower bound."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of records to return. Each record = one PPE 'result' ($0.005) or 'deep-result' ($0.01) charge. Default 50. Hard cap 1000 to keep one run under $10 for x402 agents. Set lower to control cost; the actor will stop early when it reaches the cap.",
            "default": 50
          },
          "includeComments": {
            "title": "Include comments (issues/PRs)",
            "type": "boolean",
            "description": "When true, fetches comments for each issue or PR (extra API call per item). Increases run cost but gives the full conversation thread. Only affects modes 'issues' and 'prs'. Default: false. Set true when an agent needs sentiment, decisions, or context from threads.",
            "default": false
          },
          "includeReviews": {
            "title": "Include reviews (PRs)",
            "type": "boolean",
            "description": "When true, fetches reviews and review comments for each PR (extra API call per PR). Returns reviewer login, state (APPROVED/REQUEST_CHANGES/COMMENTED), submitted_at, body. Only affects mode 'prs'. Default: false. Set true when an agent needs review-status or reviewer breakdown.",
            "default": false
          },
          "includeFiles": {
            "title": "Include file diffs (commits)",
            "type": "boolean",
            "description": "When true, includes the list of files changed per commit with additions/deletions/status. Charged as 'deep-result' ($0.01) instead of 'result'. Only affects mode 'commits'. Default: false. Set true when an agent needs to reason about diffs.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}