{
  "openapi": "3.1.0",
  "info": {
    "title": "GithubTrends API",
    "version": "1.0.0",
    "description": "GitHub Trending repositories covered since March 2026 with video reviews, star counts at coverage vs now, open-source alternatives to paid tools with quoted prices, and topic hubs. Static JSON regenerated daily; no key, no rate limit, CORS open.",
    "contact": {
      "name": "GithubTrends",
      "url": "https://githubtrends.app"
    },
    "license": {
      "name": "Open data — attribution appreciated",
      "url": "https://githubtrends.app/api/"
    }
  },
  "servers": [
    {
      "url": "https://githubtrends.app"
    }
  ],
  "paths": {
    "/api/v1/repos.json": {
      "get": {
        "summary": "Every covered repository (330)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Repo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/repos/{owner}/{repo}.json": {
      "get": {
        "summary": "One repository with full star history and its videos",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Repo"
                }
              }
            }
          },
          "404": {
            "description": "Repository not covered"
          }
        }
      }
    },
    "/api/v1/alternatives.json": {
      "get": {
        "summary": "Paid tools and their open-source replacements (84)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "product": {
                        "type": "string",
                        "description": "paid tool name"
                      },
                      "monthly_price_usd": {
                        "type": "integer",
                        "nullable": true
                      },
                      "replacements": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/Repo"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/topics.json": {
      "get": {
        "summary": "Topic hubs with member counts (24)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/stats.json": {
      "get": {
        "summary": "Cohort stats: star growth after GitHub Trending coverage (n=325)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Repo": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "slug",
          "url"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "description": "owner/name on GitHub"
          },
          "stars": {
            "type": "integer",
            "nullable": true,
            "description": "current star count (weekly refresh)"
          },
          "stars_at_coverage": {
            "type": "integer",
            "nullable": true,
            "description": "stars on the day we published the review"
          },
          "language": {
            "type": "string",
            "nullable": true
          },
          "covered": {
            "type": "string",
            "format": "date",
            "description": "first coverage date (ISO 8601)"
          },
          "videos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "youtube_id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "published": {
                  "type": "string"
                },
                "duration_s": {
                  "type": "integer"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "url": {
            "type": "string",
            "description": "GithubTrends repo page"
          },
          "github": {
            "type": "string",
            "description": "GitHub repository URL"
          },
          "active": {
            "type": "boolean"
          }
        }
      }
    }
  }
}