{
  "openapi": "3.0.1",
  "info": {
    "title": "GitHub Trending Repos Scraper — Daily, Weekly, Monthly",
    "description": "Scrape github.com/trending for top repositories — daily, weekly, or monthly. Filter by programming language. Get repo name, owner, description, language, stars, forks, builders. Ideal for dev intelligence, AI/ML trend tracking, VC sourcing, and developer marketing.",
    "version": "0.2",
    "x-build-id": "cwIUbJUgnlWIEENk6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~github-trending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-github-trending-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/foxlabs~github-trending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-github-trending-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/foxlabs~github-trending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-github-trending-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "trending",
              "trending_developers",
              "discover"
            ],
            "type": "string",
            "description": "Trending repos = today's / this week's / this month's github.com/trending list (12-22 repos per page). Trending developers = the people list (25 per page). Discover rising repos = search the whole of GitHub for repos gaining stars in a date range — the high-volume mode, which gets past the API's 1,000-result cap by slicing the period into windows.",
            "default": "trending"
          },
          "languages": {
            "title": "Programming languages",
            "type": "array",
            "description": "Trending modes. GitHub language slugs, e.g. [\"python\", \"rust\", \"typescript\"]. Each language is a separate trending page. Leave empty for the all-languages page.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "periods": {
            "title": "Trending periods",
            "type": "array",
            "description": "Trending modes. Which trending window(s) to pull — daily, weekly and/or monthly. Every language is fetched for every period selected.",
            "items": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly"
              ],
              "enumTitles": [
                "Today",
                "This week",
                "This month"
              ]
            },
            "default": [
              "daily"
            ]
          },
          "spokenLanguage": {
            "title": "Spoken language filter",
            "type": "string",
            "description": "Trending modes, optional. Two-letter code to keep only repos written in a spoken language (e.g. \"en\", \"zh\", \"es\"). Leave empty for all."
          },
          "minStars": {
            "title": "Minimum stars",
            "minimum": 0,
            "type": "integer",
            "description": "Discover mode. Only repos with at least this many stars. Lower it to catch earlier-stage projects, raise it for established ones.",
            "default": 50
          },
          "dateField": {
            "title": "Date field",
            "enum": [
              "created",
              "pushed"
            ],
            "type": "string",
            "description": "Discover mode. Created = when the repo was first published (finds genuinely new projects). Pushed = last commit (finds actively maintained ones).",
            "default": "created"
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Discover mode. YYYY-MM-DD. Defaults to 90 days ago."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Discover mode. YYYY-MM-DD. Defaults to today."
          },
          "windowDays": {
            "title": "Window size (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Discover mode. The period is sliced into windows of this many days and each window is searched separately — that's how the run gets past GitHub's 1,000-results-per-search cap. Smaller windows = deeper coverage, more requests.",
            "default": 7
          },
          "discoverLanguage": {
            "title": "Language filter",
            "type": "string",
            "description": "Discover mode, optional. One language, e.g. \"rust\". Leave empty for all languages."
          },
          "topic": {
            "title": "Topic filter",
            "type": "string",
            "description": "Discover mode, optional. A GitHub topic, e.g. \"llm\", \"kubernetes\", \"fintech\". Leave empty for all topics."
          },
          "searchQuery": {
            "title": "Extra search qualifiers",
            "type": "string",
            "description": "Discover mode, optional. Raw GitHub search qualifiers appended to the query, e.g. \"license:mit forks:>10\". Leave empty unless you know the syntax."
          },
          "enrichRepos": {
            "title": "Enrich repositories",
            "type": "boolean",
            "description": "Adds what the trending page doesn't show: topics, license, homepage, created & last-push dates, open issues and watchers, from the official GitHub API. Discover mode already includes these at no extra cost.",
            "default": true
          },
          "enrichOwners": {
            "title": "Enrich owner profiles",
            "type": "boolean",
            "description": "Adds each repo owner's (or developer's) public profile: name, company, blog, X handle, location, followers and e-mail where they made it public. One extra API request per unique owner.",
            "default": false
          },
          "githubToken": {
            "title": "GitHub token (optional)",
            "type": "string",
            "description": "Without a token GitHub allows ~60 API requests/hour, so enrichment stops early on big runs (rows say so in `enrichmentStatus` — never silently empty). A free personal access token with no scopes raises it to 5,000/hour and 30 searches/minute."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on dataset rows. Set 0 for unlimited.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}