# Lantern Token Data API Base URL: https://lanternswap.com Human pricing: https://lanternswap.com/pricing OpenAPI: https://lanternswap.com/openapi.json x402 discovery catalog: https://lanternswap.com/discovery/resources Payments: x402 protocol version 2 (https://docs.x402.org) Status: payments enabled This API sells per-request Solana token safety and market reports to AI agents for USDC. The Lantern trading UI on this host is separate and stays free. ## MCP server (recommended for agents) Remote MCP, Streamable HTTP, no API key: https://lanternswap.com/mcp Attach it as {"mcpServers":{"lanternswap":{"url":"https://lanternswap.com/mcp"}}} A2A agent card: https://lanternswap.com/.well-known/agent-card.json Tools: token_report, token_report_batch (x402-paid like the REST routes, same free tier), token_search, solana_swap_quote, solana_swap_build (UNSIGNED transaction with the app fee included; your own wallet signs), solana_send_transaction, solana_tx_status, base_swap_quote (answers status "coming_soon" while Base trading is off), polymarket_markets, polymarket_market (read-only). Paying over MCP follows the x402 MCP transport: an unpaid call past the free tier returns a tool result with isError=true and the PaymentRequired object in structuredContent; call again with the signed PaymentPayload in params._meta["x402/payment"]; the settlement is in result._meta["x402/payment-response"]. Rate limits, the region block and sanctions screening apply exactly as on REST. Never send keys. ## Authentication No API key. When payments are enabled, unpaid calls (after a small free tier) receive HTTP 402 with a PAYMENT-REQUIRED header (Base64 JSON, x402 v2). Retry the same request with a PAYMENT-SIGNATURE header. Successful responses include PAYMENT-RESPONSE. Accepted assets when enabled: - Solana mainnet USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v), network solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, scheme exact - Base mainnet USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), network eip155:8453, scheme exact (only if a Base receiving address is configured) ## Free tier 5 unpaid calls per UTC day per client (IPv4 address, or IPv6 /48 network). Cloudflare WARP and other exits in 2a09:bac0::/29 share one allowance. At most 2000 unpaid calls per UTC day across all clients. After that, payment is required. Remaining free calls are reported in the x-free-requests-remaining response header. ## Limits and errors - 429 Too Many Requests with a Retry-After header: more than 30 paid-route requests a minute from one client. - 503 with Retry-After: the upstream data source is busy; retry after the given seconds. - 400: malformed mint address or ids. 409: the same payment is already being processed. - 451: not available in your region. 502: upstream data source failed. ## Prices (USDC) - GET /v1/token/{mint} — 0.002 USDC (2000 base units). Token safety + market report ($0.002) - GET /v1/tokens/batch?ids={mint,mint} — 0.01 USDC (10000 base units). Batch report, up to 50 mints ($0.01) ## Endpoints GET /v1/token/{mint} Path parameter mint: Solana mint address (base58, 32-44 chars, decodes to 32 bytes). Returns a JSON token report: symbol, name, priceUsd, liquidityUsd, marketCapUsd, holderCount, organicScore, verified, riskScore (0-100), riskLabel (low|medium|high|unknown), flags[], sources, asOf. Scores are automated heuristics, not advice. GET /v1/paid/token/{mint} Identical report and price, but with no free tier: an unpaid request always returns HTTP 402. Use it when you want to pay straight away, or to probe the payment terms. HEAD on this route (and on /v1/token/{mint} and /v1/tokens/batch) also returns 402 with PAYMENT-REQUIRED and never consumes a free call. The paywall runs before mint or query validation. GET /v1/tokens/batch?ids={mint,mint} Query ids: 1-50 comma-separated mint addresses. Returns an array of the same report objects. GET /.well-known/x402 Compatibility resource list for x402scan (concrete example URLs). Prefer /openapi.json. GET /health Liveness. JSON: ok, feesEnabled, feeBps, x402 (payments on), base (Base trading on). POST /mcp Remote MCP server (JSON-RPC over Streamable HTTP). See "MCP server" above. GET /.well-known/agent-card.json A2A agent card listing skills and the MCP interface. Free. GET /pricing, GET /openapi.json, GET /llms.txt, GET /discovery/resources, GET /.well-known/x402 Documentation and discovery. Free. ## Example GET https://lanternswap.com/v1/token/DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 # 200 application/json while free calls remain (see x-free-requests-remaining), then 402 with # PAYMENT-REQUIRED; retry with PAYMENT-SIGNATURE to get 200 plus PAYMENT-RESPONSE