npm API

How to connect npm to Grok Bot

Add the Firecrawl plugin to Grok Bot once and it can call the npm API and every other provider in Firecrawl Alexandria, with no npm integration code.

Open Markdown

To connect npm to Grok Bot, add the Firecrawl plugin to Grok Bot, sign in on a Firecrawl team with Alexandria enabled, and ask for npm data in plain language. The connection works in every Bot in your Grok Bot account, and you set it up once.

Grok Bot uses npm as an MCP tool through Firecrawl's hosted MCP server, so you don't install or host a separate MCP server for npm.

Grok Bot is xAI's agent app. Plugins give your Bots outside tools, and the Firecrawl plugin adds web search, scraping and every data provider in Firecrawl Alexandria.

How do I connect npm to Grok Bot?

  1. Add the Firecrawl plugin

    In Grok Bot, open Connect apps from the sidebar, find Firecrawl and select Connect. You can also open Firecrawl's plugin listing and select Add to Grok Bot, which opens the desktop app to finish the install.

    Grok Bot's Connect Apps window with Firecrawl and its Connect button
  2. Connect your Firecrawl account

    Grok Bot opens Firecrawl in your browser. Sign in, choose a team with Alexandria enabled, and select Authorize. The screen names Cursor, because the plugin is published on the Cursor Marketplace. No account yet? You can create one for free in the same flow.

    Firecrawl's consent screen for the Grok Bot plugin, with the team picker and Authorize button
  3. Ask your Bot for the data

    In a chat, ask in plain language and mention npm or Firecrawl Alexandria. To make sure the Bot uses Firecrawl, type @ and choose Firecrawl first. For example:

    Use Firecrawl to find the first 10 nondeprecated npm packages matching keywords:cli, with licenses and weekly download counts.

What can Grok Bot do with npm?

npm, the JavaScript package registry: full-text and typeahead package search, package documents with dist-tags and version history, per-version dependencies and tarballs, download counts (totals, daily series, per version), dependents and packages by user or organization.

Grok Bot can run any of npm's 9 capabilities through Alexandria. Each call is billed in Firecrawl credits on your Firecrawl team.

  • Get download range: Daily download counts for one package over a period (`api.npmjs.org/downloads/range/{period}/{name}`): one row per day plus the period total. Costs 5 Firecrawl credits per call.
  • Get downloads: Download counts for one or more packages over a period from npm's downloads API (`api.npmjs.org/downloads/point/{period}/{names}`). Unscoped names are fetched in one bulk request; scoped names (`@scope/name`) one request each, as the API requires. A package the API does not know is reported with null counts when several are asked, and as `not_found` when it is the only one. Costs 5 Firecrawl credits per call.
  • Get package: One package's registry document (`registry.npmjs.org/{name}`): identity, description, license, homepage, repository and bug tracker, keywords, author and maintainers, every dist-tag, the latest version and its publish time, creation and last-modified times, the version count and how many versions are deprecated. Optionally every version with publish time, license and deprecation notice, and the README. Costs 5 Firecrawl credits per call.
  • Get package version: One published version (or dist-tag) of a package from the registry (`registry.npmjs.org/{name}/{version}`): description, license, deprecation notice, entry points, engines, runtime/dev/peer/optional dependencies with their ranges, install-script flag, tarball URL with shasum, integrity, file count and unpacked size, publisher and git commit. Costs 5 Firecrawl credits per call.
  • Get version downloads: Last-week download counts per published version of one package (`api.npmjs.org/versions/{name}/last-week`, the only period npm serves), sorted by downloads descending, with the total. An unknown package is `not_found` (checked against the registry, because the API answers an empty map for both unknown packages and packages with no downloads). Costs 5 Firecrawl credits per call.
  • List dependents: Packages that depend on a package, most recently published first, from npmjs.com's dependents listing (`/browse/depended/{name}?offset=`): 36 per page with latest version, description, publisher, maintainers, dist-tags and publish time. `cursor` is the offset of the next page. An unknown package is `not_found` (checked against the registry, because the listing answers an empty page for both unknown packages and packages without dependents). Served from a public cache of up to 4 hours. Costs 5 Firecrawl credits per call.
  • List owner packages: Packages maintained by a user (`npmjs.com/~{user}`) or owned by an organization (`npmjs.com/org/{org}`): the owner record (type, name, full name or GitHub handle, creation time), the total and one page of 25 packages with latest version, description, publisher, maintainers, dist-tags, publish, creation and update times and npm's high-impact flag. `page` is 0-based; the site's pagination reports whether a next page exists. Served from a public cache of up to 4 hours. Costs 5 Firecrawl credits per call.
  • Search packages: Full-text package search on the npm registry (`registry.npmjs.org/-/v1/search`): every hit with its latest version, description, keywords, license, publisher and maintainers, publish date, links, weekly and monthly downloads, dependents count and npm's quality/popularity/maintenance score. Supports the registry's query qualifiers (`keywords:cli`, `author:sindresorhus`, `scope:types`, `not:deprecated`, `is:unstable`). Pages of `size` hits; `cursor` is the offset of the next page. Costs 5 Firecrawl credits per call.
  • Suggest packages: Typeahead suggestions from npmjs.com (`/search/suggestions?q=`): the handful of packages the site proposes for a prefix, each with latest version, description, publisher, publish date, weekly/monthly downloads and dependents count. Costs 5 Firecrawl credits per call.

