Duaer

Get started

npm packages in Duaer

In Duaer: JavaScript packages in the npm registry by name or keywords, with latest version, license, and weekly downloads. One successful search uses 1 credit.

What you get

Duaer npm packages searches the public npm registry and ranks results by npm relevance, including popularity.

Pick Duaer Data → npm packages in the node creator, or open the data market. Related: PyPI package, OSV vulnerabilities.

When to use it

  • Find a JavaScript library for a task and compare downloads.
  • Get the latest version and license of a package.

When not to use it

Search on the canvas

  1. Open the node creator and pick Duaer Data → npm packages.
  2. Fill Words (such as date picker).
  3. Limit defaults to 10, max 20. Execute.

A search uses 1 credit only when it returns rows. No rows, wrong input, or an upstream failure uses 0.

Call the API

  • GET https://api.duaer.com/v1/data/npm?words=date%20picker
  • Authorization: Bearer <Duaer key>

The call skill below matches Copy skill in the Duaer data market, with parameters, examples, and result fields.

Call skill

Same text as Copy skill.

---
name: duaer-npm
description: >-
  Duaer npm packages. JavaScript packages in the npm registry by name or keywords, with latest version, license, and weekly downloads.
  One successful search uses 1 Duaer credit.
---

# Duaer npm packages

Duaer npm packages searches the public npm registry and ranks results by npm relevance, including popularity.

## When to use

- Find a JavaScript library for a task and compare downloads.
- Get the latest version and license of a package.

## When not to use

- Python packages. Use https://skills.duaer.com/pypi.md.
- Vulnerabilities in a package. Use https://skills.duaer.com/osv.md.

## Call

`GET https://api.duaer.com/v1/data/npm?words=date%20picker`

Header: `Authorization: Bearer <Duaer key>`

Use an account key or a model API key.

Get a Duaer key: https://skills.duaer.com/keys.md

## Parameters

Provide `words`.

- `words` — Package name or keywords, such as date picker.
- `limit` — Optional. Rows to return, from 1 to 20. Default 10.

## Examples

- `GET https://api.duaer.com/v1/data/npm?words=date%20picker` — date picker libraries.
- `GET https://api.duaer.com/v1/data/npm?words=react&limit=3` — the top React packages.

## Result

The response is `{ "items": [...] }`. Each item has `source`, `title`, `url`, and `summary`, plus:

- `package`, `version`, `description`, `license` — package facts.
- `weeklyDownloads`, `monthlyDownloads`, `dependents` — popularity.
- `keywords`, `repository`, `published` — tags, source repository, and release date.

Fields without a value are left out.

## Credits

A search that returns at least one row uses 1 credit.
An empty search, a search that finds nothing, or a failed search uses 0.
Wrong input returns 400 with a message and uses 0.
No remaining credits returns 402 and does not search.
A missing key returns 401.

## Related

- https://skills.duaer.com/pypi.md — Duaer PyPI package
- https://skills.duaer.com/osv.md — Duaer OSV vulnerabilities

Questions

How many credits does a npm packages search use in Duaer?

One credit when Duaer returns rows. A search with no rows or an error uses 0.

How does Duaer npm packages rank results?

Duaer npm packages keeps the npm relevance order, which includes popularity.

In this section