> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/npm/user>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/npm/user.mdx>

---

# npm User API

One npm username resolved to its profile, with the account type npm stores and the number of packages it can publish.

`GET /v1/npm/user?username=sindresorhus` returns `data.user` with `name`, `type`, `fullName`, `githubUsername`, `description`, `requiresTwoFactor`, `createdAt`, `updatedAt`, `orgs` and `packagesTotal`. `type` is `user` or `org`: npm stores both scopes and user accounts, and the response reports the stored value rather than what the URL suggested.

Username lookup is case-sensitive. A name npm does not have returns `lookupStatus: not_found` with `data.user: null`. `orgs` is an array of org references and is currently always an empty array, including for maintainers of orgs, so treat it as present but not populated. Use `GET /v1/npm/user/packages` to page through the packages the user can publish.

## Request

- **Endpoint:** `GET /v1/npm/user`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by username
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/npm/user/get)
- **Platform page:** [/platforms/npm](https://www.socialfetch.dev/platforms/npm)

## FAQ

### Why is type sometimes org for a /user request?

The response reports the stored value. npm can store a user and an org under the same kind of scope, so a /user lookup can return type org. Use GET /v1/npm/org when you specifically want an org or scope profile.

### What does packagesTotal count?

It is the number of packages the account can publish, when a count is available. It is null when no count is available. Page the list with GET /v1/npm/user/packages to get the actual packages.

### Are email addresses returned?

No. The profile exposes the display name, GitHub handle, description and dates, not email addresses. The contract leaves contact details out on purpose.

### What happens for a username that does not exist?

HTTP 200 with data.lookupStatus not_found and data.user null. Names are case-sensitive, so a differently cased name can miss even when the account exists.

### Why does a known account such as npm return 503?

The account named npm is not publicly available; the route returns 503 temporarily_unavailable for it instead of claiming not_found, so you can tell an unavailable profile from a missing one.

### What does the request cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