What should I ask Grok Bot?

Name npm or Firecrawl Alexandria in the prompt so Grok Bot reaches for it.

  • Use Firecrawl to find the first 10 nondeprecated npm packages matching keywords:cli, with licenses and weekly download counts.
  • Use Firecrawl to show Express’s npm dist-tags, latest version, maintainers and repository link.
  • Use Firecrawl to inspect the latest @types/express package version for Node engine requirements, dependencies and tarball integrity.
  • Use Firecrawl to compare last-week npm download counts for express, fastify and koa.

Troubleshooting

Why doesn't my Bot use npm?

Attach Firecrawl to the chat with @ before you ask, and name npm or Firecrawl Alexandria in the prompt.

Add to Grok Bot doesn't open the app. What should I do?

Install the Grok Bot desktop app first, or open Connect apps in Grok Bot and search for Firecrawl.

Use npm in other AI apps

The same Firecrawl account reaches npm from other AI apps. Pick one for its setup steps:

Other data providers you can connect to Grok Bot

Frequently Asked Questions

What is Firecrawl?

Firecrawl is the web data API to search, scrape and interact with the web at scale. It turns websites into clean, LLM-ready data for AI agents and apps. The Firecrawl plugin brings those tools into Grok Bot, along with every data provider in Firecrawl Alexandria.

What is Firecrawl Alexandria?

Firecrawl Alexandria is Firecrawl's library of 550+ data providers for AI agents, npm among them. Each provider returns structured data through documented capabilities. Grok Bot finds the capability that fits your question and calls it through the Firecrawl plugin, so you don't write any integration code. Alexandria needs a Firecrawl account signed in on a team with Alexandria enabled, or an API key from such a team; keyless connections don't include it.

Is there a npm MCP server for Grok Bot?

Grok Bot reaches npm through Firecrawl's hosted MCP server, which serves npm and every other Alexandria provider as tools. Add the Firecrawl plugin once and you don't install or host a separate MCP server for npm.

What does connecting npm to Grok Bot unlock?

Grok Bot can run all 9 of npm's capabilities, including Get download range, Get downloads and Get package, from any chat, with structured results it can sort, compare and summarize. For example, ask: "Use Firecrawl to find the first 10 nondeprecated npm packages matching keywords:cli, with licenses and weekly download counts." In the same conversation, Grok Bot can combine npm with Firecrawl's web search and scraping and the other providers in Firecrawl Alexandria.

Do I need my own npm account or API key to use it in Grok Bot?

No. Grok Bot calls npm through Firecrawl Alexandria and each call is billed in Firecrawl credits, so you don't need a separate npm account or API key.

How much does it cost to use npm in Grok Bot?

Each npm call costs 5 Firecrawl credits. The capability list on this page shows each price and its unit. The credits come from the Firecrawl team you connect to Grok Bot, and finding the right capability is free.

Can Grok Bot use other providers besides npm?

Yes. The same Firecrawl plugin reaches every provider in Firecrawl Alexandria, along with Firecrawl's web search and scraping, so you connect once.

Can I use npm in other AI apps?

Yes. Connect Firecrawl to ChatGPT, Claude, Cursor, Muse signed in on a Firecrawl team with Alexandria enabled, or use the Firecrawl MCP server, CLI or API with an API key from that team, and the same npm capabilities are available there. Keyless connections don't include Alexandria.

//
Get started
//
Ready to build?
Start getting web context for free and scale seamlessly as your project expands. No credit card needed.
Are you an AI agent? See setup options