{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Repository Search, Details and Trending (Approximation)",
    "description": "Search GitHub repositories by keyword, language, stars, topics and dates, get repository details (stars, forks, issues, license, topics, languages, releases) and a trending approximation, from the official GitHub REST API with your own token. Clean rows, no personal data. Not affiliated with GitHub.",
    "version": "0.1",
    "x-build-id": "gi2tMmgwj62VPJ9Vl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tan-solutions~github-repos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tan-solutions-github-repos",
        "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/tan-solutions~github-repos/runs": {
      "post": {
        "operationId": "runs-sync-tan-solutions-github-repos",
        "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/tan-solutions~github-repos/run-sync": {
      "post": {
        "operationId": "run-sync-tan-solutions-github-repos",
        "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": {
          "githubToken": {
            "title": "GitHub token (recommended)",
            "type": "string",
            "description": "Your own GitHub personal access token. A fine-grained token with read-only access to public repositories is enough (no extra permissions). Your token, your GitHub quota (5,000 requests per hour). Without a token the run is a small demo: at most 10 repositories and 5 API calls. Rotate the token if you think it leaked."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "repos",
              "trending"
            ],
            "type": "string",
            "description": "search: repositories matching your keywords and filters. repos: details for a list of owner/repo names. trending: an approximation of trending repositories (repositories created in the chosen period, ranked by the stars they gained since they were created). It is not an official GitHub list.",
            "default": "search"
          },
          "query": {
            "title": "Search keywords",
            "type": "string",
            "description": "Keywords as on GitHub search, for example web scraping. Used in search mode and, optionally, to narrow trending."
          },
          "repositories": {
            "title": "Repositories (repos mode)",
            "type": "array",
            "description": "owner/repo names such as apify/crawlee, or repository links such as https://github.com/apify/crawlee. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "trendingPeriod": {
            "title": "Trending period",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ],
            "type": "string",
            "description": "Trending mode: repositories created in the last day, 7 days or 30 days, ranked by stars.",
            "default": "weekly"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Primary language, for example TypeScript, Python or C++."
          },
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "GitHub topics, for example machine-learning. A repository must have all of them.",
            "items": {
              "type": "string"
            }
          },
          "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."
          },
          "createdFrom": {
            "title": "Created from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Created on or after this date (YYYY-MM-DD)."
          },
          "createdTo": {
            "title": "Created to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Created on or before this date (YYYY-MM-DD)."
          },
          "pushedFrom": {
            "title": "Last push from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Last pushed on or after this date (YYYY-MM-DD)."
          },
          "pushedTo": {
            "title": "Last push to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Last pushed on or before this date (YYYY-MM-DD)."
          },
          "includeForks": {
            "title": "Include forks",
            "type": "boolean",
            "description": "Also return forked repositories in search and trending.",
            "default": false
          },
          "includeArchived": {
            "title": "Include archived",
            "type": "boolean",
            "description": "Also return archived repositories in search and trending.",
            "default": true
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "stars",
              "forks",
              "updated",
              "best-match"
            ],
            "type": "string",
            "description": "Search mode order. Trending is always ranked by stars.",
            "default": "stars"
          },
          "maxResults": {
            "title": "Maximum repositories",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many repositories (with a token). Without a token the demo returns at most 10. GitHub search returns at most 1,000 results per query; above that the Actor splits the creation dates into windows (rows are then sorted within each window).",
            "default": 500
          },
          "includeLanguages": {
            "title": "Language breakdown",
            "type": "boolean",
            "description": "Add the bytes per language of each repository (one extra API call per repository). Empty = on in repos mode, off in search and trending. Off in the no-token demo."
          },
          "includeReleasesCount": {
            "title": "Releases count",
            "type": "boolean",
            "description": "Add the number of releases of each repository (one extra API call per repository). Empty = on in repos mode, off in search and trending. Off in the no-token demo."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}