---
title: "Get a user"
method: GET
path: "/users/{username}"
tags: ["users"]
---

# Get a user

`GET /users/{username}`

Provides publicly available information about someone with a GitHub account.

If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.

The `email` key in the following response is the publicly visible email address from your GitHub Enterprise Cloud [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub Enterprise Cloud. For more information, see [Authentication](https://docs.github.com/enterprise-cloud@latest/rest/guides/getting-started-with-the-rest-api#authentication).

The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/enterprise-cloud@latest/rest/users/emails).

## Path parameters

- `username` string, required

## Response `200`

Response

- union
  - PrivateUser — Private User
    - `login` string, required
    - `id` integer, required
    - `user_view_type` string
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `name` string, nullable, required
    - `company` string, nullable, required
    - `blog` string, nullable, required
    - `location` string, nullable, required
    - `email` string, email, nullable, required
    - `notification_email` string, email, nullable
    - `hireable` boolean, nullable, required
    - `bio` string, nullable, required
    - `twitter_username` string, nullable
    - `public_repos` integer, required
    - `public_gists` integer, required
    - `followers` integer, required
    - `following` integer, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `private_gists` integer, required
    - `total_private_repos` integer, required
    - `owned_private_repos` integer, required
    - `disk_usage` integer, required
    - `collaborators` integer, required
    - `two_factor_authentication` boolean, required
    - `plan` object
      - `collaborators` integer, required
      - `name` string, required
      - `space` integer, required
      - `private_repos` integer, required
    - `business_plus` boolean
    - `ldap_dn` string
  - PublicUser — Public User
    - `login` string, required
    - `id` integer, required
    - `user_view_type` string
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `name` string, nullable, required
    - `company` string, nullable, required
    - `blog` string, nullable, required
    - `location` string, nullable, required
    - `email` string, email, nullable, required
    - `notification_email` string, email, nullable
    - `hireable` boolean, nullable, required
    - `bio` string, nullable, required
    - `twitter_username` string, nullable
    - `public_repos` integer, required
    - `public_gists` integer, required
    - `followers` integer, required
    - `following` integer, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `plan` object
      - `collaborators` integer, required
      - `name` string, required
      - `space` integer, required
      - `private_repos` integer, required
    - `private_gists` integer
    - `total_private_repos` integer
    - `owned_private_repos` integer
    - `disk_usage` integer
    - `collaborators` integer

## Other responses

- `404` — Resource not found

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
