{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Repo Search — Stars, Language & Topics",
    "description": "Search and scrape GitHub repositories by keyword, language, stars, forks, or topic. Extract structured repo metadata including owner, license, topics, and activity timestamps. Sort by stars, forks, or recently updated. Export to JSON, CSV, or API. No token required.",
    "version": "0.3",
    "x-build-id": "1FIc3iwI5wyTbFlxj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/emt_getdataforu~github-repo-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-emt_getdataforu-github-repo-search",
        "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/emt_getdataforu~github-repo-search/runs": {
      "post": {
        "operationId": "runs-sync-emt_getdataforu-github-repo-search",
        "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/emt_getdataforu~github-repo-search/run-sync": {
      "post": {
        "operationId": "run-sync-emt_getdataforu-github-repo-search",
        "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": {
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Search query using GitHub syntax. Examples: 'web scraping', 'machine learning language:python', 'topic:nextjs stars:>500'",
            "default": "web scraping language:python"
          },
          "mode": {
            "title": "Solution Mode",
            "enum": [
              "market-map",
              "dependency-audit",
              "adoption-shortlist",
              "maintainer-outreach",
              "trend-watch",
              "repo-due-diligence"
            ],
            "type": "string",
            "description": "Pre-configured workflow. Each mode auto-selects enrichments, scoring, and sorting for a specific use case. Leave empty for manual configuration."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "stars",
              "forks",
              "updated",
              "best-match"
            ],
            "type": "string",
            "description": "How to sort results. Overridden by mode if set.",
            "default": "stars"
          },
          "minStars": {
            "title": "Min Stars",
            "type": "integer",
            "description": "Minimum star count (appended to query as stars:>=N)"
          },
          "language": {
            "title": "Language Filter",
            "type": "string",
            "description": "Filter by programming language (e.g., python, rust, typescript)"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum repositories to return. With auto-partition enabled, can exceed 1,000.",
            "default": 30
          },
          "excludeForks": {
            "title": "Exclude Forks",
            "type": "boolean",
            "description": "Filter out forked repositories from results",
            "default": false
          },
          "excludeArchived": {
            "title": "Exclude Archived",
            "type": "boolean",
            "description": "Filter out archived repositories from results",
            "default": false
          },
          "autoPartitionResults": {
            "title": "Auto-Partition (Break 1,000 Cap)",
            "type": "boolean",
            "description": "When a query matches more than 1,000 repos, automatically split into sub-queries by star ranges to retrieve more. Deduplicates across partitions.",
            "default": false
          },
          "compareRepos": {
            "title": "Compare Specific Repos",
            "maxItems": 20,
            "type": "array",
            "description": "Compare specific repos side-by-side. Enter full names like 'facebook/react'. Skips search and fetches each repo directly. Scores, ranks, and picks a winner.",
            "items": {
              "type": "string"
            }
          },
          "enrichRepoData": {
            "title": "Enrich Repo Data",
            "type": "boolean",
            "description": "Fetch additional data per repo: community profile, activity stats, languages, releases, contributor count. Adds ~3-5 parallel API calls per repo. On by default so every result includes intelligence scores. Turn off for a faster, search-only run (base GitHub fields only).",
            "default": true
          },
          "extractContributorEmails": {
            "title": "Extract Contributor Emails",
            "type": "boolean",
            "description": "Extract real email addresses from recent commits. Filters out noreply/bot addresses. Auto-enabled by maintainer-outreach and due-diligence modes.",
            "default": false
          },
          "compareToPreviousRun": {
            "title": "Compare to Previous Run",
            "type": "boolean",
            "description": "Detect changes since last run: new repos, score changes, newly abandoned repos. Useful for scheduled monitoring. Stores state in a named key-value store.",
            "default": false
          },
          "githubToken": {
            "title": "GitHub Token (recommended for reliability)",
            "type": "string",
            "description": "Personal access token. GitHub's Search API allows 30 requests/minute when authenticated, vs 10/minute unauthenticated per IP. Apify's shared cloud IPs are often near the anonymous limit before your run starts. When that happens, anonymous runs retry briefly (up to ~50s) using GitHub's reset-time headers and return a clear error if the quota doesn't free up. Provide a token to skip the rate-limit lottery entirely. Create one at github.com/settings/tokens — no special scopes needed for public repository searches."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}