npm

Get npm package full registry document

Get npm package registry document with every version, README, stars and timestamps.

GET/v1/npm/package/details
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
namestringrequiredquery

npm package name, e.g. `express`, `lodash.merge`, `@types/node` or `--file--1`. Names are case-sensitive (`Express` is a different package) and keep legacy punctuation such as a leading `-`.

max 214 chars

Response fields
115

Endpoint-specific response payload.

datalookupStatus
string

Whether the item exists. Every outcome is HTTP 200; branch on this field.

one of: found, not_found

The full package document when found; otherwise null.

datapackagename
string

Package name, as the registry stores it.

datapackagescope
stringnullable

Package scope including `@`, or null for an unscoped name.

datapackageversion
stringnullable

Latest version, or null on a tombstone.

datapackagedescription
stringnullable

Description.

Keywords.

datapackagekeywords[]
stringoptional
datapackagelicense

Licence: an SPDX expression/string or the published object.

datapackagehomepage
stringnullable

Project homepage.

datapackagebugsUrl
stringnullable

Issue tracker URL.

Source repository.

datapackagerepositorytype
stringnullable

Repository type, e.g. `git`.

datapackagerepositoryurl
stringnullable

Repository URL as published.

datapackagerepositorydirectory
stringnullable

Monorepo directory the package was published from.

Author.

datapackageauthorname
stringnullable

Author name.

datapackageauthorurl
stringnullable

Author URL.

Contributors.

datapackagecontributors[]name
stringnullable

Contributor name.

datapackagecontributors[]url
stringnullable

Contributor URL.

datapackagecontributors[]githubUsername
stringnullable

GitHub handle the publisher listed.

Maintainers at the time this version was published. The details route uses the package's current maintainer list instead.

datapackagemaintainers[]username
string

Maintainer username.

Publisher of this version.

datapackagepublisherusername
stringnullable

Publishing username.

The CI identity, when the version was published by one.

datapackagepublishertrustedPublisherid
stringnullable

Trusted publisher kind, e.g. `github`.

datapackagepublishertrustedPublisheroidcConfigId
stringnullable

The publisher's OIDC configuration id.

Who approved a trusted publication.

datapackagepublisherapproverusername
stringnullable

Approving username.

Funding channels.

datapackagefunding[]type
stringnullable

Funding kind, e.g. `opencollective`.

datapackagefunding[]url
stringnullable

Funding URL.

datapackagedeprecated
stringnullable

Deprecation message; null when the version is not deprecated.

datapackagehasInstallScript
booleannullable

Whether `preinstall`, `install` or `postinstall` is defined, inferred from `scripts` when the field is absent. Null when neither the field nor those scripts are present: an implicit node-gyp rebuild from binding.gyp cannot be seen.

datapackagebin
objectnullable

Command-name to file map, or null when the package has no binaries.

The package's entrypoints.

datapackageentrypointsmain
stringnullable

`main` entrypoint.

datapackageentrypointsmodule
stringnullable

`module` entrypoint.

datapackageentrypointstypes
stringnullable

`types` or `typings` entrypoint.

datapackageentrypointstype
stringnullable

`type` field (`module` or `commonjs`).

datapackageentrypointsexports

The `exports` map, as published.

`files` patterns.

datapackagefiles[]
stringoptional
datapackagesideEffects
booleannullable

The `sideEffects` flag, when published as a boolean.

datapackageengines
object

Engine constraints.

Supported operating systems.

datapackageos[]
stringoptional

Supported CPU architectures.

datapackagecpu[]
stringoptional

Workspace patterns.

datapackageworkspaces[]
stringoptional
datapackagescripts
object

Package scripts.

datapackagedependencies
object

Runtime dependencies.

datapackagedevDependencies
object

Development dependencies.

datapackagepeerDependencies
object

Peer dependencies.

datapackagepeerDependenciesMeta
object

Peer dependency metadata.

datapackageoptionalDependencies
object

