Social

Query GitHub User

0calls
2 credits / call

Need a complete picture of a developer's GitHub presence? This endpoint returns a detailed basic profile, the list of organizations the developer belongs to, and can also pull the developer's contribution-square data in a single call.

GET
uapis.cn
/api/v1/github/user
Query parameters
7
user
string
required

GitHub username. Must follow GitHub naming rules (alphanumerics and hyphens, up to 39 characters).

activity
boolean

Whether to fetch the last year's contribution activity (e.g. contribution counts, dates). Pass true to enable; any other value disables it.

activity_scope
string

Contribution-activity scope. Allowed values: all or organization. Only meaningful when activity is enabled.

org
string

Organization login name. When provided, the endpoint automatically switches to organization-scoped contribution queries (sets activity_scope=organization).

pinned
boolean

Whether to also return the user's pinned repositories. Pass true to enable; any other value disables it.

repos
boolean

Whether to also return the user's recently active public repositories. Pass true to enable; any other value disables it.

repos_limit
integer

Maximum number of public repositories to include. Only meaningful when repos=true. Passing repos_limit alone is treated as repos=true.

Overview

  • Basic developer profile: Returns repository count, follower count, public email, location, social-media links, and other profile fields. Useful for auto-generating developer cards on technical blogs or building developer dossiers.
  • Contribution calendar and timeline: When activity=true is enabled, the endpoint fetches the user's full contribution data for the past year. The returned JSON is pre-aggregated by week (weeks) and day (days), so a simple double-loop on the frontend renders the same calendar shown on the user's GitHub profile.
  • Organization-scoped contributions: To evaluate someone's activity inside a specific team or open-source project only, pass the org parameter. The endpoint strips out commits made to private projects or personal repositories outside the organization and returns contributions scoped to that organization.

Query parameters

user
stringrequired

GitHub username. Must follow GitHub naming rules (alphanumerics and hyphens, up to 39 characters).

activity
booleanoptional

Whether to fetch the last year's contribution activity (e.g. contribution counts, dates). Pass true to enable; any other value disables it.

activity_scope
stringoptional

Contribution-activity scope. Allowed values: all or organization. Only meaningful when activity is enabled.

org
stringoptional

Organization login name. When provided, the endpoint automatically switches to organization-scoped contribution queries (sets activity_scope=organization).

pinned
booleanoptional

Whether to also return the user's pinned repositories. Pass true to enable; any other value disables it.

repos
booleanoptional

Whether to also return the user's recently active public repositories. Pass true to enable; any other value disables it.

repos_limit
integeroptional

Maximum number of public repositories to include. Only meaningful when repos=true. Passing repos_limit alone is treated as repos=true.

Response

200 / OK

Success. Returns the user's information. When activity=true is set, an activity object is included in the response.

