{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Scraper: Trending, Repos, Users, Search",
    "description": "GitHub trending repositories and developers, repository and user search with full GitHub query syntax, repo details, user and organization profiles with their public repos, optional README text and releases. Official API, optional token, no login.",
    "version": "1.0",
    "x-build-id": "RJNxdNgTfa4aOwS1Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhtech~github-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhtech-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/zhtech~github-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zhtech-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/zhtech~github-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zhtech-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": "What to scrape",
            "enum": [
              "trending",
              "search",
              "repositories",
              "users"
            ],
            "type": "string",
            "description": "Trending: today's trending repositories and developers from github.com/trending (no API quota needed). Search: GitHub repository or user search with the full GitHub query syntax. Repositories: details of repositories you list. Users: profiles of users or organizations you list, with their public repositories. Only the section for the chosen mode is used.",
            "default": "trending"
          },
          "trendingType": {
            "title": "Trending list",
            "enum": [
              "repositories",
              "developers",
              "both"
            ],
            "type": "string",
            "description": "Trending repositories, trending developers, or both.",
            "default": "repositories"
          },
          "trendingLanguages": {
            "title": "Programming languages",
            "type": "array",
            "description": "One trending list per language, for example python, typescript, rust, go, c++, jupyter notebook. Leave empty for all languages.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trendingSince": {
            "title": "Period",
            "type": "string",
            "description": "Daily is today's trending list. GitHub's robots.txt asks automated clients not to load the weekly and monthly lists (URLs with ?since=), so this actor only reads the daily list; weekly or monthly input returns an error row instead. For rising repositories of the past week or month, use Search mode with \"Created within the last N days\" sorted by stars.",
            "default": "daily"
          },
          "trendingSpokenLanguage": {
            "title": "Spoken language (repositories only)",
            "type": "string",
            "description": "Only repositories whose description or README is in this spoken language, as a 2 letter code: en, zh, es, ja, de, fr, pt, ko, ru. Leave empty for any."
          },
          "maxTrendingPerPage": {
            "title": "Max rows per trending list",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "GitHub shows up to 25 entries per trending list.",
            "default": 25
          },
          "trendingDetails": {
            "title": "Add full API details to trending rows",
            "type": "boolean",
            "description": "Adds topics, license, watchers, open issues, homepage and dates to each trending repository (and the full profile to each trending developer) through the GitHub API, 1 request per row. Without a token GitHub allows 60 requests per hour, so add a token for more than a few lists. Rows are saved even if the quota runs out (detailsComplete false).",
            "default": false
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "One search per line in GitHub search syntax, exactly as on github.com/search, for example: web scraping language:python stars:>500, topic:llm created:>2026-01-01, location:berlin followers:>200 (user search). Leave empty to search only by the filters below.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "repositories",
              "users"
            ],
            "type": "string",
            "description": "Repositories or users (users and organizations).",
            "default": "repositories"
          },
          "searchSort": {
            "title": "Sort",
            "type": "string",
            "description": "Repositories: best match, stars, forks, help wanted issues, recently updated. Users: best match, followers, repositories, join date. A sort that does not fit the search type falls back to best match.",
            "default": "best-match"
          },
          "searchOrder": {
            "title": "Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "High to low (desc) or low to high (asc). Ignored for best match.",
            "default": "desc"
          },
          "searchLanguage": {
            "title": "Language",
            "type": "string",
            "description": "Adds language: to every search (replaces any language: already in the query), for example python or \"jupyter notebook\"."
          },
          "minStars": {
            "title": "Minimum stars (repositories)",
            "minimum": 0,
            "type": "integer",
            "description": "Adds stars:>=N to every repository search.",
            "default": 0
          },
          "searchTopics": {
            "title": "Topics (repositories, all must match)",
            "type": "array",
            "description": "Adds topic: for each one, for example machine-learning, cli.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "createdWithinDays": {
            "title": "Created within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Adds created:>= today minus N days. With sort by stars this finds the rising new repositories of the past week (7) or month (30). 0 means no filter.",
            "default": 0
          },
          "pushedWithinDays": {
            "title": "Pushed within the last N days (repositories)",
            "minimum": 0,
            "type": "integer",
            "description": "Only repositories with a commit pushed in the last N days (active projects). 0 means no filter.",
            "default": 0
          },
          "excludeArchived": {
            "title": "Exclude archived repositories",
            "type": "boolean",
            "description": "Adds archived:false to repository searches. Forks are already left out of GitHub search unless the query says fork:true.",
            "default": false
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "GitHub search returns at most 1,000 results per query. Turn on \"Go past 1,000\" to get more from a repository search sorted by stars.",
            "default": 100
          },
          "splitLargeSearches": {
            "title": "Go past 1,000 results (repository search sorted by stars)",
            "type": "boolean",
            "description": "When a repository search sorted by stars (high to low) reaches 1,000 results, the actor runs it again below the lowest star count seen, so rows stay in star order and each repository appears once. Uses more search requests: add a token.",
            "default": false
          },
          "fetchProfileDetails": {
            "title": "Full profiles for user search results",
            "type": "boolean",
            "description": "User search only returns the login. This reads each full profile (name, bio, company, location, blog, followers, created date), 1 core API request per user. Off returns login, type, URL and avatar only.",
            "default": true
          },
          "repositories": {
            "title": "Repositories",
            "type": "array",
            "description": "Repositories as owner/name or links, for example apify/crawlee or https://github.com/microsoft/vscode.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Users or organizations",
            "type": "array",
            "description": "GitHub usernames, organization names or profile links, for example torvalds, apify or https://github.com/microsoft.",
            "items": {
              "type": "string"
            }
          },
          "includeUserRepos": {
            "title": "Also get their public repositories",
            "type": "boolean",
            "description": "Saves each user's or organization's own public repositories as repository rows.",
            "default": true
          },
          "maxReposPerUser": {
            "title": "Max repositories per user",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit of repository rows per user or organization. 0 saves only the profile.",
            "default": 30
          },
          "userReposSort": {
            "title": "Repository order",
            "type": "string",
            "description": "Recently pushed, recently updated, newest, name, or most stars (reads up to 1,000 repositories first, then keeps the top ones).",
            "default": "pushed"
          },
          "excludeForks": {
            "title": "Skip forks",
            "type": "boolean",
            "description": "Leave out repositories that are forks of another repository.",
            "default": false
          },
          "fetchRepoDetails": {
            "title": "Full details for search and user repositories",
            "type": "boolean",
            "description": "Search and repository lists already include stars, forks, issues, language, topics, license and dates. This adds watchers (subscribers), network count and parent of forks, 1 core API request per repository. Repository details mode always includes them.",
            "default": false
          },
          "includeReadme": {
            "title": "Include README text",
            "type": "boolean",
            "description": "Adds the README (raw Markdown) to each repository row, 1 core API request per repository. Not charged extra.",
            "default": false
          },
          "maxReadmeChars": {
            "title": "Max README length (characters)",
            "minimum": 100,
            "maximum": 500000,
            "type": "integer",
            "description": "Longer READMEs are cut and marked readmeTruncated true.",
            "default": 20000
          },
          "includeReleases": {
            "title": "Include recent releases",
            "type": "boolean",
            "description": "Adds the latest releases (tag, name, date, link, prerelease flag, notes up to 2,000 characters) to each repository row, 1 core API request per repository. Not charged extra.",
            "default": false
          },
          "maxReleasesPerRepo": {
            "title": "Releases per repository",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Newest first.",
            "default": 3
          },
          "githubToken": {
            "title": "GitHub token (optional)",
            "type": "string",
            "description": "Your own GitHub personal access token (classic or fine grained, no scopes or permissions needed for public data). Raises the API limit from 60 to 5,000 requests per hour and search from 10 to 30 per minute. Stored encrypted, never logged or saved to the output."
          },
          "maxRateLimitWaitSeconds": {
            "title": "Max wait for a rate limit reset (seconds)",
            "minimum": 0,
            "maximum": 3700,
            "type": "integer",
            "description": "When a GitHub quota is used up, the run waits for the reset if it is this close (search resets every minute), otherwise it stops cleanly with a clear message and keeps everything saved so far. Anonymous core quota resets hourly.",
            "default": 90
          },
          "maxItems": {
            "title": "Max results (whole run)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on charged rows for the whole run, a safety limit on cost. 0 means no cap besides your max charge.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy (trending page only)",
            "type": "object",
            "description": "Not needed. Used only for the github.com trending page, never for the GitHub API (the API limit belongs to your token, so a proxy does not raise it). Leave off.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}