{"openapi":"3.1.0","info":{"title":"RugRadar API","version":"1.0.0","summary":"Solana token rug and scam risk checks for apps and AI agents.","description":"Read-only Solana token risk checks. Never requires a wallet connection, signature, private key or seed phrase. Automated risk signals, not financial advice. Agents can also use the remote MCP server at https://rugradar-bgcm.onrender.com/mcp. Pro ($9 per 30 days, USDC or SOL on Solana) can be bought by an agent: GET /api/pro/quote, pay with the reference attached, POST /api/pro/verify.","contact":{"name":"RugRadar","url":"https://rugradar-bgcm.onrender.com/agents"}},"servers":[{"url":"https://rugradar-bgcm.onrender.com"}],"externalDocs":{"description":"Agent setup (MCP, curl, payment flow)","url":"https://rugradar-bgcm.onrender.com/agents"},"tags":[{"name":"checks"},{"name":"pro","description":"Buying and checking Pro keys"},{"name":"meta"},{"name":"mcp"}],"paths":{"/api/check":{"get":{"operationId":"checkToken","summary":"Rug-risk check for a Solana token","tags":["checks"],"security":[{},{"bearer":[]},{"apiKey":[]}],"description":"0-100 risk score (0-29 low risk, 30-59 caution, 60-100 high risk), red flags, facts and dump-model probability. Free: 5/day per IP; Pro: unlimited. Automated risk signals, not financial advice.","parameters":[{"name":"q","in":"query","required":true,"description":"Mint address, pump fun / DexScreener link, or $TICKER","schema":{"type":"string"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"x402 v2 PaymentPayload (base64 JSON) with a partially signed Solana USDC transfer. Settles a Pro purchase and serves this request as Pro.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenReport"}}}},"400":{"description":"Missing q","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Free daily limit reached. Body carries a Pro quote (USDC/SOL amount, pay address, reference, order token, verify URL). When x402 is available the PAYMENT-REQUIRED header carries an x402 v2 PaymentRequired object (base64 JSON); retry with a PAYMENT-SIGNATURE header to pay and get the result plus a Pro key.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 PaymentRequired, base64 JSON (only when x402 is available)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired402"}}}},"422":{"description":"Not a token / could not resolve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"checkTokenPost","summary":"Rug-risk check for a Solana token","tags":["checks"],"security":[{},{"bearer":[]},{"apiKey":[]}],"description":"0-100 risk score (0-29 low risk, 30-59 caution, 60-100 high risk), red flags, facts and dump-model probability. Free: 5/day per IP; Pro: unlimited. Automated risk signals, not financial advice.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"x402 v2 PaymentPayload (base64 JSON) with a partially signed Solana USDC transfer. Settles a Pro purchase and serves this request as Pro.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["q"],"properties":{"q":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenReport"}}}},"400":{"description":"Missing q","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Free daily limit reached. Body carries a Pro quote (USDC/SOL amount, pay address, reference, order token, verify URL). When x402 is available the PAYMENT-REQUIRED header carries an x402 v2 PaymentRequired object (base64 JSON); retry with a PAYMENT-SIGNATURE header to pay and get the result plus a Pro key.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 PaymentRequired, base64 JSON (only when x402 is available)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired402"}}}},"422":{"description":"Not a token / could not resolve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/wallet":{"get":{"operationId":"scanWallet","summary":"Risk-sorted token list for a public Solana wallet","tags":["checks"],"security":[{},{"bearer":[]},{"apiKey":[]}],"description":"Free: the 3 riskiest tokens, 5 scans/day per IP; Pro: every token, unlimited. Public addresses only. Automated risk signals, not financial advice.","parameters":[{"name":"address","in":"query","required":true,"description":"Public Solana wallet address","schema":{"type":"string"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"x402 v2 PaymentPayload (base64 JSON) with a partially signed Solana USDC transfer. Settles a Pro purchase and serves this request as Pro.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Free daily limit reached. Body carries a Pro quote (USDC/SOL amount, pay address, reference, order token, verify URL). When x402 is available the PAYMENT-REQUIRED header carries an x402 v2 PaymentRequired object (base64 JSON); retry with a PAYMENT-SIGNATURE header to pay and get the result plus a Pro key.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 PaymentRequired, base64 JSON (only when x402 is available)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired402"}}}},"422":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"scanWalletPost","summary":"Risk-sorted token list for a public Solana wallet","tags":["checks"],"security":[{},{"bearer":[]},{"apiKey":[]}],"description":"Free: the 3 riskiest tokens, 5 scans/day per IP; Pro: every token, unlimited. Public addresses only. Automated risk signals, not financial advice.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"x402 v2 PaymentPayload (base64 JSON) with a partially signed Solana USDC transfer. Settles a Pro purchase and serves this request as Pro.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"address":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Free daily limit reached. Body carries a Pro quote (USDC/SOL amount, pay address, reference, order token, verify URL). When x402 is available the PAYMENT-REQUIRED header carries an x402 v2 PaymentRequired object (base64 JSON); retry with a PAYMENT-SIGNATURE header to pay and get the result plus a Pro key.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 PaymentRequired, base64 JSON (only when x402 is available)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired402"}}}},"422":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/scan-link":{"get":{"operationId":"scanLink","summary":"Wallet-drainer / phishing scan of a URL or post text","tags":["checks"],"security":[{},{"bearer":[]},{"apiKey":[]}],"description":"Free: 20/day per IP; Pro: unlimited.","parameters":[{"name":"text","in":"query","required":true,"description":"A URL or pasted post text","schema":{"type":"string"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"x402 v2 PaymentPayload (base64 JSON) with a partially signed Solana USDC transfer. Settles a Pro purchase and serves this request as Pro.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Free daily limit reached. Body carries a Pro quote (USDC/SOL amount, pay address, reference, order token, verify URL). When x402 is available the PAYMENT-REQUIRED header carries an x402 v2 PaymentRequired object (base64 JSON); retry with a PAYMENT-SIGNATURE header to pay and get the result plus a Pro key.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 PaymentRequired, base64 JSON (only when x402 is available)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired402"}}}}}},"post":{"operationId":"scanLinkPost","summary":"Wallet-drainer / phishing scan of a URL or post text","tags":["checks"],"security":[{},{"bearer":[]},{"apiKey":[]}],"description":"Free: 20/day per IP; Pro: unlimited.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"x402 v2 PaymentPayload (base64 JSON) with a partially signed Solana USDC transfer. Settles a Pro purchase and serves this request as Pro.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"402":{"description":"Free daily limit reached. Body carries a Pro quote (USDC/SOL amount, pay address, reference, order token, verify URL). When x402 is available the PAYMENT-REQUIRED header carries an x402 v2 PaymentRequired object (base64 JSON); retry with a PAYMENT-SIGNATURE header to pay and get the result plus a Pro key.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 PaymentRequired, base64 JSON (only when x402 is available)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired402"}}}}}}},"/api/pro/quote":{"get":{"operationId":"getProQuote","tags":["pro"],"summary":"Price quote and payment order for Pro","description":"Fresh order with a unique reference. Does not move funds.","parameters":[{"name":"order","in":"query","required":false,"description":"Existing order token to reuse (optional)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/api/pro/verify":{"post":{"operationId":"verifyPayment","tags":["pro"],"summary":"Verify a payment on-chain and get a Pro key","description":"Checks the transaction paid PAY_TO at least 95% of the price in USDC or SOL, carries the order reference (Solana Pay reference key or SPL Memo), is confirmed and under 7 days old. One signature gives one key; repeating with the same order returns the same key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signature","order"],"properties":{"signature":{"type":"string","description":"Transaction signature (base58)"},"order":{"type":"string","description":"Order token from /api/pro/quote"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProKey"}}}},"422":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/pro/redeem":{"post":{"operationId":"redeemPayment","tags":["pro"],"summary":"Alias of /api/pro/verify used by the website","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signature","order"],"properties":{"signature":{"type":"string"},"order":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProKey"}}}},"422":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/pro/order":{"get":{"operationId":"createOrder","tags":["pro"],"summary":"Payment order with Solana Pay URLs and QR (used by the website)","parameters":[{"name":"order","in":"query","required":false,"description":"Existing order token","schema":{"type":"string"}},{"name":"ref","in":"query","required":false,"description":"Referral code","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/pro/x402":{"get":{"operationId":"buyProX402","tags":["pro"],"summary":"Buy Pro with x402 (v2, exact, Solana USDC)","description":"Without PAYMENT-SIGNATURE: 402 with PAYMENT-REQUIRED (when x402 is available) and the regular quote. With PAYMENT-SIGNATURE: verifies and settles through the facilitator, re-checks on-chain, returns a Pro key and a PAYMENT-RESPONSE header.","parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"description":"x402 v2 PaymentPayload (base64 JSON) with a partially signed Solana USDC transfer. Settles a Pro purchase and serves this request as Pro.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProKey"}}}},"402":{"description":"Free daily limit reached. Body carries a Pro quote (USDC/SOL amount, pay address, reference, order token, verify URL). When x402 is available the PAYMENT-REQUIRED header carries an x402 v2 PaymentRequired object (base64 JSON); retry with a PAYMENT-SIGNATURE header to pay and get the result plus a Pro key.","headers":{"PAYMENT-REQUIRED":{"description":"x402 v2 PaymentRequired, base64 JSON (only when x402 is available)","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired402"}}}}}}},"/api/pro/x402/status":{"get":{"operationId":"x402Status","tags":["pro"],"summary":"Whether x402 payments are currently available, and why not","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/pro/status":{"get":{"operationId":"proStatus","tags":["pro"],"summary":"Is this Pro key valid, and until when","security":[{},{"bearer":[]},{"apiKey":[]}],"parameters":[{"name":"key","in":"query","required":false,"description":"Pro key (or send it as a header)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"pro":{"type":"boolean"},"expires":{"type":"string","format":"date-time"}}}}}}}}},"/api/pro/referral":{"get":{"operationId":"referralInfo","tags":["pro"],"summary":"Referral code and link for a Pro key","security":[{},{"bearer":[]},{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"claimReferrals","tags":["pro"],"summary":"Credit referred payments to this key (+30 days each)","security":[{},{"bearer":[]},{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/config":{"get":{"operationId":"config","tags":["meta"],"summary":"Limits, price, pay address, endpoints","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/health":{"get":{"operationId":"health","tags":["meta"],"summary":"Service health and counters","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/t/{mint}":{"get":{"operationId":"tokenPage","tags":["meta"],"summary":"Human-readable HTML report page for a mint","parameters":[{"name":"mint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"HTML","content":{"text/html":{}}}}}},"/og/{mint}.png":{"get":{"operationId":"reportCard","tags":["meta"],"summary":"1200x675 PNG report card for a mint","parameters":[{"name":"mint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PNG","content":{"image/png":{}}}}}},"/mcp":{"post":{"operationId":"mcp","tags":["mcp"],"summary":"Remote MCP server (Streamable HTTP, stateless, JSON responses)","description":"JSON-RPC 2.0 MCP endpoint. Tools: check_token, scan_wallet, scan_link, get_pro_quote, verify_payment_and_get_key, get_pro_status, watch_token, unwatch_token, get_watch_status. Pro key via Authorization: Bearer.","security":[{},{"bearer":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"RugRadar Pro key"},"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Error":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}}},"TokenReport":{"type":"object","additionalProperties":true,"properties":{"ok":{"type":"boolean"},"mint":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"verdict":{"type":"string","enum":["Safe","Caution","Danger"],"description":"Machine label; display as Low risk / Caution / High risk. \"Safe\" means no major red flags found, not that a token is safe."},"summary":{"type":"string"},"flags":{"type":"array","items":{"type":"object","properties":{"sev":{"type":"string","enum":["danger","warn","info","good"]},"text":{"type":"string"}}}},"facts":{"type":"object","additionalProperties":true},"dump_model":{"type":"object","additionalProperties":true},"checked_at":{"type":"string","format":"date-time"},"plan":{"type":"string","enum":["free","pro"]},"remaining_today":{"type":["integer","null"]},"pro_key":{"type":"string","description":"Only after an x402 purchase on this request"}}},"Quote":{"type":"object","additionalProperties":true,"properties":{"ok":{"type":"boolean"},"price_usd":{"type":"number"},"duration_days":{"type":"integer"},"pay_to":{"type":"string","const":"3B9w9iQrCn4LrmdmPqCttjms6DB1psZRPmA1aJre8SZS"},"options":{"type":"array","items":{"type":"object","additionalProperties":true}},"reference":{"type":"string"},"memo":{"type":"string"},"order":{"type":"string"},"instructions":{"type":"string"},"verify":{"type":"object","additionalProperties":true},"x402":{"type":"object","additionalProperties":true}}},"PaymentRequired402":{"type":"object","additionalProperties":true,"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"},"payment_required":{"type":"boolean"},"quote":{"$ref":"#/components/schemas/Quote"}}},"ProKey":{"type":"object","additionalProperties":true,"properties":{"ok":{"type":"boolean"},"key":{"type":"string"},"expires":{"type":"string","format":"date-time"},"already_redeemed":{"type":"boolean"}}}}}}