{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Search Scraper",
    "description": "[ 1k / 1$ ] GitHub search scraper: search repositories, users, issues and pull requests, topics or commits through the official keyless API. Sort, filter by language and add README, profile, languages and release details without a token.",
    "version": "0.1",
    "x-build-id": "dIpEO86wQh2BBpqjH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpha-scraper~github-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpha-scraper-github-search-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/alpha-scraper~github-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alpha-scraper-github-search-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/alpha-scraper~github-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alpha-scraper-github-search-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",
        "properties": {
          "queries": {
            "title": "Search Queries",
            "type": "array",
            "description": "One or more GitHub search queries, for example 'web scraping' or 'language:python stars:>1000 topic:scraping'. GitHub search qualifiers (language:, stars:, topic:, user:, org:, is:open, created:>2024-01-01 ...) work inside the query. Every query is searched on its own and gets its own 'Max Items Per Query'.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items Per Query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results to extract per query. The Actor keeps loading result pages until this number is reached or GitHub stops serving more. GitHub only exposes the first 1,000 hits of any search, so 1000 is the ceiling. Anonymous search is limited to 10 requests per minute; the Actor waits for the window to reset instead of failing.",
            "default": 15
          },
          "searchType": {
            "title": "Search Type",
            "enum": [
              "repositories",
              "users",
              "issues",
              "topics",
              "commits"
            ],
            "type": "string",
            "description": "What to search for. Code search is not offered because GitHub requires a login for it. Details (README, profile, topic page) are only available for repositories, users and topics; issue and commit results already carry every field of the search response.",
            "default": "repositories"
          },
          "language": {
            "title": "Programming Language",
            "type": "string",
            "description": "Adds 'language:<value>' to the query, for example 'Python', 'TypeScript' or 'C++'. Works for repositories and issues/pull requests only; ignored for the other search types and when your query already contains 'language:'. For names with spaces (for example Jupyter Notebook) write language:\"Jupyter Notebook\" into the query itself. Leave empty for any language."
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "best-match",
              "stars",
              "forks",
              "help-wanted-issues",
              "updated",
              "followers",
              "repositories",
              "joined",
              "comments",
              "reactions",
              "interactions",
              "created",
              "author-date",
              "committer-date"
            ],
            "type": "string",
            "description": "'Best match' is GitHub's default ranking. The other values only fit one search type: repositories (stars, forks, updated, help-wanted issues), users (followers, repository count, joined), issues and pull requests (comments, reactions, interactions, created, updated), commits (author date, committer date). Topics are always ranked by best match. A value that does not belong to the chosen search type is not sent (GitHub would silently ignore it): the run logs a warning and the results stay in best-match order.",
            "default": "best-match"
          },
          "order": {
            "title": "Sort Direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction of the sort. Ignored while 'Sort Results By' is 'Best match' (GitHub only applies the direction together with a sort field).",
            "default": "desc"
          },
          "perPage": {
            "title": "Results Per Request",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Page size of each GitHub API request (1-100). Leave empty to use 30, or 100 when 'Max Items Per Query' is above 100. Larger pages need fewer requests, which matters because anonymous search is limited to 10 requests per minute."
          },
          "fetchDetails": {
            "title": "Fetch Details",
            "type": "boolean",
            "description": "Enrich repositories, users and topics (issue and commit results have no extra detail route). Repositories: README text and structure (headings, links, images), commit, release and tag counts, watchers, license, sponsor/citation flags, latest commit sha, top-level files and community files from the repository page. Users and organizations: pinned repositories, achievements, organisations, counts, top languages and topics from the public profile page. Topics: the number of public repositories and related topics. About one request per record, paced at 1 s. Turn off for a faster run with search data only.",
            "default": true
          },
          "detailLimit": {
            "title": "Max Records To Enrich",
            "minimum": 0,
            "type": "integer",
            "description": "Only the first N returned records get the detail requests; the rest keep their search data and 'detailStatus' says 'skipped: detailLimit=N'. Use 0 to enrich every returned record. Used only while 'Fetch Details' is on.",
            "default": 0
          },
          "apiDetails": {
            "title": "Use GitHub REST API For Details",
            "type": "boolean",
            "description": "Also use GitHub's anonymous REST API for the repository languages breakdown, the latest release and fork parent/source, and for exact user profile fields (name, company, blog, location, bio, counts, created date; e-mail is never copied). Anonymous access allows only 60 requests per hour: a reserve is always kept, the Actor never waits for it and, once it is used up, records keep their page-derived fields ('apiDetailsStatus' says so). Used only while 'Fetch Details' is on.",
            "default": true
          },
          "ownerDetails": {
            "title": "Fetch Owner Profile Pages",
            "type": "boolean",
            "description": "Read the public profile page github.com/<login> (cached per login): for repositories it is added as 'ownerProfile' (display name, bio, company, followers, pinned repositories, achievements, organisations, top languages); for user results it supplies the profile-page fields. Turn off to skip these page requests for both. Stops by itself after 2 consecutive refusals. Used only while 'Fetch Details' is on.",
            "default": true
          },
          "readmeMaxChars": {
            "title": "Max README Characters",
            "minimum": 0,
            "type": "integer",
            "description": "Repositories only: a README longer than this many characters is cut and 'readmeTruncated' is set. 0 keeps the whole README. Used only while 'Fetch Details' is on.",
            "default": 20000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}