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

@clawfetch/langchain

v0.2.0

Published

LangChain.js tools for ClawFetch — pay-per-call web intelligence for AI agents (x402, USDC on Base)

Readme

@clawfetch/langchain

LangChain.js tools for ClawFetch: pay-per-call web fetching, rendering, extraction, research, document parsing and domain checks for AI agents.

Install

npm install @clawfetch/langchain @langchain/core zod

Requires @langchain/core v1 and zod 3.25.76+ or 4.

Quickstart

import { createAgent } from 'langchain';
import { clawfetchTools } from '@clawfetch/langchain';

const agent = createAgent({
  model: 'openai:gpt-5',
  tools: clawfetchTools(), // reads CLAWFETCH_PRIVATE_KEY
});

const result = await agent.invoke({
  messages: [{ role: 'user', content: 'Summarize the top Hacker News story right now.' }],
});

Or bind to any tool-calling chat model:

const model = new ChatOpenAI({ model: 'gpt-5' }).bindTools(clawfetchTools({ privateKey: '0x…' }));

Each tool is also exported as a factory (fetchUrlTool, renderPageTool, extractDataTool, researchTopicTool, parseDocumentTool, enrichCompanyTool, checkDomainsTool, suggestDomainsTool) taking the same options. Tools return the API response as a JSON string.

Options

| Option | Type | Description | |---|---|---| | privateKey | `0x${string}` | Wallet key that pays for calls. Defaults to process.env.CLAWFETCH_PRIVATE_KEY. | | client | ClawFetch | A pre-configured @clawfetch/sdk client (custom base URL, timeouts, retries). Takes precedence over privateKey. | | maxChars | number | Default text limit for fetch_url and render_page. |

Tools and prices

| Tool | Endpoint | Price per call | What it does | |---|---|---|---| | fetch_url | POST /fetch | $0.001 | Fetch a page as readable text | | render_page | POST /render | $0.005 | Render a JS-heavy page in a browser | | extract_data | POST /extract | $0.008 | Structured JSON from 17 site extractors | | research_topic | POST /research | $0.02 | Web search plus top result pages | | parse_document | POST /parse | $0.005 | Document (pdf, docx, xlsx, …) to Markdown | | enrich_company | POST /company | $0.02 | Company profile from a domain: socials, emails, tech stack, key pages | | check_domains | POST /domains/check | $0.003 | Domain availability (WHOIS) | | suggest_domains | POST /domains/suggest | $0.003 | Domain ideas from keywords, checked |

Prices are in USDC and charged only when a tool runs. The model sees each price in the tool description.

Wallet

ClawFetch has no API keys and no accounts. Each call is paid with an x402 micropayment in USDC on Base, signed by your wallet. You need:

  • a Base wallet private key (0x…), passed as privateKey or set as CLAWFETCH_PRIVATE_KEY
  • some USDC on Base in that wallet

Payments are gasless signed authorizations, so the wallet needs no ETH. Use a dedicated wallet holding only the USDC you are willing to spend, and keep the key out of source control.

License

MIT