GitHub trending repositories API

GitHub has no supported trending JSON mirror of the public trending page. Trends MCP exposes GitHub Trending Repos as a ranked list for agents and nightly jobs.

Developers type short queries when they are annoyed: github trending api json, get trending repositories github, github trending scraper alternative. Stack Overflow threads still explain workarounds with repository search sorted by stars, which approximates momentum but does not reproduce the trending page.

Trends MCP documents GitHub Trending Repos as a top_trends feed. That gives teams a straight POST contract instead of maintaining headless browser jobs.

Request body

{
  "mode": "top_trends",
  "type": "GitHub Trending Repos",
  "limit": 25
}

Quota rules follow the standard top trends model: each feed and each page counts toward the monthly budget. Read https://trendsmcp.ai/docs before running wide offsets in a tight loop.

JavaScript example

const res = await fetch("https://api.trendsmcp.ai/api", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    mode: "top_trends",
    type: "GitHub Trending Repos",
    limit: 25,
  }),
});
const payload = await res.json();

DevRel and internal research workflows

Developer relations teams often publish weekly roundups. The boring failure mode is copying ten repository links from a browser session on Sunday night. A scheduled job that stores JSON snapshots turns the roundup into an editorial queue with timestamps.

Security and platform engineering teams sometimes monitor trending for typosquat campaigns and dependency confusion spikes. The list is noisy. Pair it with package manager telemetry from https://trendsmcp.ai/npm-api when the question is whether installs moved, not just whether GitHub attention moved.

MCP usage in coding agents

Repository context in Cursor benefits when the agent can ground "what is hot today" without opening ten tabs. Configure the hosted MCP endpoint from https://trendsmcp.ai/mcp-server-for-cursor and ask for results via TrendsMCP so the tool path activates.

For Claude Code and other CLI flows, the same endpoint and Bearer header pattern applies as in https://trendsmcp.ai/mcp-server-for-claude-code.

Related pages inside the developer cluster

Broader movement on GitHub activity and developer platform signals lives on https://trendsmcp.ai/github-trends and https://trendsmcp.ai/developer-ecosystem-trends. For LangChain style agents, https://trendsmcp.ai/langchain-trends-mcp shows how tool calls map to the same backend.

Common questions

No. GitHub's public REST API exposes repositories, search, and social metadata, but it does not mirror the trending page as a supported resource. Trends MCP returns a curated leaderboard snapshot through its own pipeline.
The feed returns a general daily list. Filter client side by substring match on repository names if the workflow needs a coarse language gate, or combine with repository metadata from GitHub's official API for precision.
Treat trending as discovery, not endorsement. A spike in stars can reflect marketing, a controversial README, or an automated bot wave. Follow up with maintainer history and dependency review before importing code.
Get GitHub trending repositories API in 30 seconds
Free tier includes 100 requests per month. No credit card required. Works with Claude, Cursor, ChatGPT, Raycast, and every MCP client.
Get your free API key