Skip to content

npm API: Search packages

Searches the npm registry for JavaScript packages by description or keywords, in npm's search order, and returns each package's latest version, weekly downloads and publish date.

npmjs.com (opens in a new tab)Version 1ReadNo sign-inVerified Nov 2, 2026

Unofficial. Not affiliated with or endorsed by npm.

Inputs

Values from the run on Oct 23, 2026, shown under Output.

Query, requiredquery

What the package should do, or keywords, such as date formatting.

date formatting

Max Results optionalmax_results

Maximum number of packages to return, such as 20.

20 (default)

Whole number from 1 to 250.

Output

From a run on Oct 23, 2026, shortened for this page.
{  "packages": [    {      "name": "fecha",      "publisher": "taylorhakes",      "description": "Date formatting and parsing",      "search_score": 776.5016,      "npm_page_link": "https://www.npmjs.com/package/fecha",      "latest_version": "4.2.3",      "weekly_downloads": 14434131,      "last_publish_date": "2022-04-15"    },    {      "name": "@kev_nz/daylight",      "publisher": "kev_nz",      "description": "lightweight javascript date formatting",      "search_score": 327.087,      "npm_page_link": "https://www.npmjs.com/package/@kev_nz/daylight",      "latest_version": "1.0.1",      "weekly_downloads": 1216,      "last_publish_date": "2019-12-02"    },    {      "name": "small-date",      "publisher": "rofrischmann",      "description": "Tiny (0.8kb) date formatting library with built-in i18n",      "search_score": 324.78616,      "npm_page_link": "https://www.npmjs.com/package/small-date",      "latest_version": "2.0.1",      "weekly_downloads": 3929,      "last_publish_date": "2024-11-06"    }  ]}
Price
1 credit per completed run (1¢ with pay as you go); failed runs are free.
Method
npmjs.com/search_packages
Returns
name, latest version, description, weekly downloads, last publish date, publisher, npm page link, search score

Use it from your agent

Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method npmjs.com/search_packages with the inputs above.

Ask your agent

  • Find npm packages for parsing CSV files in Node, show top 10 by weekly downloads
  • I need a JavaScript library that validates email addresses, list the most popular options
  • Which packages handle timezone-aware date formatting? Give me the latest versions and publish dates
  • Search npmjs.com for lightweight markdown-to-HTML converters with at least 20 results
  • Look up JavaScript packages for generating PDF invoices, sorted by search relevance
  • Looks up a public npm package by name or npm link. Returns its latest version, weekly downloads, maintainers, links, dates and version count.

    npmjs.com/get_package
  • Returns total and daily or Monday-start weekly npm downloads for a package over the last week, month, or year.

    npmjs.com/get_download_stats
  • Searches PyPI by keywords and returns matching packages in relevance order, each with its latest version and that version's release date. Returns up to 100 results.

    pypi.org/search_packages
  • Finds public Docker Hub container images matching a software name, in Docker Hub search order, with publisher, badge, stars, last update and exact total pulls when Docker Hub publishes them. Can keep only Docker Official Images and Verified Publisher images.

    hub.docker.com/search_container_images
  • Finds Rust crates on crates.io by keywords, sorted by relevance, total downloads, recent downloads, or newest creation.

    crates.io/search_crates
  • Finds Android apps on Google Play by keywords, in Play search order, with each listing's developer, star rating, price and currency for the chosen country, download range and link. Results are limited to apps shown on the public search page.

    play.google.com/search_apps
  • Finds Chrome Web Store extensions by keywords in store order, with each listing's developer, users, rating, rating count, short description and store link. Some listings omit developer, users or ratings.

    chromewebstore.google.com/search_extensions
  • Searches the WordPress.org plugin directory by description and returns matches in directory search order, with ratings, installations, compatibility and plugin page links.

    wordpress.org/search_plugins