Skip to content
APIStead

Developer quickstart

Connect an agent in minutes.

Discovery is free. Payment happens on the provider's own x402 route. You need a USDC wallet on Base, an x402-capable client, and one URL.

1. Connect over MCP

Add the server to Claude Desktop, Cursor, Continue or any MCP-compatible client. The endpoint is stateless Streamable HTTP and requires no authentication for discovery. See the MCP server guide for client configuration and a curl test.

claude desktop / cursor
{
  "mcpServers": {
    "apistead": {
      "url": "https://apistead.qd.je/mcp"
    }
  }
}

The server exposes search_apis, list_apis, list_bundles, get_api, get_routes, get_receipt, check_reliability and submit_listing. Discovery never costs anything and never returns a 402.

2. Route lifecycle

Draft and testing routes bypass x402 so they can be built and checked. Live routes return a payment challenge and are the only routes in the public catalogue. Paused routes return 503. Uptime comes from scheduled health checks, not from the verification badge.

3. Discover over HTTP

Agents that do not speak MCP can use the same catalogue over plain HTTP. Every response is JSON with a stable shape.

MethodEndpoint
POST/mcp
GET/agent/search?q=
GET/agent/list
GET/agent/get?id=
GET/agent/routes?id=
GET/agent/receipts
GET/receipts
GET/bundles
GET/openapi.json
GET/llms.txt
GET/llms-full.txt
GET/skill

4. First-party APIs

APIStead Labs is the first provider in the catalogue. Every listed first-party route is live under /api/v1 and returns an x402 challenge. The listing states the active network and price.

APIRoute
US ZIP Code API/us-zip/{zip}
IP Geolocation API/ip/{ip}
Geocoding & Reverse Geocoding API/geocode?address={address}
Coordinates & Distance API/distance?from={lat},{lon}&to={lat},{lon}
Email Verification API/email/verify
Sanctions & PEP Screening API/sanctions/screen
US Building Permits API/permits?city={city}&query={query}
Global Weather API/weather/current?lat={lat}&lon={lon}
Spotify API for AI Agents/spotify/playlist
Spotify API v2 for AI Agents/spotify/search

5. Read the 402

Call a provider endpoint without payment. The unpaid response tells you the price, network, token and wallet before anything moves.

unpaid request
curl -i "https://apistead.qd.je/api/v1/weather/current?lat=52.52&lon=13.405"

# HTTP/2 402
# payment-required: eyJ4NDAyVmVyc2lvbiI6IDIsIC...
# { "x402Version": 2, "accepts": [{ "scheme": "exact",
#   "network": "eip155:8453", "asset": "USDC",
#   "amount": "1000", "payTo": "0x..." }] }

6. Pay with an x402 client

The official client libraries handle the 402 → sign → retry loop. The example below is illustrative; check docs.x402.org for the current package names and version.

typescript
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();

client.register("eip155:8453", new ExactEvmScheme(account));

const paidFetch = wrapFetchWithPayment(fetch, client);
const res = await paidFetch("https://apistead.qd.je/api/v1/weather/current?lat=52.52&lon=13.405");

console.log(await res.json());
python
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

account = Account.from_key("0x...")
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(account))

async with x402HttpxClient(client) as http:
    response = await http.get("https://apistead.qd.je/api/v1/weather/current?lat=52.52&lon=13.405")
    print(response.json())

7. Spend safety

x402 payments are final. Treat an agent wallet like a corporate card with a limit:

  • Use a dedicated wallet with a small USDC balance.
  • Set a per-call cap and a daily cap in your agent.
  • Allowlist providers and networks.
  • Log every 402 and every receipt.
  • Start with settlement-verified listings.
  • Handle settlement_pending by reconciling the tx hash, not by retrying blindly.

MCP tool surface

ToolWhat it does
search_apisFree-text search across the catalogue.
list_bundlesOutcome-oriented workflows with a route sequence and prompt.
list_apisBrowse by category, network and verification state.
get_apiFull listing: routes, prices, networks, receipts, reliability.
get_routesMethod, path, input schema, output schema, example.
get_receiptOn-chain verification receipt for a verified route.
check_reliabilityScore, band, uptime and last check.
submit_listingSubmit a paid route for review. Free.

Payments and wallets

x402 pays USDC directly to the provider's payTo wallet on Base. APIStead never holds the funds. x402 with USDC on Base is the only payment rail; there is no card checkout or subscription billing.

Read the payments and wallets guide

Every listed first-party route is live and x402-gated. Verified routes link to a public settlement receipt. The 402 challenge on the provider route is the authoritative price quote.

Next: pick an API

Start with a ZIP code, sanctions or compliance call.

Browse the catalogue