# Use gofetch from Claude, Cursor and Grok Bot

gofetch turns a public web page into JSON fields for AI agents. You pay per call in USDC on Base with x402 v2. There's no account and no API key.

> **Static HTML only.** gofetch does not run JavaScript. Sites that build their pages in the browser (most big retailers) or sit behind a bot check fail: extract returns `ok:false` with `error: "needs_js"` or `error: "blocked"`, and you are **not charged**.

| Route | Price | What you get |
|---|---|---|
| `POST https://getgofetch.dev/v1/extract` | $0.01, charged only when `ok` is true | Body `{url, schema}`, where `schema` is a JSON Schema (up to 20 properties). Returns `{ok, data, field_sources}`. If a required field is missing you get `ok:false`, `missing[]`, `partial{}` and no charge. JS-only pages give `needs_js`, bot walls give `blocked`, also free. |
| `GET https://getgofetch.dev/v1/fees/base-exact` | $0.005 | PayAI's current fee to settle one x402 payment on Base, as JSON. For x402 developers budgeting fees; you don't need it to use extract. |
| `GET https://getgofetch.dev/fetch?url=https://example.com` | free | Demo only (example.com). |

Legacy: `GET https://getgofetch.dev/v1/fetch?url=<page>` (page as markdown, $0.01 per call, HTTP only) is being retired; use extract.

Limits: static HTML only, no JavaScript rendering, no paywall or login bypass.
Machine-readable docs: `https://getgofetch.dev/openapi.json`, `https://getgofetch.dev/.well-known/x402`, `https://getgofetch.dev/llms.txt`.

Your agent needs an **x402-capable wallet tool**. Claude, Cursor and Grok Bot can't pay HTTP 402 on their own. Pick one of the options below and fund it with a few dollars of USDC on Base.

Example extract body (used below), the Reserve Bank of Australia's cash-rate page:

```json
{"url":"https://www.rba.gov.au/statistics/cash-rate/",
 "schema":{"type":"object","properties":{"cash_rate_target":{"type":"number","description":"current cash rate target, percent"},"effective_date":{"type":"string","description":"date the current target took effect"}},"required":["cash_rate_target"]}}
```

Result `data` (24 Oct 2026): `{"cash_rate_target":4.6,"effective_date":"2026-09-30"}`

---

## Option A: AgentCash (Claude Code, Claude Desktop, Cursor, Codex, any CLI agent)

AgentCash is a free MCP server and CLI with a local USDC wallet (`~/.agentcash/wallet.json`). It reads gofetch's OpenAPI and pays the 402 for you.

Install:

- **Claude Code:** `claude mcp add agentcash --scope user -- npx -y agentcash@latest`
- **Cursor:** add this to `~/.cursor/mcp.json` (or `.cursor/mcp.json`):
  ```json
  {"mcpServers":{"agentcash":{"command":"npx","args":["-y","agentcash@latest"]}}}
  ```
- **Claude Desktop:** use the bundle at https://agentcash.dev/install/claude, or run `npx agentcash install --client claude`.
- **Guided setup for any client:** `npx agentcash install --client cursor` (also `claude-code`, `claude`, `codex`, …)

Fund the wallet: ask the agent for "my AgentCash deposit address" and send a few dollars of USDC on Base to it.

Then ask your agent:

> Use AgentCash to call gofetch at https://getgofetch.dev/v1/extract (check the schema first) to get the current cash rate target and its effective date from https://www.rba.gov.au/statistics/cash-rate/

Give the URL explicitly. gofetch is listed on x402scan, and calling it by URL always works, even if a search doesn't surface it.

The same thing from a terminal (any agent with a shell):

```bash
npx agentcash check https://getgofetch.dev/v1/extract          # free: schema + price
npx agentcash fetch https://getgofetch.dev/v1/extract -m POST \
  -H "Content-Type: application/json" \
  -b '{"url":"https://www.rba.gov.au/statistics/cash-rate/","schema":{"type":"object","properties":{"cash_rate_target":{"type":"number"},"effective_date":{"type":"string"}},"required":["cash_rate_target"]}}'
```

## Option B: Grok Bot + MetaMask Agent Wallet

Grok Bot agents run on their own Linux computer. They can install the **MetaMask Agent Wallet** plugin from Grok Bot's plugin catalog (Connect apps / Plugins). Its skill includes an x402 helper that signs with your MetaMask agent wallet, and it asks you to approve each payment before it pays.

Tell your Bot:

> Install the MetaMask Agent Wallet plugin, then use its x402 helper to inspect and pay https://getgofetch.dev/v1/extract with this body: {…example body above…}. Show me the price first.

Under the hood the Bot runs `x402_pay.py inspect` (free, shows `$0.01 USDC on Base`), then `x402_pay.py pay … --confirm` after you approve. gofetch's offer (x402 v2, `exact`, EIP-3009 USDC on Base) is marked **eligible** by that helper.

Notes:
- Payment windows are 60 seconds. Approve promptly or the Bot will re-quote.
- The Link wallet in Grok Bot pays with cards, not x402. It won't pay gofetch.
- AgentCash (Option A) also works on the Bot's computer: ask the Bot to run the `npx agentcash` commands above.

## Option C: Coinbase Payments MCP (Claude Desktop/Code, Codex, Gemini; Cursor manual)

`npx @coinbase/payments-mcp` installs Coinbase's payments MCP. It uses an email-login wallet with spend limits. Its `make_x402_request` tool can call any x402 URL, including gofetch, if you give it the URL. gofetch won't appear in its Bazaar search, because gofetch settles through the PayAI facilitator. (We haven't tested a paid call through this route yet.)

## No crypto? Top up by card

You don't need to own crypto already. Buy a few dollars of **USDC on the Base network** by card and send it to your agent's wallet address (the AgentCash deposit address, or your MetaMask agent wallet address). Then pay gofetch through x402 as usual. Some ways to do it:

- **MetaMask:** the built-in Buy button takes cards, Apple Pay and Google Pay through providers such as Transak and MoonPay. See [MetaMask: how to buy crypto](https://support.metamask.io/manage-crypto/move-crypto/buy/how-to-buy-crypto-in-metamask/).
- **Coinbase Onramp:** built into many wallets and apps. Coinbase says buying USDC on Base through it is free. See [Coinbase Onramp](https://www.coinbase.com/developer-platform/products/onramp).
- **Stripe crypto onramp (Link):** buy by card or bank at [crypto.link.com](https://crypto.link.com) (Stripe's hosted onramp; see [Stripe docs](https://docs.stripe.com/crypto/onramp)).

Choose USDC and the Base network, and paste your agent wallet's address as the destination. Availability, ID checks and fees depend on the provider and your country. gofetch never takes cards itself: every call is paid in USDC through x402.

---

## Why it's safe to try

- Unpaid requests always get HTTP 402 with the price. Nothing is charged until your wallet signs.
- Extract charges only when it returns `ok:true` with your required fields. `needs_js`, `blocked` and other `ok:false` results are free.
- Payments go to `0x714F69Aef602c76543AdED914Ea4Eb23fE9F8527` on Base (eip155:8453), via the facilitator `https://facilitator.payai.network`.

Questions: hello@getgofetch.dev
