db_name
: "registry"doc_count
: 376841,doc_del_count
: 354,update_seq
: 2889325,purge_seq
: 0,compact_running
: false,disk_size
: 2098360443,data_size
: 1485346312,instance_start_time
: "1471680653634734",disk_format_version
: 6,committed_update_seq
: 2889325
_id
: the package name_rev
: latest revision idname
: the package namedescription
: description from thepackage.json
dist-tags
: an object with at least one key,latest
, representing dist-tagsversions
: a List of all Version objects for the Packagetime
: an object containing acreated
andmodified
time stampauthor
: object withname
,email
, and orurl
of author as listed inpackage.json
repository
: object withtype
andurl
of package repository as listed inpackage.json
_attachments
: http://docs.couchdb.org/en/2.0.0/intro/api.html#attachmentsreadme
: full text of thelatest
version'sREADME
name
: package name,version
: version numberhomepage
: homepage listed in thepackage.json
repository
: object withtype
andurl
of package repository as listed inpackage.json
dependencies
: object with dependencies and versions as listed inpackage.json
devDependencies
: object with devDependencies and versions as listed inpackage.json
scripts
: object with scripts as listed inpackage.json
author
: object withname
,email
, and orurl
of author as listed inpackage.json
license
: as listed inpackage.json
readme
: full text ofREADME
file as pointed to inpackage.json
readmeFilename
: name ofREADME
file_id
:<name>@<version>
description
: description as listed inpackage.json
dist
: and object containing ashasum
andtarball
url, usually in the form ofhttps://registry.npmjs.org/<name>/-/<name>-<version>.tgz
_npmVersion
: version of npm the package@version was published with_npmUser
: an object containing thename
andemail
of the npm user who published the package@versionmaintainers
: and array of objects containingauthor
objects as listed inpackage.json
directories
:???
Name | Value | Kind | Required? | Notes |
---|
{
"db_name": "registry",
"doc_count": 399172,
"doc_del_count": 354,
"update_seq": 3351374,
"purge_seq": 0,
"compact_running": false,
"disk_size": 2118398075,
"data_size": 1600835750,
"instance_start_time": "1475135224217333",
"disk_format_version": 6,
"committed_update_seq": 3351374
}
Name | Value | Kind | Required? | Notes |
---|---|---|---|---|
package | String | Path | ✅ | the name of the package |
This endpoint responds with the package metadata document, sometimes informally called a "packument" or "doc.json". The format of the response is described in detail in the package metadata documentation.
Name | Value | Kind | Required? | Notes |
---|---|---|---|---|
package | String | Path | ✅ | the name of the package |
version | String | Path | ✅ | a version number or latest |
Name | Value | Kind | Required? | Notes |
---|---|---|---|---|
text | String | Query | ❌ | full-text search to apply |
size | integer | Query | ❌ | how many results should be returned (default 20, max 250) |
from | integer | Query | ❌ | offset to return results from |
quality | float | Query | ❌ | how much of an effect should quality have on search results |
popularity | float | Query | ❌ | how much of an effect should popularity have on search results |
maintenance | float | Query | ❌ | how much of an effect should maintenance have on search results |
Note: the values of quality
, popularity
, and maintenance
are normalized into a unit-vector provide values between 0 - 1
for each to modify weightings, e.g., to return
results based solely on quality
, set quality=1.0
, maintenance=0.0
, popularity=0.0
.
response format:
{
"objects": [
{
"package": {
"name": "yargs",
"version": "6.6.0",
"description": "yargs the modern, pirate-themed, successor to optimist.",
"keywords": [
"argument",
"args",
"option",
"parser",
"parsing",
"cli",
"command"
],
"date": "2016-12-30T16:53:16.023Z",
"links": {
"npm": "https://www.npmjs.com/package/yargs",
"homepage": "http://yargs.js.org/",
"repository": "https://github.com/yargs/yargs",
"bugs": "https://github.com/yargs/yargs/issues"
},
"publisher": {
"username": "bcoe",
"email": "ben@npmjs.com"
},
"maintainers": [
{
"username": "bcoe",
"email": "ben@npmjs.com"
},
{
"username": "chevex",
"email": "alex.ford@codetunnel.com"
},
{
"username": "nexdrew",
"email": "andrew@npmjs.com"
},
{
"username": "nylen",
"email": "jnylen@gmail.com"
}
]
},
"score": {
"final": 0.9237841281241451,
"detail": {
"quality": 0.9270640902288084,
"popularity": 0.8484861649808381,
"maintenance": 0.9962706951777409
}
},
"searchScore": 100000.914
}
],
"total": 1,
"time": "Wed Jan 25 2017 19:23:35 GMT+0000 (UTC)"
}
special search qualifiers:
Special search qualifiers can be provided in the full-text query:
author:bcoe
: Show/filter results in whichbcoe
is the authormaintainer:bcoe
: Show/filter results in whichbcoe
is qualifier as a maintainerscope:foo
: Show/filter results published under the@foo
scopekeywords:batman
: Show/filter results that havebatman
in the keywords- separating multiple keywords with
,
acts like a logicalOR
+
acts like a logicalAND
,-
can be used to exclude keywords
- separating multiple keywords with
not:unstable
: Exclude packages whose version is< 1.0.0
not:insecure
: Exclude packages that are insecure or have vulnerable dependencies (based on the nsp registry)is:unstable
: Show/filter packages whose version is< 1.0.0
is:insecure
: Show/filter packages that are insecure or have vulnerable dependencies (based on the nsp registry)boost-exact:false
: Do not boost exact matches, defaults totrue