Optional dependencies.

datapackagebundleDependencies

Bundled dependencies, as an array or the legacy boolean.

The published artifact and its registry metadata.

datapackagedisttarballUrl
stringnullable

Tarball URL.

datapackagedistshasum
stringnullable

SHA-1 of the tarball.

datapackagedistintegrity
stringnullable

Subresource-integrity hash of the tarball.

datapackagedistfileCount
integernullable

Files in the tarball.

≥ 0

datapackagedistunpackedSize
integernullable

Unpacked bytes.

≥ 0

Registry signatures. The legacy PGP block is not exposed.

datapackagedistsignatures[]keyid
stringnullable

Signing key id.

datapackagedistsignatures[]sig
stringnullable

Signature.

Whether this version was published with provenance.

datapackageprovenanceavailable
boolean

Whether the version carries an attestation.

datapackageprovenancepredicateType
stringnullable

Predicate type of the provenance attestation.

datapackagegitHead
stringnullable

Git commit the version was built from.

The publisher's toolchain, from the version document.

datapackagepublishedWithnode
stringnullable

Node version used to publish.

datapackagepublishedWithnpm
stringnullable

npm CLI version used to publish.

datapackagetypes
stringnullable

How the package ships TypeScript types: bundled with it, or through a DefinitelyTyped `@types` package.

one of: bundled, definitelyTyped, null

datapackagedistTags
object

Every dist-tag.

datapackagelatestVersion
stringnullable

The version the `latest` dist-tag points at.

datapackagecreatedAt
stringnullable

ISO 8601 UTC timestamp, or null when npm has none.

datapackagemodifiedAt
stringnullable

ISO 8601 UTC timestamp, or null when npm has none.

datapackagestarCount
integernullable

How many users starred the package. Names are not exposed.

≥ 0

datapackagereadme
stringnullable

Latest README as raw Markdown, or null when there is none.

datapackagereadmeFilename
stringnullable

README filename.

datapackageversionCount
integer

Number of versions.

≥ 0

What was unpublished; present on a tombstone.

datapackageunpublishedat
stringnullable

ISO 8601 UTC timestamp, or null when npm has none.

Versions that were unpublished.

datapackageunpublishedversions[]
stringoptional
datapackagedependentsCount
integernullable

How many packages depend on this one.

≥ 0

Weekly downloads, when available.

Up to 52 complete weeks of downloads, oldest first.

datapackagedownloadsweekly[]from
string

First day, `YYYY-MM-DD`.

datapackagedownloadsweekly[]to
string

Last day, `YYYY-MM-DD`.

datapackagedownloadsweekly[]downloads
integer

Downloads in the window.

≥ 0

The last-publication entry.

datapackagelastPublishusername
stringnullable

Who published last.

datapackagelastPublishat
stringnullable

ISO 8601 UTC timestamp, or null when npm has none.

datapackageisSecurityPlaceholder
booleannullable

Whether the package is npm's security-holding placeholder. Null when the part could not be completed.

Every version, newest first.

datapackageversions[]version
string

Version.

datapackageversions[]publishedAt
stringnullable

ISO 8601 UTC timestamp, or null when npm has none.

datapackageversions[]deprecated
stringnullable

Deprecation message, or null.

datapackageversions[]hasProvenance
boolean

Whether the version carries a provenance attestation.

datapackageversions[]integrity
stringnullable

Tarball integrity hash.

datapackageversions[]unpackedSize
integernullable

Unpacked bytes.

≥ 0

datapackageversions[]fileCount
integernullable

Files in the tarball.

≥ 0

datacomplete
boolean

False when part of the answer could not be filled, so the dependents count, weekly downloads, type hint and placeholder flag are null; `missing` says which part.

Parts of the answer that could not be filled.

datamissing[]
stringoptional

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/npm/package/details?name=express" \
  -H "x-api-key: YOUR_API_KEY"

Responses

npm package details.