Coin search
GET /api/coin-searchResolve a name or ticker to coin ids: full-text search returning matching coins (id, symbol, name, market cap rank, ordered by rank), exchanges (id, name, market type) and categories (id, name), plus NFT collections. Send GET /api/coin-search with the required field query and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, cached, query, counts and 5 more.
`limit` per group 1-50 (default 10). The id resolver for every other coin tool: an agent holding "PEPE" or "render" gets the canonical id here before calling coin-profile, coin-ohlc or coin-history. Cached in-process for 5 minutes. Data provided by CoinGecko (https://www.coingecko.com/en/api).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Name, symbol or fragment, 1-64 chars (e.g. "usdc", "render", "pepe"). Also accepted as q, search, term, keyword, question. |
limit | number | no | Max results per group, 1-50 (default 10). |
Example request
curl -i "https://agent402.tools/api/coin-search?query=usdc&limit=5"
Without payment this returns HTTP 402 Payment Required with the exact price for coin-search; any x402 v2 or MPP client pays it and retries.
Watch a call get paid
GET /api/coin-search$0.005 USDCPAYMENT-SIGNATUREon 14 chains200 OKAgent402-ReceiptEd25519Example response
{
"source": "coingecko",
"fetchedAt": "2026-08-22T13:20:00.000Z",
"cached": false,
"query": "usdc",
"counts": {
"coins": 5,
"exchanges": 0,
"categories": 1,
"nfts": 0
},
"coins": [
{
"id": "usd-coin",
"symbol": "USDC",
"name": "USDC",
"rank": 6
}
],
"exchanges": [],
"categories": [
{
"id": "usdc-stablecoins",
"name": "USDC Stablecoins"
}
],
"nfts": [],
"credit": "Data provided by CoinGecko (https://www.coingecko.com/en/api)."
}| Field | Type | Always present | In the example |
|---|---|---|---|
source | string | yes | coingecko |
fetchedAt | string | yes | 2026-08-22T13:20:00.000Z |
cached | boolean | yes | false |
query | string | yes | usdc |
counts | object | yes | 4 fields: coins, exchanges, categories, nfts |
coins | array of objects | yes | 1 item in the example |
exchanges | array | yes | 0 items in the example |
categories | array of objects | yes | 1 item in the example |
nfts | array | yes | 0 items in the example |
credit | string | yes | Data provided by CoinGecko (https://www.coingecko.com/en/api). |
From an MCP client
catalog.call {
"slug": "coin-search",
"params": {
"query": "usdc",
"limit": 5
}
}The hosted connector at https://agent402.tools/mcp needs a payment for coin-search; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.14.0.
Errors and behavior
queryis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
POSTwith a JSON body to /api/coin-search is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.005" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/coin-search?query=usdc&limit=5");Related tools
Crypto categories by market cap
Coin categories (Layer 1, Meme, AI, DeFi, Stablecoins, RWA, ...) ranked by market cap, with 24h market cap change %, 24h.
Crypto exchanges
Crypto exchanges ranked by trust score: id, name, country, year established, trust score (1-10) and rank, 24h volume.
Known-address label lookup
Label a known EVM address from a curated, committed dataset: major stablecoin + token contracts (the USDC and USDG.
Wallet token transfers (filtered)
Recent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first.
Block info
Header-level detail for one block on Ethereum, Base, Polygon, Arbitrum, or Optimism: hash, timestamp (unix + ISO).
Latest block number
The latest block number on Ethereum, Base, Polygon, Arbitrum, or Optimism: returns network, blockNumber (integer).