https://github.com/unjs/ungh
🐙 Unlimited access to github API
https://github.com/unjs/ungh
Last synced: 6 months ago
JSON representation
🐙 Unlimited access to github API
- Host: GitHub
- URL: https://github.com/unjs/ungh
- Owner: unjs
- License: mit
- Created: 2022-11-07T13:47:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-02T17:03:12.000Z (7 months ago)
- Last Synced: 2025-06-03T05:43:24.197Z (6 months ago)
- Language: TypeScript
- Homepage: https://ungh.cc
- Size: 526 KB
- Stars: 587
- Watchers: 5
- Forks: 18
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🐙 UNGH
> Unlimited access to GitHub API
> [!IMPORTANT]
>
> `/repos//files/` endpoint redirects to original `raw.githubusercontent.com` endpoint due to service absue. ([#123](https://github.com/unjs/ungh/issues/123)).
## Why UNGH?
Accessing to open source GitHub repository meta-data should be fast, easy, and straightforward. GitHub API is rate limited and requires an authentication token to increase limits. Even by using an API token, we need to share or generate it for each deployment and local development of apps and also deal with (increased) rate limits and deployment caching. GitHub REST API is also complex with (unnecessary) bigger payloads because of backward compatibility.
UNGH provides a simplified, cached, and anonymous layer to make GitHub API more enjoyable!
## Roadmap
- [x] Hosted MVP service (powered by cloudflare workers and KV)
- [ ] Publish `ungh` js client to NPM ([#4](https://github.com/unjs/ungh/issues/4))
- [ ] Implement token pool and open token donations ([#5](https://github.com/unjs/ungh/issues/5))
- [ ] Mark API as stable
**Note:** This project is still under development and API might change.
## API
### `/repos/{owner}/{name}`
GitHub repository information.
**Example:** https://ungh.cc/repos/unjs/h3
```json
{
"repo": {
"id": 313641207,
"name": "h3",
"repo": "unjs/h3",
"description": "Minimal h(ttp) framework built for high performance and portability ⚡️",
"createdAt": "2020-11-17T14:15:44Z",
"updatedAt": "2022-11-05T21:38:43Z",
"pushedAt": "2022-11-06T06:48:23Z",
"stars": 1168,
"watchers": 1168,
"forks": 59,
"defaultBranch": "main"
}
}
```
### `/repos/{owner}/{name}/contributors`
Get repository contributors.
**Example:** https://ungh.cc/repos/unjs/h3/contributors
```json
{
"contributors": [
{
"id": 5158436,
"username": "pi0",
"contributions": 243
},
{
"id": 29139614,
"username": "renovate[bot]",
"contributions": 41
}
]
}
```
### `/repos/{owner}/{name}/files/{branch}`
Get repository files tree on specific branch.
**Example:** https://ungh.cc/repos/unjs/h3/files/main
```json
{
"meta": {
"sha": "501f0c6e623ea827d47691046f3c7319f5ac4651"
},
"files": [
{
"path": "README.md",
"mode": "100644",
"sha": "4c2b9ce4bccd6e046cd71be1a8c5e53a62778858",
"size": 5782
}
]
}
```
### `/repos/{owner}/{name}/readme`
Get repository readme file on main branch (not cached)
**Example:** https://ungh.cc/repos/unjs/h3/readme
```json
{
"html": "