REST API Endpoints for /explore and /trending #161519
-
Select Topic AreaQuestion BodyAre there any endpoints for these two resources? I'd love to be able to plug them in to a dashboard project that I'm working on. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
o help you accurately, I need to know which two resources you're referring to—your question doesn't specify them directly. However, based on context (e.g., GitHub and its assets), if you meant: 🔹 1. GitHub Repository Data Example REST API Endpoint: bash If you're thinking about displaying repository statistics or data visually, you should rely on the GitHub API instead. |
Beta Was this translation helpful? Give feedback.
-
@pushkarkumarsaini2006 I basically want to be able to get a JSON representation of trending repositories from https://github.com/trending. |
Beta Was this translation helpful? Give feedback.
-
Thanks for clarifying, @neurotech! GitHub does not provide official REST API endpoints for /trending or /explore. However, you do have a few options: ✅ Alternative Approaches
https://ghapi.huchen.dev (Note: currently archived) https://github-trending-api.now.sh
Puppeteer (Node.js) BeautifulSoup (Python) Playwright (multi-language) Example (Python): python url = 'https://github.com/trending' for repo in soup.find_all('h1'): Reduce abuse Maintain dynamic ranking logic Preserve CDN optimization |
Beta Was this translation helpful? Give feedback.
Thanks for clarifying, @neurotech! GitHub does not provide official REST API endpoints for /trending or /explore. However, you do have a few options:
✅ Alternative Approaches
There are community-maintained APIs like:
https://ghapi.huchen.dev (Note: currently archived)
https://github-trending-api.now.sh
You can scrape https://github.com/trending using tools like:
Puppeteer (Node.js)
BeautifulSoup (Python)
Playwright (multi-language)
Example (Python):
python
Copy
Edit
import requests
from bs4 import BeautifulSoup
url = 'https://github.com/trending'
html = requests.get(url).text
sou…