{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Scraper: Repo Stats, Stars, Trending & Search",
    "description": "Scrape GitHub trending repositories by language and period with no token. Get repo stats via the official API: stars, forks, watchers, issues, PRs, languages, releases, contributors and commit activity. Search by language, stars, topics and dates, or list an org.",
    "version": "0.2",
    "x-build-id": "R7FYSf0btbfNNCsIP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rod_analytics~github-repo-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rod_analytics-github-repo-stats",
        "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/rod_analytics~github-repo-stats/runs": {
      "post": {
        "operationId": "runs-sync-rod_analytics-github-repo-stats",
        "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/rod_analytics~github-repo-stats/run-sync": {
      "post": {
        "operationId": "run-sync-rod_analytics-github-repo-stats",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "trending",
              "repos",
              "search",
              "org"
            ],
            "type": "string",
            "description": "What to fetch. Auto picks the mode from the section you fill: repositories, organizations, trending, or search filters. Trending reads github.com/trending and needs no GitHub token.",
            "default": "auto"
          },
          "trendingLanguages": {
            "title": "Trending languages",
            "type": "array",
            "description": "Programming languages as GitHub names them, for example Python, TypeScript, Rust, C++ or Jupyter Notebook. Empty means all languages. One page per language.",
            "items": {
              "type": "string"
            }
          },
          "trendingPeriod": {
            "title": "Trending period",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ],
            "type": "string",
            "description": "Trending today, this week or this month. Default: daily."
          },
          "trendingSpokenLanguage": {
            "title": "Spoken language",
            "type": "string",
            "description": "Optional. Only repositories whose README is in this spoken language, as a 2-letter code, for example en, zh, es or de."
          },
          "enrichTrending": {
            "title": "Add full API stats to trending rows",
            "type": "boolean",
            "description": "Off: rows hold what the trending page shows (stars, forks, stars in period, language, description, built by). On: each row also gets watchers, open issues, license, topics, dates and the extras below, with about 5 API requests per repository. Without a token GitHub allows 60 per hour, so only the first few rows get details and the rest keep the page data.",
            "default": false
          },
          "repositories": {
            "title": "Repositories",
            "type": "array",
            "description": "GitHub repository URLs or full names, for example https://github.com/facebook/react or facebook/react. About 5 GitHub API requests per repository with the default extras.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search keywords",
            "type": "string",
            "description": "Free text or any GitHub search qualifier, for example \"llm agent in:name,description\" or \"org:apache\"."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Primary language, for example TypeScript, Python, Rust or Go. In trending mode it is used when \"Trending languages\" is empty."
          },
          "minStars": {
            "title": "Minimum stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only repositories with at least this many stars."
          },
          "maxStars": {
            "title": "Maximum stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only repositories with at most this many stars."
          },
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "Repository topics. Every topic must match, for example ai-agents or llm.",
            "items": {
              "type": "string"
            }
          },
          "createdFrom": {
            "title": "Created from",
            "type": "string",
            "description": "Repository created on or after this date."
          },
          "createdTo": {
            "title": "Created to",
            "type": "string",
            "description": "Repository created on or before this date."
          },
          "pushedFrom": {
            "title": "Last push from",
            "type": "string",
            "description": "Last push on or after this date. Use it to skip abandoned projects."
          },
          "pushedTo": {
            "title": "Last push to",
            "type": "string",
            "description": "Last push on or before this date."
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "stars",
              "forks",
              "updated",
              "help-wanted-issues",
              "best-match"
            ],
            "type": "string",
            "description": "Search result order. GitHub returns at most 1,000 results per query.",
            "default": "stars"
          },
          "order": {
            "title": "Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort direction.",
            "default": "desc"
          },
          "organizations": {
            "title": "Organizations or users",
            "type": "array",
            "description": "GitHub organization or user logins, or their URLs, for example vercel or https://github.com/apify. Only public repositories are listed.",
            "items": {
              "type": "string"
            }
          },
          "includeForks": {
            "title": "Include forks",
            "type": "boolean",
            "description": "Include forked repositories in search and organization results.",
            "default": false
          },
          "includeArchived": {
            "title": "Include archived repositories",
            "type": "boolean",
            "description": "Include archived (read-only) repositories in search and organization results.",
            "default": true
          },
          "maxItems": {
            "title": "Max repositories",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of repositories to save. GitHub search is capped at 1,000 per query, trending at 25 per language.",
            "default": 50
          },
          "includeLanguages": {
            "title": "Languages breakdown",
            "type": "boolean",
            "description": "Bytes and share per language. 1 extra request per repository.",
            "default": true
          },
          "includeLatestRelease": {
            "title": "Latest release",
            "type": "boolean",
            "description": "Tag and publish date of the latest release. 1 extra request per repository.",
            "default": true
          },
          "includeOpenPullRequests": {
            "title": "Open pull requests count",
            "type": "boolean",
            "description": "Count open PRs and report open issues without PRs. 1 extra request per repository.",
            "default": true
          },
          "includeContributorsCount": {
            "title": "Contributors count",
            "type": "boolean",
            "description": "Number of contributors with a GitHub account. Only the count is stored, never profiles. 1 extra request per repository. Very large repositories may return empty.",
            "default": true
          },
          "includeCommitActivity": {
            "title": "Commit activity, last 52 weeks",
            "type": "boolean",
            "description": "Weekly commit counts for the last year. GitHub computes these on demand, so the first call can be slow or empty. 1 to 4 extra requests per repository.",
            "default": false
          },
          "includeReadme": {
            "title": "README excerpt",
            "type": "boolean",
            "description": "First 2,000 characters of the README, with e-mail addresses removed. 1 extra request per repository.",
            "default": false
          },
          "githubToken": {
            "title": "GitHub token (optional)",
            "type": "string",
            "description": "Optional. Your own personal access token for 5,000 API requests per hour instead of 60. A fine-grained token with public repository read access and no other permissions is enough. Not needed for trending. Stored encrypted, never logged or saved to the dataset."
          },
          "maxRateLimitWaitSecs": {
            "title": "Max wait for rate limit reset (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "If the GitHub hourly API limit runs out, wait up to this long for the reset. Longer waits stop the run, keep the data saved so far and explain the limit in a free help row.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}