API Documentation

v1.0

GHP Info provides three read-only REST APIs for public GitHub profiles, repositories, and recent activity. All endpoints are public and require no sign-in.

GET/api/users/[username]

Get a public user profile. Missing or inaccessible users return 404. Organization profiles are also returned; the website analyzes individual users only.

Parameters

ParameterTypeRequiredDescription
usernamestringRequiredPath parameter: a GitHub username validated by the site’s username rules.

Request example

curl "https://your-domain.com/api/users/everfu"

Example success response

{
  "data": {
    "login": "everfu",
    "id": 74389842,
    "name": "伍拾柒",
    "avatar_url": "https://avatars.githubusercontent.com/u/74389842?v=4",
    "html_url": "https://github.com/everfu",
    "bio": "山不转路,我自转山。",
    "company": "undefined",
    "location": "China",
    "blog": "www.efu.me",
    "created_at": "2020-11-13T02:00:22Z",
    "followers": 48,
    "following": 23,
    "public_repos": 38,
    "type": "User"
  },
  "fetchedAt": "2026-10-13T06:00:00Z",
  "complete": true
}

GET/api/users/[username]/repos

Get all owned public repositories, including forks and archived projects. The server handles pagination and deduplication; no pagination parameters are needed.

Parameters

ParameterTypeRequiredDescription
usernamestringRequiredPath parameter: a GitHub username validated by the site’s username rules.

Request example

curl "https://your-domain.com/api/users/everfu/repos"

Example success response

{
  "data": [
    {
      "id": 783145918,
      "name": "static",
      "full_name": "everfu/static",
      "html_url": "https://github.com/everfu/static",
      "description": "Host for static files",
      "language": "TypeScript",
      "stargazers_count": 1,
      "forks_count": 0,
      "fork": false,
      "archived": false,
      "pushed_at": "2026-10-13T04:41:57Z"
    }
  ],
  "fetchedAt": "2026-10-13T06:00:00Z",
  "complete": true
}

GET/api/users/[username]/events

Get up to 30 recent public events. GitHub provides at most 300 events from the last 30 days, with possible delays. This is not a complete contribution history.

Parameters

ParameterTypeRequiredDescription
usernamestringRequiredPath parameter: a GitHub username validated by the site’s username rules.

Request example

curl "https://your-domain.com/api/users/everfu/events"

Example success response

{
  "data": [
    {
      "id": "16825798396",
      "type": "WatchEvent",
      "created_at": "2026-10-09T14:26:24Z",
      "payload": {
        "action": "started"
      },
      "repo": {
        "name": "mui/mui-x"
      }
    }
  ],
  "fetchedAt": "2026-10-13T06:00:00Z",
  "complete": true
}

Response fields

data contains the endpoint’s result; fetchedAt is a UTC ISO fetch timestamp; complete indicates completeness. Error responses contain error.code and may include error.retryAt with a retry time.

Error responses

HTTP statusError codeMeaning
400INVALID_INPUTInvalid username
404NOT_FOUNDUser missing or publicly inaccessible
429RATE_LIMITGitHub primary or secondary rate limit
504TIMEOUTUpstream request timed out
502 / 503UNAVAILABLEUpstream or lookup service unavailable
503CONFIGURATIONInvalid server credential configuration
{
  "error": {
    "code": "RATE_LIMIT",
    "retryAt": "2026-10-13T07:00:00Z"
  }
}

Partial results

If repository pagination fails after some results arrive, the API returns HTTP 200 with complete: false and an error. Loaded repositories remain usable; overall totals, language distribution, and rankings require complete: true. Failure on the first page returns the corresponding error status.

{
  "data": [
    {
      "id": 783145918,
      "name": "static",
      "full_name": "everfu/static",
      "html_url": "https://github.com/everfu/static",
      "description": "Host for static files",
      "language": "TypeScript",
      "stargazers_count": 1,
      "forks_count": 0,
      "fork": false,
      "archived": false,
      "pushed_at": "2026-10-13T04:41:57Z"
    }
  ],
  "fetchedAt": "2026-10-13T06:00:00Z",
  "complete": false,
  "error": {
    "code": "TIMEOUT"
  }
}

Rate limits and caching

Limits are determined by GitHub. A 429 response may include a retry time. Concurrent requests for the same user and module are deduplicated. Complete successes are cached in-process for ten minutes, with a 100-entry limit; errors and partial results are not cached. Each instance maintains its own cache. Browser API responses are not cached.