GitSvm API Reference

The GitSvm REST API powers the dashboard, editor, and explore pages. Base URL: https://gitsvm.fun/api. All endpoints accept an optional bearer token for higher rate limits and private-repo access.

Authentication

Send your GitSvm access token in the Authorization header:

Authorization: Bearer gsvm_xxx
Accept: application/vnd.gitsvm+json

Repositories

GEThttps://gitsvm.fun/api/repos/{owner}/{repo}

Fetch repository metadata (stars, forks, default branch, language).

Parameters
NameTypeDescription
ownerstringRepo owner login
repostringRepo name
Example request
curl https://gitsvm.fun/api/repos/vercel/next.js
Example response
{
  "full_name": "vercel/next.js",
  "stargazers_count": 124000,
  "forks_count": 26000,
  "default_branch": "canary",
  "language": "JavaScript"
}

Files & Tree

GEThttps://gitsvm.fun/api/repos/{owner}/{repo}/tree/{branch}?recursive=1

Recursive file tree for a branch. Used to power the in-app editor sidebar.

Parameters
NameTypeDescription
branchstringBranch name (e.g. main)
recursive1|0Include nested entries
Example response
{
  "sha": "abc...",
  "tree": [{ "path": "src/index.ts", "type": "blob" }],
  "truncated": false
}
GEThttps://gitsvm.fun/api/repos/{owner}/{repo}/contents/{path}?ref={branch}

Raw contents of a file (Accept: application/vnd.gitsvm.raw).

Parameters
NameTypeDescription
pathstringURL-encoded path inside the repo
refstringBranch, tag, or commit SHA
Example request
curl -H "Accept: application/vnd.gitsvm.raw" \
  https://gitsvm.fun/api/repos/vercel/next.js/contents/README.md?ref=canary

Issues & Pull Requests

GEThttps://gitsvm.fun/api/repos/{owner}/{repo}/issues?state=all&per_page=20

List issues (pull requests are filtered out client-side).

GEThttps://gitsvm.fun/api/repos/{owner}/{repo}/pulls?state=all&per_page=20

List pull requests for the repository.

User

GEThttps://gitsvm.fun/api/user

Authenticated user profile. Requires `Authorization: Bearer <token>`.

GEThttps://gitsvm.fun/api/user/repos?visibility=all&per_page=30&sort=updated

Repositories the authenticated user can access.

Rate limits

Unauthenticated: 60 requests/hour per IP. Authenticated: 5,000 requests/hour. The current status is returned in X-RateLimit-Remaining.