api2ls.com — Pay-Per-Call APIs for AI Agents

Utility APIs built for autonomous agents and agentic workflows. Pay from $0.01 per call on-chain via the x402 protocol on Base or Solana — no accounts, no API keys, no subscriptions. Discoverable via the x402 Bazaar at https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources.

GET /api/readability
Extract clean readable content and markdown from any webpage URL.
Query Parameters
Name Type Required Description
url string required The webpage URL to extract readable content from (https:// prefix optional)
Response (200 OK)
{ "success": true, "url": "https://example.com", "title": "Example Domain", "lang": "en", "markdown": "# Example Domain\n\nExample content in markdown format..." }
Example Request
GET /api/readability?url=https://example.com
POST /api/svg2png
Convert an SVG document to a PNG raster image.
Request Body

Option 1: Raw SVG body

Send the SVG as the request body with Content-Type: image/svg+xml or text/plain. Max 256KB.

Option 2: JSON with base64

{ "svgBase64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" }
Query Parameters
Name Type Description
width integer Output width in pixels. Max 2048. Default: 1024
height integer Output height in pixels. Max 2048
scale number Scale factor. Max 2
zoom number Alias for scale. Max 2
Response (200 OK)

Returns PNG image with Content-Type: image/png

Example Request
POST /api/svg2png?width=1024 Content-Type: application/json { "svgBase64": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==", "width": 512 }
POST /api/json2excel
Convert a JSON array of objects to an Excel (.xlsx) spreadsheet.
Request Body

Option 1: With metadata

{ "data": [ { "name": "John", "age": 30, "city": "New York" }, { "name": "Jane", "age": 25, "city": "London" } ], "filename": "export.xlsx", "sheetName": "Sheet1" }

Option 2: Direct array

[ { "name": "John", "age": 30 }, { "name": "Jane", "age": 25 } ]
Field Type Required Description
data object/array required Object or array of objects to convert. Max 10,000 rows, 100 columns
filename string optional Output filename. Default: "export.xlsx"
sheetName string optional Sheet name in Excel. Default: "Sheet1"
Limits
  • Max request size: 512KB
  • Max rows: 10,000
  • Max columns: 100
  • Nested objects are converted to JSON strings
Response (200 OK)

Returns Excel file with Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

File is automatically downloaded with the specified filename

Example Request
POST /api/json2excel Content-Type: application/json { "data": [ { "product": "Laptop", "price": 999, "stock": 15 }, { "product": "Mouse", "price": 25, "stock": 100 } ], "filename": "inventory.xlsx", "sheetName": "Products" }
POST /api/render
Render any URL in a real headless browser (full JavaScript execution) and return a screenshot (PNG), PDF, or the fully-rendered HTML/markdown.
Request Body (JSON)
Field Type Required Description
url string required The URL to render in a headless browser (https:// prefix optional)
format string optional Output format: png (default), pdf, html, or markdown
fullPage boolean optional For png: capture the full scroll height instead of just the viewport
width number optional Viewport width in pixels (default 1280, max 3840)
height number optional Viewport height in pixels (default 800, max 3840)
waitUntil string optional Navigation wait condition: load, domcontentloaded, networkidle0, or networkidle2 (default)
timeout number optional Navigation timeout in milliseconds (max 30000)
Response (200 OK)

Returns PNG image with Content-Type: image/png

GET /api/price
Live spot price(s) for crypto/asset pairs (real-time market data beyond a model's training cutoff). Supports batch lookups.
Query Parameters
Name Type Required Description
pairs string Comma-separated batch of pairs, e.g. BTC-USD,ETH-USD (max 25; returns all in one call)
pair string Single asset pair, e.g. BTC-USD
symbol string Asset symbol, e.g. ETH (used with currency)
currency string Quote currency, e.g. USD (default USD)
Response (200 OK)
{ "success": true, "pair": "BTC-USD", "base": "BTC", "currency": "USD", "amount": "64235.18", "asOf": "2026-06-17T09:30:00.000Z" }
GET /api/fx
Live fiat FX rates (ECB reference data) with optional amount conversion — fresh rates beyond a model's training cutoff.
Query Parameters
Name Type Required Description
to string required Target currency code(s), comma-separated, e.g. EUR,GBP
from string Base currency code (default USD)
amount number Amount to convert (default 1)
Response (200 OK)
{ "success": true, "base": "USD", "amount": 100, "date": "2026-06-16", "rates": { "EUR": 0.92 }, "converted": { "EUR": 92 }, "asOf": "2026-06-17T09:30:00.000Z" }
GET /api/gas
Live EVM gas pricing — EIP-1559 breakdown (base/priority/max fee) plus estimated USD cost for transfers and swaps, across multiple chains in one call.
Query Parameters
Name Type Required Description
chain string EVM network: base (default), ethereum, optimism, arbitrum, or polygon
chains string Comma-separated list of chains (max 5) to compare in one call
Response (200 OK)
{ "success": true, "chain": "base", "nativeToken": "ETH", "nativeUsd": 3500, "gasPriceGwei": 1.5, "baseFeeGwei": 1.2, "priorityFeeGwei": 0.3, "maxFeeGwei": 2.7, "costEstimates": { "transfer": { "gasUnits": 21000, "nativeAmount": "0.0000315", "usd": 0.1103 } }, "asOf": "2026-06-17T09:30:00.000Z" }
GET /api/token-price
Live USD price of any ERC-20 token from on-chain DEX liquidity — covers Base/EVM tokens not listed on centralized exchanges, which a model cannot know.
Query Parameters
Name Type Required Description
address string required ERC-20 token contract address (0x…)
chain string EVM network: base (default), ethereum, optimism, arbitrum, or polygon
Response (200 OK)
{ "success": true, "chain": "base", "address": "0x4200000000000000000000000000000000000006", "symbol": "WETH", "name": "Wrapped Ether", "priceUsd": "3502.11", "dex": "uniswap", "liquidityUsd": 1820000, "asOf": "2026-06-17T09:30:00.000Z" }
GET /api/balance
Live on-chain balance (native coin or ERC-20) for an address — real-time chain state a model cannot read at inference time.
Query Parameters
Name Type Required Description
address string required Account address to check (0x…)
chain string EVM network: base (default), ethereum, optimism, arbitrum, or polygon
token string Optional ERC-20 contract address; omit for the native coin balance
Response (200 OK)
{ "success": true, "chain": "base", "address": "0x0000000000000000000000000000000000000000", "asset": "ETH", "balanceRaw": "1500000000000000000", "balance": "1.5", "decimals": 18, "asOf": "2026-06-17T09:30:00.000Z" }
GET /api/block
Current block height, timestamp, and base fee for an EVM chain — real-time chain state a model cannot know from training.
Query Parameters
Name Type Required Description
chain string EVM network: base (default), ethereum, optimism, arbitrum, or polygon
Response (200 OK)
{ "success": true, "chain": "base", "blockNumber": 18250431, "timestamp": 1781000000, "timestampIso": "2026-06-17T09:30:00.000Z", "baseFeeGwei": 1.2, "gasUsed": 12000000, "gasLimit": 30000000, "asOf": "2026-06-17T09:30:00.000Z" }