npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mrscraper/ai-sdk

v0.2.0

Published

MrScraper tools for the Vercel AI SDK: retrieve public web pages as Markdown, HTML, or screenshots, search the web, and check account usage.

Readme

MrScraper tools for the AI SDK

MrScraper tools for the Vercel AI SDK: retrieve public web pages as Markdown, HTML, or screenshots, search the web, and check your MrScraper plan and token usage.

Install

npm install @mrscraper/ai-sdk ai zod

Requires AI SDK 7 and Node.js 18 or later. Get an API key at app.mrscraper.com/api-tokens and set it as MRSCRAPER_API_KEY (or pass apiKey to the tool factories).

Use

import { generateText, isStepCount } from "ai";
import { mrscraperTools } from "@mrscraper/ai-sdk";

const { text } = await generateText({
  model: "openai/gpt-5",
  prompt:
    "Read https://www.scrapethissite.com/pages/simple/ and list the five countries with the largest area.",
  tools: mrscraperTools(),
  stopWhen: isStepCount(5),
});

console.log(text);

Pick individual tools when you only need some of them:

import { scraperApiTool, webSearchTool } from "@mrscraper/ai-sdk";

const tools = {
  scraperAPI: scraperApiTool({ apiKey: process.env.MRSCRAPER_API_KEY }),
  webSearch: webSearchTool(),
};

Tools

| Tool | Factory | What it does | | --- | --- | --- | | scraperAPI | scraperApiTool() | Retrieves a known public page as Markdown (default), HTML, a screenshot, or a combination. Renders JavaScript-heavy pages in a browser when needed. Inputs: url, formats, browserRendering, waitForSelector, geoCode, timeout. | | webSearch | webSearchTool() | Searches the web and returns ranked results (rank, title, link, description, source). Inputs: query (text or a search results URL), region (two-letter country, default us), numResults (10 to 100, default 10). | | status | accountStatusTool() | Returns the subscription status, token limit, tokens used, and tokens remaining. Uses no tokens. |

scraperAPI sends screenshots to the model as image parts instead of base64 text, so a screenshot costs image tokens rather than hundreds of thousands of text tokens. Other results are sent as JSON.

scraperAPI and webSearch use tokens from your MrScraper plan. Errors from the API (for example an invalid key) are thrown from the tool and reported to the model as tool errors; the key never appears in the error.

Data and permissions

The tools send target URLs, search queries, and request options to MrScraper's API. Use them only for public or otherwise authorized content, and follow the target site's terms. See the Privacy Policy and Acceptable Use Policy.

Links

  • Documentation: https://docs.mrscraper.com/docs/integrations/vercel-ai-sdk
  • MrScraper MCP server (for MCP clients): https://github.com/mrscraper-com/mrscraper-mcp
  • Support: [email protected]

License

MIT