{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub — Repository Search & Data Scraper",
    "description": "Scrapes GitHub repository data via the GitHub REST API v3. Supports keyword search, advanced qualifiers, user/org listing, trending repos, topic browsing, and direct repo lookup. Works without an API key (rate-limited) or with a personal access token for higher throughput.",
    "version": "0.0",
    "x-build-id": "Oh6SUcE84amQO2BLG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moving_beacon-owner1~github----repository-search-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moving_beacon-owner1-github----repository-search-data-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/moving_beacon-owner1~github----repository-search-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-moving_beacon-owner1-github----repository-search-data-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/moving_beacon-owner1~github----repository-search-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-moving_beacon-owner1-github----repository-search-data-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": "Search Mode",
            "enum": [
              "search",
              "user_repos",
              "org_repos",
              "topic_browse",
              "repos_by_name",
              "trending_today",
              "trending_week",
              "trending_month"
            ],
            "type": "string",
            "description": "Choose how to find repositories.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Keywords to search for in repo names, descriptions, and READMEs. Used in Search mode. E.g. 'web scraping', 'machine learning', 'react dashboard'."
          },
          "username": {
            "title": "GitHub Username",
            "type": "string",
            "description": "GitHub username for User Repos mode. E.g. 'torvalds', 'sindresorhus'."
          },
          "orgName": {
            "title": "Organization Name",
            "type": "string",
            "description": "GitHub org for Org Repos mode. E.g. 'google', 'facebook', 'microsoft'."
          },
          "topic": {
            "title": "Topic",
            "type": "string",
            "description": "GitHub topic tag for Topic Browse mode. E.g. 'python', 'machine-learning', 'awesome'."
          },
          "repoFullNames": {
            "title": "Repo Full Names",
            "type": "string",
            "description": "Comma-separated owner/repo names for direct lookup. E.g. 'facebook/react, vuejs/vue, angular/angular'."
          },
          "language": {
            "title": "Language Filter",
            "enum": [
              "any",
              "Python",
              "JavaScript",
              "TypeScript",
              "Java",
              "C",
              "C++",
              "C#",
              "Go",
              "Rust",
              "Ruby",
              "PHP",
              "Swift",
              "Kotlin",
              "Scala",
              "R",
              "MATLAB",
              "Dart",
              "Lua",
              "Shell",
              "PowerShell",
              "HTML",
              "CSS",
              "Vue",
              "Svelte",
              "Jupyter Notebook",
              "Dockerfile",
              "Makefile",
              "HCL",
              "Solidity"
            ],
            "type": "string",
            "description": "Filter repositories by primary programming language.",
            "default": "any"
          },
          "minStars": {
            "title": "Minimum Stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only include repos with at least this many stars."
          },
          "maxStars": {
            "title": "Maximum Stars",
            "minimum": 0,
            "type": "integer",
            "description": "Only include repos with at most this many stars. Leave empty for no limit."
          },
          "minForks": {
            "title": "Minimum Forks",
            "minimum": 0,
            "type": "integer",
            "description": "Only include repos with at least this many forks."
          },
          "license": {
            "title": "License Filter",
            "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": "Only include repos with a specific license.",
            "default": "any"
          },
          "createdAfter": {
            "title": "Created After",
            "type": "string",
            "description": "Only include repos created after this date (YYYY-MM-DD)."
          },
          "pushedAfter": {
            "title": "Pushed/Updated After",
            "type": "string",
            "description": "Only repos with commits pushed after this date (YYYY-MM-DD). Great for finding active projects."
          },
          "includeArchived": {
            "title": "Include Archived Repos",
            "type": "boolean",
            "description": "Include archived (read-only) repositories.",
            "default": false
          },
          "includeForks": {
            "title": "Include Forks",
            "type": "boolean",
            "description": "Include forked repositories in results.",
            "default": false
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "stars",
              "forks",
              "help-wanted-issues",
              "updated",
              "best-match"
            ],
            "type": "string",
            "description": "How to sort search results.",
            "default": "stars"
          },
          "sortOrder": {
            "title": "Sort Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Ascending or descending.",
            "default": "desc"
          },
          "fetchExtras": {
            "title": "Fetch Extra Details",
            "type": "array",
            "description": "For each repo, also fetch additional data. Each extra adds one API call per repo.",
            "items": {
              "type": "string",
              "enum": [
                "languages",
                "contributors",
                "releases",
                "topics"
              ],
              "enumTitles": [
                "Languages — breakdown of all languages with byte counts",
                "Top Contributors — top 10 contributors with commit counts",
                "Latest Releases — last 5 releases with download counts",
                "Topics — all topic tags"
              ]
            },
            "default": []
          },
          "githubToken": {
            "title": "GitHub Token (optional)",
            "type": "string",
            "description": "Personal access token for higher rate limits (5,000 req/hr vs 60). Create at github.com/settings/tokens. No special scopes needed for public repos."
          },
          "maxPages": {
            "title": "Maximum Pages",
            "minimum": 1,
            "maximum": 34,
            "type": "integer",
            "description": "Max result pages to fetch (30 repos per page for search, 100 for user/org). E.g. 10 pages = up to 300 search results.",
            "default": 5
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "enriched",
              "raw",
              "minimal",
              "csv_friendly"
            ],
            "type": "string",
            "description": "How to structure each record.",
            "default": "enriched"
          },
          "addSequentialId": {
            "title": "Add Sequential ID",
            "type": "boolean",
            "description": "Add auto-incrementing ID to each record.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}