{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Repo Scraper",
    "description": "Scrape GitHub repository stats, README, languages, contributors, and releases.",
    "version": "1.0",
    "x-build-id": "XzqYgl8FWDBhd5DNH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/artificially~github-repo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-artificially-github-repo-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/artificially~github-repo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-artificially-github-repo-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/artificially~github-repo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-artificially-github-repo-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": [
          "repositories"
        ],
        "properties": {
          "repositories": {
            "title": "Repositories",
            "type": "array",
            "description": "List of public GitHub repositories, as \"owner/repo\" or full GitHub URL. One dataset item per repository. Example: [\"facebook/react\", \"https://github.com/vercel/next.js\"].",
            "items": {
              "type": "string"
            }
          },
          "compactOutput": {
            "title": "Compact output (for AI agents)",
            "type": "boolean",
            "description": "If true, each dataset item is a slim record with only key decision fields (name, URL, stars, forks, language, license, topics, dates, activity and health scores) and counts instead of README text, contributor, release, issue and pull request lists. Recommended for AI agents and MCP clients. If false, the full record is returned.",
            "default": false
          },
          "includeReadme": {
            "title": "Include README",
            "type": "boolean",
            "description": "If true, includes the full README text in the readme field (can be long). Set false for lighter results.",
            "default": true
          },
          "includeLanguages": {
            "title": "Include Languages",
            "type": "boolean",
            "description": "If true, adds language byte counts and percentages (languages, languagePercentages).",
            "default": true
          },
          "includeContributors": {
            "title": "Include Contributors",
            "type": "boolean",
            "description": "If true, adds the top contributors with commit counts (one extra API request per repo).",
            "default": false
          },
          "maxContributors": {
            "title": "Max Contributors",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum contributors listed per repository (1-100) when includeContributors is true. Example: 10.",
            "default": 10
          },
          "includeReleases": {
            "title": "Include Releases",
            "type": "boolean",
            "description": "If true, adds recent releases with tag, date, notes and download counts (one extra API request per repo).",
            "default": false
          },
          "maxReleases": {
            "title": "Max Releases",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum releases listed per repository (1-50) when includeReleases is true. Example: 5.",
            "default": 5
          },
          "includeCommitActivity": {
            "title": "Include Commit Activity",
            "type": "boolean",
            "description": "If true, adds yearly commit statistics: total commits last year, weekly data, frequency and trend.",
            "default": true
          },
          "includeIssueStats": {
            "title": "Include Issue Statistics",
            "type": "boolean",
            "description": "If true, adds issue statistics: open/closed counts, close ratio, average close time, top labels and good first issues.",
            "default": true
          },
          "includePullRequests": {
            "title": "Include Pull Requests",
            "type": "boolean",
            "description": "If true, adds recent pull requests plus merge rate and average merge time.",
            "default": false
          },
          "maxPullRequests": {
            "title": "Max Pull Requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum pull requests listed per repository (1-50) when includePullRequests is true. Example: 10.",
            "default": 10
          },
          "includeDependencies": {
            "title": "Include Dependencies",
            "type": "boolean",
            "description": "If true, parses package.json, requirements.txt, Cargo.toml or go.mod and adds the dependency list.",
            "default": false
          },
          "includeCommunityProfile": {
            "title": "Include Community Profile",
            "type": "boolean",
            "description": "If true, adds GitHub's community health score and whether README, CONTRIBUTING, code of conduct, issue/PR templates and license exist.",
            "default": true
          },
          "githubToken": {
            "title": "GitHub token (optional)",
            "type": "string",
            "description": "Optional GitHub personal access token (no scopes needed for public repos), e.g. \"ghp_...\". Raises the GitHub API limit from 60 to 5,000 requests per hour. Without it, expect about 5 repositories per hour per IP."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. With Apify Proxy each request uses a fresh IP, which spreads GitHub's per-IP rate limit when no token is set."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}