# GET /x402/check: $0.002 per call

Live health check of any x402 endpoint before you pay it: is it up and answering 402, is the payment request valid, prices in USD per network, pay-to wallets, x402 version, Bazaar discovery metadata, response time, and its buyers in the Bazaar. Never pays the endpoint. Pass ?url=https://api.example.com/paid&method=GET.

- **Price:** $0.002 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** yes, 20 free calls a day from Claude, Cursor or any MCP client ([set-up](/mcp/setup)).
- **Tier:** live
- **Answers cached for:** not cached
- **Data sources:** the endpoint itself (live probe); our Bazaar snapshot
- **Lane:** x402 market guide ([OpenAPI](/openapi/x402-guide.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/x402-check](/sample/x402-check). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/x402-check"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i "https://aayatai.com/x402/check?url=https%3A%2F%2Faayatai.com%2Fdns"
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/x402/check?url=https%3A%2F%2Faayatai.com%2Fdns");
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("x402-check", {"url":"https://aayatai.com/dns"});
```

## Inputs

- `url` **(required)** (string): The x402 endpoint to check.
- `method` (string; one of `GET`, `POST`; default `GET`): How the endpoint is called.

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

```json
{
  "url": "https://aayatai.com/dns",
  "up": true,
  "status": 402,
  "latencyMs": 180,
  "x402": {
    "valid": true,
    "version": 2,
    "from": "PAYMENT-REQUIRED header",
    "description": "DNS lookup for any domain",
    "bazaarDiscovery": true,
    "problems": []
  },
  "prices": [
    {
      "network": "eip155:8453",
      "scheme": "exact",
      "amount": "1000",
      "priceUsd": 0.001,
      "asset": "0x8335...",
      "payTo": "0xabc..."
    }
  ],
  "catalogue": {
    "listed": true,
    "buyers30d": 40,
    "calls30d": 900,
    "lastCalledAt": "2026-09-28T10:00:00Z"
  },
  "checkedAt": "2026-09-28T12:00:00Z"
}
```

## Related

- [GET /tools/find](/services/find-best-tool) ($0.002): Find the best tool for a job.
- [GET /x402/find](/services/x402-find) ($0.002): Describe a job in plain English and get the best working x402 services for it, ranked: fit, real buyers (30 days), our uptime and speed checks, and price, with 
- [GET /x402/find/live](/services/x402-find-live) ($0.01): Like /x402/find, but the shortlist is re-checked right now: we send each top candidate one unpaid request and keep only those answering with a valid x402 price 
- [GET /x402/recommend](/services/x402-recommend) ($0.03): Describe a job and get the best x402 services to do it: we search the whole Bazaar catalogue, then an AI compares the candidates on real buyer numbers, recent u
- [GET /x402/trends](/services/x402-trends) ($0.01): What's growing in the x402 economy: services with the biggest rise in unique buyers over the last N days, from our own daily history of the Bazaar catalogue (hi

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).