Skip to content

Repository files navigation

Agent Web Tools

10+ AI agent micro-services — pay-per-use via USDC on Base L2.

No API keys. No accounts. No subscriptions. Every endpoint costs a fraction of a cent to a few cents.

npm install agent-web-tools

Quick Start

import { AgentWebTools } from "agent-web-tools";

const tools = new AgentWebTools(); // defaults to public x402 gateway

// Free: check available services
const health = await tools.health();
console.log(health.services);
// → [{ endpoint: "/v1/url-to-markdown", priceUsdc: 0.01 }, ...]

Paid Usage

Send USDC to the operator wallet on Base L2, then attach the tx hash:

tools.setPayment(JSON.stringify({ txHash: "0x..." }));

const result = await tools.urlToMarkdown("https://example.com");
console.log(result.data.markdown);

API

Method Endpoint Price Description
tools.urlToMarkdown(url) POST /v1/url-to-markdown $0.01 Webpage to clean markdown
tools.pdfToText(pdfUrl) POST /v1/pdf-to-text $0.01 PDF to plain text
tools.extractJson(text, schema?) POST /v1/json-extract $0.03 Structured JSON via LLM
tools.dnsLookup(domain) POST /v1/dns-lookup $0.005 DNS A/AAAA/MX/TXT/NS
tools.deepResearch(urls[]) POST /v1/deep-research $0.50 Multi-URL research report
tools.competitiveIntel(domain) POST /v1/competitive-intel $1.00 Tech stack + SEO + DNS
tools.fullSiteAudit(url) POST /v1/full-site-audit $2.00 Crawl + SEO audit report
tools.bulkExtract(urls[]) POST /v1/bulk-extract $1.00 Batch extract up to 50 URLs
tools.tokenPrice(token) POST /v1/token-price $0.01 Token price + 24h change
tools.gasPrice() POST /v1/gas-price $0.005 Base L2 gas price oracle

Custom Server

const tools = new AgentWebTools({
  baseUrl: "https://your-own-x402-server.com",
});

How Payment Works (x402 Protocol)

  1. Send USDC on Base L2 to the operator wallet listed in /v1/health
  2. Get the transaction hash from the blockchain
  3. Call any endpoint with X-Payment: {"txHash": "0x..."} header
  4. Server verifies the transaction on-chain and returns your data

Built on the x402 micropayment protocol.

About

10 micro-services for AI agents - web scraping, research, DNS, on-chain data. Pay-per-use via x402 USDC micropayments on Base L2. No API keys needed.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages