gh-proxy is a GitHub API proxy that provides rate limiting, caching, and token pooling for GitHub API requests.
https://gh-proxy.hackclub.com
Include your API key in the X-API-Key header:
curl -H "X-API-Key: your_api_key_here" https://gh-proxy.hackclub.com/gh/user
Description: Proxy any GitHub REST API endpoint
Example:
# Get current user
curl -H "X-API-Key: your_key" https://gh-proxy.hackclub.com/gh/user
# Get repository information
curl -H "X-API-Key: your_key" https://gh-proxy.hackclub.com/gh/repos/octocat/Hello-World
# List user repositories
curl -H "X-API-Key: your_key" https://gh-proxy.hackclub.com/gh/users/octocat/repos
# Search repositories
curl -H "X-API-Key: your_key" "https://gh-proxy.hackclub.com/gh/search/repositories?q=javascript"
Description: Proxy GitHub GraphQL API
Content-Type: application/json
Example:
# GraphQL query
curl -X POST \
-H "X-API-Key: your_key" \
-H "Content-Type: application/json" \
-d '{"query": "query { viewer { login name } }"}' \
https://gh-proxy.hackclub.com/gh/graphql
Each API key has its own rate limit (configurable per key, default: 10 requests/second).
Rate Limit Exceeded: Returns 429 Too Many Requests when limit is exceeded.
Responses are automatically cached to improve performance:
X-Gh-Proxy-Cache header for hit/miss statusCache Hit: X-Gh-Proxy-Cache: hit means the response came from cache
Cache Miss: X-Gh-Proxy-Cache: miss means a fresh request was made to GitHub
The proxy adds helpful debug headers to responses:
X-Gh-Proxy-Cache: hit/miss - Whether response came from cacheX-Gh-Proxy-Category: core/search/graphql - API category usedX-Gh-Proxy-Client: Your API key identifierX-Gh-Proxy-Donor: GitHub user who donated the token used (when applicable)const response = await fetch('https://gh-proxy.hackclub.com/gh/user', {
headers: {
'X-API-Key': 'your_api_key_here'
}
});
const user = await response.json();
console.log(user);
const axios = require('axios');
const api = axios.create({
baseURL: 'https://gh-proxy.hackclub.com/gh',
headers: {
'X-API-Key': 'your_api_key_here'
}
});
// Get user info
const user = await api.get('/user');
// GraphQL query
const graphql = await api.post('/graphql', {
query: 'query { viewer { login repositories(first: 10) { nodes { name } } } }'
});
import requests
headers = {'X-API-Key': 'your_api_key_here'}
# REST API
response = requests.get('https://gh-proxy.hackclub.com/gh/user', headers=headers)
user = response.json()
# GraphQL
graphql_query = {
"query": "query { viewer { login name } }"
}
response = requests.post('https://gh-proxy.hackclub.com/gh/graphql',
headers=headers,
json=graphql_query)
data = response.json()
401 Unauthorized: Missing or invalid API key403 Forbidden: API key disabled or insufficient permissions413 Request Entity Too Large: Request body too large (max 1MB)429 Too Many Requests: Rate limit exceededFor API keys or technical support, contact your system administrator.