InsightSocial

npm scraper API

The InsightSocial npm API has 18 endpoints, from 20 credits a call. A package call costs 20 credits, about $0.02 on Pro, and your first 10 calls up to 100 credits each are free.

The npm API for packages, versions, downloads, dependents, security advisories and provenance, plus users, orgs and registry changes, in the same envelope as every other platform on your key.

18 endpoints · from 20 credits a call · 10 free calls up to 100 credits each · no credit card

curl "https://api.insightsocial.app/v1/npm/package?name=express" \
-H "x-api-key: $INSIGHTSOCIAL_API_KEY"
200 OKJSON
{
"success": true,
"platform": "npm",
"endpoint": "/v1/npm/package",
"schema_version": "2",
"data": {
"dist_tags": {
"latest": "5.3.0",
"latest-4": "4.22.3"
},
"latest_version": "5.3.0",
"package": {
"name": "express",
"version": "5.3.0",
"description": "Fast, unopinionated, minimalist web framework",
"license": "MIT",
"homepage": "https://expressjs.com/",
"repository": {
"type": "git",
"url": "git+https://github.com/expressjs/express.git"
},
"engines": {
"node": ">= 18"
},
"deprecated": null
}
},
"unavailable": [],
"credits_used": 0,
"charge_reason": "miss",
"free_call": true
}

What npm data can you get?

Public npm data only, in the same JSON envelope as every other platform. Every npm endpoint is beta: inside data it returns npm's own structure under our naming rules (snake_case keys, string ids, ISO times where npm gives a timestamp), not the shared profile and post schema, and fields may change.

Packages and versions

A package's latest version, dist-tags, publisher and dependencies, its full registry document, every version with publish time and sizes, and one version in full.

Downloads

Downloads for one package over a period or a day range, daily if you want, per version for last week, or for up to 128 packages in one call.

Dependents, advisories and provenance

The packages that depend on one, the security advisories that affect a version, and its decoded publish and SLSA provenance attestations.

Search, users, orgs and the registry

Registry search, a user's or org's profile and packages, recent updates and the registry change feed.

What people build with the npm API

  • Dependency and security reviews

    Check a package's advisories, provenance, maintainers and deprecation before you add it, in a CI job or an AI agent.

  • Adoption tracking

    Compare downloads for a set of packages over time, daily or by version, to see which libraries are growing.

  • Ecosystem research

    List a package's dependents and an org's packages, then follow the registry change feed for new releases.

npm API endpoints

All 18 npm endpoints and their price in credits. 1 are metered: they show a range and charge what the call actually read.

EndpointCreditsWhat it returns
/org20Get an npm org or scope profile, including the type npm actually stores.
/org/packages20List the packages an npm org or scope can publish, 25 per page.
/package20Get an npm package's latest version, every dist-tag, publisher, dependencies and last week's downloads.
/package/advisories20List the security advisories affecting an npm package version, or every version.
/package/dependents20List packages that depend on an npm package, 36 per page; a page past the served list is empty.
/package/details20Get npm package registry document with every version, README, stars and timestamps.
/package/downloads20Get npm downloads for a package over a period or a day range, or the whole registry's total.
/package/downloads/versions20Get last week's npm downloads for every version of a package.
/package/provenance20Get the publish and SLSA provenance attestations attached to an npm version, decoded from their sigstore bundles.
/package/version20Get one npm version document, by exact version or dist-tag, with its files, dependencies, scripts and registry metadata.
/package/versions20List an npm package's versions newest first, with publication time, deprecation, provenance, integrity and sizes.
/packages/downloads20–1,600Get npm downloads for up to 128 package names in one call, one result per requested name.
/packages/search20Search the npm registry by words and qualifiers, ranked by npm's search score; a page past the results is empty.
/registry/changes20List npm registry changes from a sequence cursor, with deleted-document markers.
/registry/packages20List npm package names in registry key order, with an opaque cursor.
/registry/recent20List recent npm package updates, newest first, at most 50 items.
/user20Get an npm user's profile: display name, GitHub handle, dates and package count.
/user/packages20List the packages an npm user can publish, 25 per page.

Parameters, response fields and examples for each endpoint are in the npm API reference.

InsightSocial vs the official npm API

The npm registry and its downloads API are public and free to read without a key.

InsightSocial APIOfficial npm API
AccessOne API keyOpen; no key needed to read
ShapeOne envelope, cursor paging and errors shared with every platformThe registry's own documents
Other platformsThe same key covers GitHub and the other platforms toonpm only
Cost per call20 creditsFree to read

The official API is the right tool for posting, messaging or managing accounts you own. This one is read-only public data.

How much does the npm API cost?

npm calls start at 20 credits. Every endpoint's price is in the table above and in the free GET /v1/endpoints catalogue, so you know the cost before you call. Pro's 10,000 monthly credits cover about 500 package lookups at 20 credits each.

  • Failed calls are free

    A call that errors or finds nothing costs 0 credits.

  • Repeats and retries

    A repeat call is charged again: the full price when it fetches new data, 2 credits when the answer comes from the shared cache. Add fresh=1 to force a new read. Only a retry with the same Idempotency-Key is free.

  • One balance

    API calls and Chrome extension exports share the same credits. The free plan includes 500 a month.

Not writing code?

Connect InsightSocial to Claude or ChatGPT and ask for npm data in plain English. Same account, same credits.

Use it from Claude or ChatGPT

npm API: frequently asked questions

If you only need npm, the registry and its downloads API are free and need no key, and they are a fine choice. This one is for when npm is one of several sources: one key, one response envelope, one credit balance and the same paging and errors as GitHub, Hugging Face and the rest.