DEV Community

Alex Spinov
Alex Spinov

Posted on

7 GitHub API Endpoints You Probably Never Knew Existed

GitHub has a massive API. Most developers know about repos and issues. But there are hidden endpoints that can save you hours.

Here are 7 that surprised me.


1. Get Any User's Public Activity

curl -s https://api.github.com/users/torvalds/events | jq '.[0:3] | .[] | {type: .type, repo: .repo.name, created_at: .created_at}'
Enter fullscreen mode Exit fullscreen mode

This shows what any GitHub user has been doing — pushes, stars, issue comments. No authentication needed.

Use case: Monitor what your favorite developers are working on. I use this to discover trending repos before they blow up.


2. Search Code Across All of GitHub

curl -s "https://api.github.com/search/code?q=fastapi+rate+limit+language:python" | jq '.items[:3] | .[] | {repo: .repository.full_name, path: .path}'
Enter fullscreen mode Exit fullscreen mode

Forget Google for code search. GitHub's code search API finds exact patterns across millions of repos.

Pro tip: Add language:python or filename:.env to narrow results.


3. Get Traffic Data for Your Repos

curl -s -H "Authorization: token YOUR_TOKEN" \
  https://api.github.com/repos/USERNAME/REPO/traffic/views | jq '{views: .count, uniques: .uniques}'
Enter fullscreen mode Exit fullscreen mode

See who is visiting your repos — total views, unique visitors, and referral sources. Requires a token (your own repos only).

I discovered that Hacker News was my #1 referrer — which completely changed my distribution strategy.


4. List All Repos by Topic

curl -s "https://api.github.com/search/repositories?q=topic:web-scraping+stars:>100&sort=stars" | jq '.items[:5] | .[] | {name: .full_name, stars: .stargazers_count, description: .description}'
Enter fullscreen mode Exit fullscreen mode

Find the most popular repos in any niche. Sort by stars, forks, or recently updated.


5. Get the README of Any Repo (Rendered as HTML)

curl -s -H "Accept: application/vnd.github.html" \
  https://api.github.com/repos/facebook/react/readme
Enter fullscreen mode Exit fullscreen mode

Returns the README already rendered as HTML. Perfect for embedding in your own site or tool.


6. Check Rate Limit Status

curl -s https://api.github.com/rate_limit | jq '.resources.core | {limit: .limit, remaining: .remaining, reset: (.reset | todate)}'
Enter fullscreen mode Exit fullscreen mode

The API rate limits you at 60 requests/hour (unauthenticated) or 5,000/hour (with token). This endpoint tells you exactly where you stand.


7. Get Commit Activity for Any Repo

curl -s https://api.github.com/repos/torvalds/linux/stats/commit_activity | jq '.[-4:] | .[] | {week: .week, total_commits: .total}'
Enter fullscreen mode Exit fullscreen mode

Returns weekly commit counts for the past year. Great for seeing if a project is actively maintained.

Use case: Before depending on a library, I check if it has had commits in the last month.


Bonus: No Auth Required

All of these (except #3) work without any authentication:

# No token needed:
curl https://api.github.com/users/torvalds
curl https://api.github.com/repos/facebook/react
curl https://api.github.com/search/repositories?q=stars:>10000
Enter fullscreen mode Exit fullscreen mode

You get 60 requests per hour. For most exploration, that is plenty.


What GitHub API trick do you use?

I bet power users have discovered endpoints I missed. What is your favorite GitHub API hack?


I write about APIs, developer tools, and web scraping. Follow for weekly practical tips.

More API guides: Wikipedia API | Spotify API | 5 APIs I Use Every Week


Need Custom API Integration?

I build custom web scrapers and API integrations for startups and dev teams. 77+ scrapers built, battle-tested in production.

📧 spinov001@gmail.com — Tell me what data you need, I will build it.

Check out my GitHub for open-source tools and Apify Store for ready-to-use scrapers.


More from me: 10 Dev Tools I Use Daily | 77 Scrapers on a Schedule | 150+ Free APIs
NEW: I Ran an AI Agent for 16 Days — What Works

Top comments (0)