npm
Search npm packages, then read one package version with its dependencies and tarball integrity hash
npm is the package registry for JavaScript and TypeScript. These endpoints search packages and read one published version of a package. Both use the canonical Post shape: the package name is post.id and post.ext.title, its description is post.content.text, and the npm-only facts sit in post.ext.npm.
Base URL: /v1/npm/...
npm exposes 2 routes here.
Quickstart
Search packages
Pass search terms as query. npm's own qualifiers work, for example keywords:cli or author:sindresorhus.
curl "https://www.socialcrawl.dev/v1/npm/search?query=react%20state" \
-H "x-api-key: YOUR_API_KEY"Read one package version
Pass the name as package (with its scope when it has one) and, optionally, a version or a tag. The latest version is the default.
curl "https://www.socialcrawl.dev/v1/npm/package?package=zod" \
-H "x-api-key: YOUR_API_KEY"{
"success": true,
"data": {
"post": {
"id": "zod",
"url": "https://www.npmjs.com/package/zod",
"content": { "text": "TypeScript-first schema declaration and validation library with static type inference" },
"ext": {
"title": "zod",
"npm": { "version": "4.6.7", "license": "MIT", "maintainers": ["colinhacks"], "file_count": 840 }
}
}
}
}Questions people ask
How do I read a scoped package?
Pass the full name, for example package=@vue/server-renderer, or its npm page as url.
Can I check what a version pulls in?
Yes. post.ext.npm.dependencies, peer_dependencies and engines list them with their version ranges, and integrity is the tarball's hash for verifying a download.
Do I get maintainers' email addresses?
No. Maintainers are listed by npm username only.
What does a package or version that does not exist return?
A 404, which is not charged.
All endpoints
2 endpoints available.
| Endpoint | Path | Credit Tier |
|---|---|---|
| Get an npm package version | /v1/npm/package | standard (1cr) |
| Search npm packages | /v1/npm/search | standard (1cr) |
How far back and how deep
Each list returns one page at a time. Send cursor for the next page, or max_items or max_pages to collect several pages in one call. A page size appears only where it has been verified. How paging works
| Path | Rows per page | Date window | One call collects |
|---|---|---|---|
/v1/npm/search | about 20 | since and until, applied to each page fetched | up to 5,000 rows or 50 pages; limit up to 100 |
Platform notes
Search pages with a cursor. Pass the returned cursor for the next page.
Downloads are on search results. post.ext.npm.downloads_weekly and downloads_monthly come with each search row.