JSON
{
  // GitHub login name.
  "login": "torvalds",
  // User's public display name.
  "name": "Linus Torvalds",
  // User personal description.
  "bio": "Linux kernel creator",
  // User-supplied company or organization.
  "company": "Linux Foundation",
  // User-supplied public location.
  "location": "Portland, OR",
  // User-supplied website or blog URL.
  "blog": "",
  // Linked X (Twitter) account.
  "twitter_username": "",
  // Publicly visible email address.
  "email": "",
  // GitHub profile URL.
  "html_url": "https://github.com/torvalds",
  // User avatar URL.
  "avatar_url": "https://avatars.githubusercontent.com/u/1024025?v=4",
  // Account type. Typically `User` or `Organization`.
  "type": "User",
  // Public repository count.
  "public_repos": 8,
  // Public Gist count.
  "public_gists": 0,
  // Number of users following this user.
  "followers": 100,
  // Number of users this user is following.
  "following": 0,
  // GitHub account creation time (ISO 8601).
  "created_at": "2011-09-03T15:26:22Z",
  // User profile last-updated time (ISO 8601).
  "updated_at": "2026-04-12T00:00:00Z",
  // Public organizations the user has joined.
  "organizations": [
    {
      // Organization login name.
      "login": "linux-foundation",
      // Organization description.
      "description": "Open source organization",
      // Organization profile URL.
      "html_url": "https://github.com/linux-foundation",
      // Organization avatar URL.
      "avatar_url": "https://avatars.githubusercontent.com/u/123456?v=4"
    }
  ],
  // User's pinned repositories list (returned when `pinned=true`).
  "pinned_repositories": [
    {
      // Repository name.
      "name": "linux",
      // Full repository name including the owner.
      "full_name": "torvalds/linux",
      // Repository description.
      "description": "Linux kernel source tree",
      // Repository homepage URL.
      "html_url": "https://github.com/torvalds/linux",
      // Repository homepage URL.
      "homepage": "https://www.kernel.org",
      // Primary repository language.
      "language": "C",
      // Repository visibility.
      "visibility": "PUBLIC",
      // Star count.
      "stargazers": 200000,
      // Fork count.
      "forks": 55000,
      // Whether this repository is a fork.
      "fork": false,
      // Whether this repository is archived.
      "archived": false,
      // Time of the most recent push.
      "pushed_at": "2026-04-15T00:00:00Z",
      // Time of the most recent metadata update.
      "updated_at": "2026-04-15T00:00:00Z"
    }
  ],
  // Recently active public repositories (returned when `repos=true` or when `repos_limit` is supplied).
  "repositories": [
    {
      // Repository name.
      "name": "linux",
      // Full repository name including the owner.
      "full_name": "torvalds/linux",
      // Repository description.
      "description": "Linux kernel source tree",
      // Repository homepage URL.
      "html_url": "https://github.com/torvalds/linux",
      // Repository homepage URL.
      "homepage": "https://www.kernel.org",
      // Primary repository language.
      "language": "C",
      // Repository visibility.
      "visibility": "public",
      // Star count.
      "stargazers": 200000,
      // Fork count.
      "forks": 55000,
      // Whether this repository is a fork.
      "fork": false,
      // Whether this repository is archived.
      "archived": false,
      // Time of the most recent push.
      "pushed_at": "2026-04-15T00:00:00Z",
      // Time of the most recent metadata update.
      "updated_at": "2026-04-15T00:00:00Z"
    }
  ],
  // Free QQ Group Info API - Fetch group data
  "activity": {
    // Activity-statistics scope. Typically `all` or `organization`.
    "scope": "organization",
    // Organization login name when filtered by organization.
    "organization": "linux-foundation",
    // Statistics start date.
    "from": "2025-04-12",
    // Statistics end date.
    "to": "2026-04-12",
    // Total contributions in the statistics range.
    "total_contributions": 4,
    // Total commit contributions.
    "total_commit_contributions": 2,
    // Total issue contributions.
    "total_issue_contributions": 1,
    // Total pull-request contributions.
    "total_pull_request_contributions": 1,
    // Total pull-request-review contributions.
    "total_pull_request_review_contributions": 0,
    // Number of fully active days in the year.
    "contribution_calendar": {
      // Color palette for contribution levels.
      "colors": [
        "string"
      ],
      // Whether GitHub's Halloween palette is enabled.
      "is_halloween": false,
      // Total contributions in the contribution calendar.
      "total_contributions": 4,
      // Contribution data arranged by week.
      "weeks": [
        {
          // Date of the first day in the week.
          "first_day": "2026-04-06",
          // Daily contribution breakdown for the week.
          "contribution_days": [
            {
              // Current date.
              "date": "2026-04-07",
              // Contribution count for the day.
              "contribution_count": 1,
              // Color for the day's contribution level.
              "color": "#40c463",
              // Day-of-week index. 0 = Monday, 6 = Sunday.
              "weekday": 2
            }
          ]
        }
      ]
    },
    // Contribution times aggregated by month.
    "timeline": [
      {
        // Month, formatted as `YYYY-MM`.
        "month": "2026-04",
        // Contribution count for the month.
        "contribution_count": 4
      }
    ]
  }
}

400 / Bad Request

Invalid parameter format or invalid parameter combination.

Format 1Conflicting parameter combination.
JSON
{
  // Error code.
  "code": "INVALID_PARAMETER",
  // Error reason.
  "error": "When `org` is supplied, `activity_scope` must be `organization`."
}
Format 2Invalid username.
JSON
{
  // Error code.
  "code": "INVALID_PARAMETER",
  // Error reason.
  "error": "`activity_scope` must be either `all` or `organization`."
}

404 / Not Found

Specified user not found, or the provided organization does not exist.

JSON
{
  // Error code.
  "code": "USER_NOT_FOUND",
  // Error reason.
  "error": "GitHub user not found."
}

502 / Bad Gateway

Upstream server error or response timeout.

JSON
{
  // Error code.
  "code": "UPSTREAM_ERROR",
  // Error reason.
  "error": "Failed to connect to upstream GitHub."
}