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.jsondist-tags: an object with at least one key,latest, representing dist-tagsversions: a List of all Version objects for the Packagetime: an object containing acreatedandmodifiedtime stampauthor: object withname,email, and orurlof author as listed inpackage.jsonrepository: object withtypeandurlof package repository as listed inpackage.json_attachments: http://docs.couchdb.org/en/2.0.0/intro/api.html#attachmentsreadme: full text of thelatestversion'sREADME
name: package name,version: version numberhomepage: homepage listed in thepackage.jsonrepository: object withtypeandurlof package repository as listed inpackage.jsondependencies: object with dependencies and versions as listed inpackage.jsondevDependencies: object with devDependencies and versions as listed inpackage.jsonscripts: object with scripts as listed inpackage.jsonauthor: object withname,email, and orurlof author as listed inpackage.jsonlicense: as listed inpackage.jsonreadme: full text ofREADMEfile as pointed to inpackage.jsonreadmeFilename: name ofREADMEfile_id:<name>@<version>description: description as listed inpackage.jsondist: and object containing ashasumandtarballurl, 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 thenameandemailof the npm user who published the package@versionmaintainers: and array of objects containingauthorobjects as listed inpackage.jsondirectories:???
| 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 whichbcoeis the authormaintainer:bcoe: Show/filter results in whichbcoeis qualifier as a maintainerscope:foo: Show/filter results published under the@fooscopekeywords:batman: Show/filter results that havebatmanin 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.0not: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.0is: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