Docs / Platforms / npm18 operations / 17 live / 1 mapped

npm

npm is exposed through 17 live operations covering search and discovery, public profiles and creator metadata. The full reference is below; mapped routes are explicitly disabled and never charge credits.
Overview & use cases

What npm data is for.

Live npm capabilities, credit floor, and typical lookup workflows.

Use npm when you need search and discovery, public profiles and creator metadata without maintaining a separate adapter for each route. Start with the lowest-cost live operation, then add search or list endpoints only when the response shape fits your product.

Live

17

Paid only

0

Price floor

1 cr

Use cases

  • Get npm org or scope

    Call /v1/npm/org when you need a normalized get npm org or scope response with the same credit and cache rules as the rest of the catalog.

  • List npm org or scope packages

    Call /v1/npm/org/packages when you need a normalized list npm org or scope packages response with the same credit and cache rules as the rest of the catalog.

  • Get npm package

    Call /v1/npm/package when you need a normalized get npm package response with the same credit and cache rules as the rest of the catalog.

Contract / auth

Auth & error contract.

The platform follows the same gateway and billing rules as the rest of CleanFetch.

Auth

Send x-api-key: cf_live_... or Authorization: Bearer cf_live_.... A missing or invalid key returns 401.

Billing

Successful lookups charge the listed credits. Cache hits, 5xx responses and mapped 503 routes cost 0 credits.

Limits

429 includes Retry-After and costs nothing. Paid-only routes return 403 plan_required before any provider call.

Mapped routes

1 routes are cataloged but not connected. They return 503 upstream_not_configured and never charge.

Reference / 18

Operations

Live routes are expanded first with parameters, request example and response fields. Mapped routes are compact placeholders.

Live / 17

ready
GET

Get npm org or scope

/v1/npm/org
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/org?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

List npm org or scope packages

/v1/npm/org/packages
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
pagestringnoLookup parameter.
cursorstringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/org/packages?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get npm package

/v1/npm/package
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

List npm package security advisories

/v1/npm/package/advisories
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
versionstringnoPackage version.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package/advisories?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get npm package full registry document

/v1/npm/package/details
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package/details?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get npm package downloads

/v1/npm/package/downloads
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringnoPackage name.
periodstringnoLookup parameter.
fromstringnoLookup parameter.
tostringnoLookup parameter.
granularitystringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package/downloads" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get npm downloads for every version

/v1/npm/package/downloads/versions
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package/downloads/versions?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get npm package provenance

/v1/npm/package/provenance
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
versionstringnoPackage version.
includestringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package/provenance?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get one npm package version

/v1/npm/package/version
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
versionstringyesPackage version.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package/version?name=example&version=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

List npm package versions

/v1/npm/package/versions
1 credits3/day free6h cache
NameTypeRequiredDescription
namestringyesPackage name.
limitstringnoMaximum records to return, from 1 to 20.
cursorstringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/package/versions?name=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get npm downloads for several packages

/v1/npm/packages/downloads
1 credits3/day free6h cache
NameTypeRequiredDescription
namesstringyesLookup parameter.
periodstringnoLookup parameter.
fromstringnoLookup parameter.
tostringnoLookup parameter.
granularitystringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/packages/downloads?names=example" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

List npm registry changes

/v1/npm/registry/changes
1 credits3/day free6h cache
NameTypeRequiredDescription
sincestringnoLookup parameter.
limitstringnoMaximum records to return, from 1 to 20.
cursorstringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/registry/changes" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

List npm package names

/v1/npm/registry/packages
1 credits3/day free6h cache
NameTypeRequiredDescription
afterstringnoLookup parameter.
limitstringnoMaximum records to return, from 1 to 20.
cursorstringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/registry/packages" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

List npm recent package updates

/v1/npm/registry/recent
1 credits3/day free6h cache
Request
curl -s "https://api.cleanfetch.dev/v1/npm/registry/recent" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

Get npm user

/v1/npm/user
1 credits3/day free6h cache
NameTypeRequiredDescription
usernamestringyesPublic handle without the @ prefix.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/user?username=nasa" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.
GET

List npm user packages

/v1/npm/user/packages
1 credits3/day free6h cache
NameTypeRequiredDescription
usernamestringyesPublic handle without the @ prefix.
pagestringnoLookup parameter.
cursorstringnoLookup parameter.
Request
curl -s "https://api.cleanfetch.dev/v1/npm/user/packages?username=nasa" \
  -H "x-api-key: $CLEANFETCH_API_KEY"
Response
{
  "data": {
    "platform": "npm",
    "count": 1,
    "items": [
      {
        "id": "123456",
        "url": "https://example.com/item/123456",
        "text": "Example public post returned by this endpoint.",
        "createdAt": "2026-11-30T00:00:00.000Z",
        "author": {
          "username": "nasa",
          "name": "NASA"
        }
      }
    ]
  },
  "meta": {
    "lookupStatus": "found",
    "creditsCharged": 1,
    "cached": false
  }
}

Returns

platformcountitems[].iditems[].urlitems[].textitems[].createdAt

Input notes

  • • Free accounts can call this endpoint up to 3 times per day.
  • • Responses are cached for 6h.
  • • A public record that does not exist returns not_found and is charged once.

Mapped / 1

503 · 0 credits
GET

List npm package dependents

/v1/npm/package/dependents

503 upstream_not_configured · 0 credits
FAQ / npm

Common npm API questions

Pricing, caching, authentication, and placeholder behavior.
How many npm operations are live?

17 of 18 cataloged operations are live. 1 mapped operation returns 503 upstream_not_configured and cost 0 credits.

What does a npm call cost?

Live operations range from 1 to 1 credits. 17 are available on the free daily cap and 0 are paid-only. Cache hits cost 0 credits.

Are npm responses cached?

Successful responses are cached between 6h and 6h. A cache hit costs 0 credits and does not consume the free daily cap.

How do I authenticate npm requests?

Send x-api-key or Authorization: Bearer with a CleanFetch key. Missing or invalid keys return 401; paid-only routes return 403 plan_required; rate limits return 429 with Retry-After. A 5xx or timeout costs 0 credits.

ready