{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Repository Stats & Search API",
    "description": "Get GitHub repository stats through the official REST API: stars, forks, watchers, issues, PRs, languages, releases, contributors count, commit activity, license and topics. Look up repos, search by language, stars, topics and dates, or list an organization.",
    "version": "0.1",
    "x-build-id": "ZeA9kqgBGMbljMI0C"
  },
  "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "repos",
              "search",
              "org"
            ],
            "type": "string",
            "description": "What to fetch: specific repositories, a repository search, or all public repositories of organizations or users.",
            "default": "repos"
          },
          "repositories": {
            "title": "Repositories",
            "type": "array",
            "description": "GitHub repository URLs or full names, for example https://github.com/facebook/react or facebook/react.",
            "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."
          },
          "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.",
            "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": "Personal access token for 5,000 requests per hour instead of 60. A fine-grained token with public repository read access and no other permissions is enough. 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 limit runs out, wait up to this long for the reset. Longer waits stop the run and keep the data saved so far.",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}