npm User Packages API
The packages one npm user can publish, 25 at a time, with names, versions, publish dates and maintainers.
GET /v1/npm/user/packages1 credit Failed requests are free
About this endpoint
GET /v1/npm/user/packages?username=isaacs returns data.packages, one page of 25 rows with name, description, version, distTags, maintainers, publisher, lastPublish, publishedAt, createdAt, updatedAt, types and isHighImpact. data.total is the package count when a count is available, and data.page carries page, perPage, hasMore, nextCursor and total.
Page numbers are 1-based and each page is 25 rows. A page past the end is found with an empty list rather than an error. cursor continues from data.page.nextCursor and cannot be combined with page. An unknown username returns lookupStatus: not_found with an empty list.
npm User Packages API FAQ
How many packages are on a page?
Each page carries 25 rows. data.page.page is the page number, data.page.perPage is 25 and data.page.hasMore says whether another page exists. Keep going while hasMore is true.
What happens past the last page?
The response is found with data.packages: [] and hasMore false. It is not an error and it is still billed as a request, so stop when hasMore turns false instead of requesting an empty page.
Should I use page or cursor?
Either, but not both. page is simple for a fixed position. cursor from data.page.nextCursor is better if the list changes while you page, because it records the next page rather than a raw offset supplied by you.
Does this include packages the user merely depends on?
No. It lists packages the user can publish. For packages that depend on a package, use GET /v1/npm/package/dependents. For the user profile itself, use GET /v1/npm/user.
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 an empty list or not_found, so an unavailable list is not mistaken for an account with no packages.
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. Each paginated page is a separate billed request.
Other npm endpoints
- PackageGET /v1/npm/package
- Package detailsGET /v1/npm/package/details
- VersionsGET /v1/npm/package/versions
- VersionGET /v1/npm/package/version
- DownloadsGET /v1/npm/package/downloads
- Downloads by versionGET /v1/npm/package/downloads/versions
- Downloads by nameGET /v1/npm/packages/downloads
- AdvisoriesGET /v1/npm/package/advisories