{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Repo Search — Stars, Language & Topics",
    "description": "Search GitHub repositories by keyword, language, topic, stars, and date. Returns structured JSON with stars, forks, watchers, topics, license, and timestamps. No login needed. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.",
    "version": "1.0",
    "x-build-id": "oQXP273uBD0ywcppR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~github-repo-search-stars-language-topics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-github-repo-search-stars-language-topics",
        "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/muhammadafzal~github-repo-search-stars-language-topics/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-github-repo-search-stars-language-topics",
        "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/muhammadafzal~github-repo-search-stars-language-topics/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-github-repo-search-stars-language-topics",
        "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": {
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Keywords to search in repository names, descriptions, and READMEs. Example: 'web scraping', 'machine learning', 'react dashboard'. Use this field when the user wants to find repos by topic or keyword — use startRepoUrls instead when the user provides specific repo URLs."
          },
          "language": {
            "title": "Programming Language",
            "type": "string",
            "description": "Filter results to repositories written in a specific programming language. Example: 'python', 'typescript', 'rust', 'javascript', 'go'. Leave empty or set to 'any' for all languages. NOT a natural-language query — must be a single programming language name.",
            "default": ""
          },
          "topic": {
            "title": "Topic(s)",
            "type": "string",
            "description": "Filter by GitHub topics (comma-separated). Repos must have ALL listed topics. Example: 'cli,automation', 'machine-learning', 'awesome'. NOT a free-text search — use searchQuery for keyword search instead.",
            "default": ""
          },
          "userOrg": {
            "title": "User or Organization",
            "type": "string",
            "description": "Restrict search to repositories owned by a specific GitHub user or organization login. Example: 'apify', 'torvalds', 'google', 'microsoft'. NOT a repo URL — use startRepoUrls for direct repo lookups.",
            "default": ""
          },
          "minStars": {
            "title": "Minimum Stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only return repositories with at least this many stars. Example: 100, 1000. Useful for finding popular, well-established projects. Set to 0 or leave empty for no minimum.",
            "default": 0
          },
          "maxStars": {
            "title": "Maximum Stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only return repositories with at most this many stars. Example: 500, 5000. Useful for finding hidden gems or smaller projects. Leave empty for no maximum."
          },
          "minForks": {
            "title": "Minimum Forks",
            "minimum": 0,
            "type": "integer",
            "description": "Only return repositories with at least this many forks. Example: 10, 50. Useful for finding projects with active community engagement. Set to 0 or leave empty for no minimum.",
            "default": 0
          },
          "license": {
            "title": "License",
            "enum": [
              "any",
              "mit",
              "apache-2.0",
              "gpl-3.0",
              "gpl-2.0",
              "bsd-2-clause",
              "bsd-3-clause",
              "lgpl-2.1",
              "lgpl-3.0",
              "mpl-2.0",
              "agpl-3.0",
              "unlicense",
              "cc0-1.0",
              "isc",
              "0bsd"
            ],
            "type": "string",
            "description": "Filter by software license. Use the SPDX license key (lowercase with hyphens). Example: 'mit', 'apache-2.0', 'gpl-3.0', 'bsd-3-clause'. Set to 'any' or leave empty for all licenses.",
            "default": "any"
          },
          "createdAfter": {
            "title": "Created After",
            "type": "string",
            "description": "Only include repositories created on or after this date. Format: YYYY-MM-DD. Example: '2024-01-01'. Useful for finding new or trending projects. Leave empty for no date filter.",
            "default": ""
          },
          "pushedAfter": {
            "title": "Last Push After",
            "type": "string",
            "description": "Only include repositories with commits pushed on or after this date. Format: YYYY-MM-DD. Example: '2025-01-01'. Great for finding actively maintained projects. Leave empty for no date filter.",
            "default": ""
          },
          "excludeForks": {
            "title": "Exclude Forks",
            "type": "boolean",
            "description": "If true, skip forked repositories (only return original repos). Default: true — most users want original projects, not forks.",
            "default": true
          },
          "excludeArchived": {
            "title": "Exclude Archived",
            "type": "boolean",
            "description": "If true, skip archived (read-only, unmaintained) repositories. Default: true — most users want active projects.",
            "default": true
          },
          "sort": {
            "title": "Sort By",
            "enum": [
              "stars",
              "forks",
              "updated",
              "best-match"
            ],
            "type": "string",
            "description": "How to sort results. Stars = most popular first. Forks = most forked first. Updated = most recently active first. Best match = GitHub's relevance ranking.",
            "default": "stars"
          },
          "order": {
            "title": "Sort Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort direction: descending (highest first) or ascending (lowest first). Default: descending.",
            "default": "desc"
          },
          "startRepoUrls": {
            "title": "Direct Repository URLs",
            "type": "array",
            "description": "List of specific GitHub repository URLs to fetch metadata for (bypasses search). Example: ['https://github.com/facebook/react', 'https://github.com/vuejs/vue']. Use this when the user provides specific repo names or URLs — use searchQuery for keyword/topic search instead.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of repositories to return. GitHub caps any single search at 1000 results. Example: 100, 500, 1000. Default: 100. NOT the page size — this is the total cap across all pages.",
            "default": 100
          },
          "githubToken": {
            "title": "GitHub Token (optional)",
            "type": "string",
            "description": "A GitHub personal access token for higher API rate limits (30 search requests/min + 5000 req/hr instead of 10/min + 60/hr). A classic token with NO scopes (public data only) is sufficient. Your token is used only to call GitHub and is never stored. Create one at github.com/settings/tokens. Leave empty for unauthenticated access."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}