npm

Get npm package provenance

Get the publish and SLSA provenance attestations attached to an npm version, decoded from their sigstore bundles.

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

API key (`sfk_...`)

Parameters
3
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

versionstringoptionalquery

Exact version or dist-tag. A dist-tag is resolved to the version it points to. Default: `latest`.

max 128 chars

includestringoptionalquery

`raw` also returns each sigstore bundle. Signatures are decoded, not verified.

one of: raw

Response fields
28

Endpoint-specific response payload.

datalookupStatus
string

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

one of: found, not_found

dataname
string

Package name.

dataversion
string

Version the answer is about. A dist-tag is replaced by the version it points to.

Attestations attached to the version. Empty when npm has none; signatures are decoded, not verified.

dataattestations[]kind
string

`publish` for npm's publish attestation, `slsa-provenance` for SLSA, `unknown` for a future predicate type.

one of: publish, slsa-provenance, unknown

dataattestations[]predicateType
string

The predicate type from the bundle.

What the attestation is about.

dataattestations[]subjectpurl
stringnullable

Package URL from the attestation subject.

dataattestations[]subjectsha512
stringnullable

SHA-512 digest in the subject.

Source and workflow facts decoded from SLSA provenance.

dataattestations[]sourcerepositoryUrl
stringnullable

Source repository.

dataattestations[]sourceworkflowPath
stringnullable

Workflow file path.

dataattestations[]sourceref
stringnullable

Git ref the build ran from.

dataattestations[]sourcecommit
stringnullable

Git commit the build resolved.

dataattestations[]sourceevent
stringnullable

GitHub event that started the build.

dataattestations[]sourcerepositoryId
stringnullable

GitHub repository id.

dataattestations[]sourceownerId
stringnullable

GitHub owner id.

dataattestations[]builder
stringnullable

Builder identity.

dataattestations[]runUrl
stringnullable

CI run URL.

The public transparency-log entry that recorded the attestation; null when there is none.

dataattestations[]transparencyLoglogIndex
integernullable

Rekor log index.

≥ 0

dataattestations[]transparencyLogintegratedAt
stringnullable

When the entry was integrated into the log.

dataattestations[]raw
objectoptional

The sigstore bundle, only with `include=raw`.

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/provenance?name=express" \
  -H "x-api-key: YOUR_API_KEY"

Responses

npm provenance.