{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Scraper",
    "description": "Scrapes GitHub repositories, users, trending repos, issues and code via the GitHub REST API v3. Supports authentication tokens for higher rate limits (5000 req/hr vs 60 req/hr unauthenticated). Includes smart analytics: language distribution, license distribution, stars histogram, activity scores...",
    "version": "1.0",
    "x-build-id": "oj2ocUeUWNFKMZJZq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brilliant_gum~github-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brilliant_gum-github-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/brilliant_gum~github-scraper/runs": {
      "post": {
        "operationId": "runs-sync-brilliant_gum-github-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/brilliant_gum~github-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-brilliant_gum-github-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": [
              "search_repos",
              "search_users",
              "trending",
              "repo_details",
              "user_details",
              "search_issues"
            ],
            "type": "string",
            "description": "What to scrape from GitHub.",
            "default": "search_repos"
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Search query string. For repo_details use 'owner/repo' format (e.g. 'torvalds/linux'). For user_details use a GitHub username. For search modes use keywords and qualifiers (e.g. 'machine learning stars:>1000')."
          },
          "githubToken": {
            "title": "GitHub Personal Access Token (Optional)",
            "type": "string",
            "description": "Your GitHub Personal Access Token for higher rate limits (5000 req/hr vs 60 req/hr unauthenticated). Generate at https://github.com/settings/tokens. Token is NOT stored or logged."
          },
          "language": {
            "title": "Programming Language Filter",
            "type": "string",
            "description": "Filter repositories by primary programming language (e.g. 'javascript', 'python', 'rust'). Leave empty for all languages."
          },
          "minStars": {
            "title": "Minimum Stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only include repositories with at least this many stars.",
            "default": 0
          },
          "minForks": {
            "title": "Minimum Forks",
            "minimum": 0,
            "type": "integer",
            "description": "Only include repositories with at least this many forks.",
            "default": 0
          },
          "dateCreatedFrom": {
            "title": "Created From Date",
            "type": "string",
            "description": "Include only repositories created on or after this date (ISO 8601 format: YYYY-MM-DD)."
          },
          "dateCreatedTo": {
            "title": "Created To Date",
            "type": "string",
            "description": "Include only repositories created on or before this date (ISO 8601 format: YYYY-MM-DD)."
          },
          "dateUpdatedFrom": {
            "title": "Updated From Date",
            "type": "string",
            "description": "Include only repositories last updated on or after this date (ISO 8601 format: YYYY-MM-DD)."
          },
          "dateUpdatedTo": {
            "title": "Updated To Date",
            "type": "string",
            "description": "Include only repositories last updated on or before this date (ISO 8601 format: YYYY-MM-DD)."
          },
          "topics": {
            "title": "Topics Filter",
            "type": "array",
            "description": "Filter repositories that have ALL of these topics. Each item is a topic name.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results to return. GitHub Search API returns up to 1000 results per query.",
            "default": 100
          },
          "trendingPeriod": {
            "title": "Trending Period",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ],
            "type": "string",
            "description": "Time period for trending repositories (only used in 'trending' mode).",
            "default": "daily"
          },
          "trendingLanguage": {
            "title": "Trending Language Filter",
            "type": "string",
            "description": "Filter trending repositories by programming language slug (only used in 'trending' mode). Leave empty for all languages. Use slug format: 'javascript', 'python', 'c++', etc."
          },
          "includeContributors": {
            "title": "Include Contributors",
            "type": "boolean",
            "description": "Fetch top 30 contributors for each repository, plus an approximate total contributor count. Makes one additional API call per repository.",
            "default": false
          },
          "includeReleases": {
            "title": "Include Latest Release",
            "type": "boolean",
            "description": "Fetch the latest release information for each repository (tag name, publish date, download count). Makes one additional API call per repository.",
            "default": false
          },
          "includeTopics": {
            "title": "Include Topics",
            "type": "boolean",
            "description": "Include repository topics (tags) in the output.",
            "default": true
          },
          "includeLanguageStats": {
            "title": "Include Language Breakdown",
            "type": "boolean",
            "description": "Fetch per-language byte breakdown for each repository (e.g. {language: 'Python', bytes: 34000, percentage: 72.4}). Always enabled in repo_details mode. Makes one additional API call per repository in other modes.",
            "default": false
          },
          "includeCommitCount": {
            "title": "Include Commit Count",
            "type": "boolean",
            "description": "Fetch the approximate total commit count for the repository. Only available in repo_details mode. Uses Link header pagination trick — one additional API call.",
            "default": false
          },
          "includeOpenPRCount": {
            "title": "Include Open PR Count",
            "type": "boolean",
            "description": "Fetch the number of open pull requests for the repository. Only available in repo_details mode. Uses GitHub Search API — one additional API call.",
            "default": false
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "stars",
              "forks",
              "updated",
              "help-wanted-issues",
              "best-match"
            ],
            "type": "string",
            "description": "Sort search results by this field (applies to search_repos, search_users, and search_issues modes).",
            "default": "stars"
          },
          "order": {
            "title": "Sort Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort order for results.",
            "default": "desc"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}