{
  "openapi": "3.1.0",
  "info": {
    "title": "Rugsight API",
    "version": "1.1.0",
    "description": "Automated risk scores for Solana tokens. Free basic score; full report pay-per-call over x402 (0.03 USDC on Solana) or 1 USDC via Solana Pay for humans. Not financial advice.",
    "contact": {
      "name": "Rugsight",
      "url": "https://rugsight.rugsight.workers.dev",
      "email": "yunare-qwerng+rugsight@mail.grokbot.com"
    },
    "x-guidance": "Use GET /api/score/{mint} (free) for a quick verdict. Use GET /api/v1/report?mint={mint} (0.03 USDC via x402 on Solana mainnet) for the full report with holder breakdown, market metrics and explained flags. An unpaid call returns 402 with a PAYMENT-REQUIRED header; pay with any x402 client and retry. The alias /api/v1/report/{mint} behaves the same. MCP: https://rugsight.rugsight.workers.dev/mcp."
  },
  "servers": [
    {
      "url": "https://rugsight.rugsight.workers.dev"
    }
  ],
  "x-discovery": {
    "wellKnown": "https://rugsight.rugsight.workers.dev/.well-known/x402",
    "mcp": "https://rugsight.rugsight.workers.dev/mcp",
    "llms": "https://rugsight.rugsight.workers.dev/llms.txt"
  },
  "paths": {
    "/api/score/{mint}": {
      "get": {
        "operationId": "getTokenRiskScore",
        "summary": "Free basic risk score",
        "description": "Free basic risk score for a Solana token: 0-100 score, A-F grade, verdict and risk flag codes.",
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "description": "Solana token mint address (base58)",
            "schema": {
              "type": "string",
              "description": "Solana token mint address (base58)",
              "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
            },
            "example": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Basic score",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mint": {
                      "type": "string"
                    },
                    "score": {
                      "type": "integer"
                    },
                    "grade": {
                      "type": "string",
                      "enum": [
                        "A",
                        "B",
                        "C",
                        "D",
                        "F"
                      ]
                    },
                    "verdict": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "full",
                        "partial"
                      ]
                    },
                    "flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "severity": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "mint",
                    "score",
                    "grade"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid mint"
          }
        }
      }
    },
    "/api/v1/report": {
      "get": {
        "operationId": "getTokenRiskReport",
        "summary": "Full risk report (0.03 USDC, x402)",
        "description": "Rugsight full risk report for a Solana SPL / Token-2022 token: mint & freeze authority, Token-2022 extensions, top-20 holder breakdown (wallets vs pools/programs/burn), liquidity, 24h volume, pool age, every risk flag explained, 0-100 score and A-F grade.",
        "parameters": [
          {
            "name": "mint",
            "in": "query",
            "required": true,
            "description": "Solana token mint address (base58)",
            "schema": {
              "type": "string",
              "description": "Solana token mint address (base58)",
              "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
            },
            "example": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
          }
        ],
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "USDC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "asset": "USDC",
          "payTo": "7Z156pFA5mf1k6hfRdwprztz3DjkXnvfMgGrD7beTqNU"
        },
        "responses": {
          "200": {
            "description": "Full report. PAYMENT-RESPONSE header carries the settlement receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mint": {
                      "type": "string"
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tokenProgram": {
                      "type": "string",
                      "enum": [
                        "spl-token",
                        "token-2022"
                      ]
                    },
                    "decimals": {
                      "type": "integer"
                    },
                    "supplyUi": {
                      "type": "number"
                    },
                    "mintAuthority": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "freezeAuthority": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "extensions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "symbol": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "holders": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "top": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "rank": {
                                "type": "integer"
                              },
                              "tokenAccount": {
                                "type": "string"
                              },
                              "owner": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "wallet",
                                  "pool",
                                  "program",
                                  "burn",
                                  "unknown"
                                ]
                              },
                              "pctOfSupply": {
                                "type": "number"
                              }
                            }
                          }
                        },
                        "top1WalletPct": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "top10WalletPct": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "poolOrProgramPct": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "burnedPct": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      }
                    },
                    "market": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "source": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "pools": {
                          "type": "integer"
                        },
                        "liquidityBucket": {
                          "type": "string"
                        },
                        "volume24hBucket": {
                          "type": "string"
                        },
                        "ageDays": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "dexCount": {
                          "type": "integer"
                        }
                      }
                    },
                    "flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Machine-readable flag code, e.g. MINT_AUTHORITY_ACTIVE"
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "high",
                              "medium",
                              "low",
                              "info"
                            ]
                          },
                          "points": {
                            "type": "number",
                            "description": "Points deducted from the score"
                          },
                          "message": {
                            "type": "string",
                            "description": "Plain-English explanation"
                          }
                        },
                        "required": [
                          "code",
                          "severity"
                        ]
                      }
                    },
                    "score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "grade": {
                      "type": "string",
                      "enum": [
                        "A",
                        "B",
                        "C",
                        "D",
                        "F"
                      ]
                    },
                    "verdict": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "full",
                        "partial"
                      ]
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "mint",
                    "score",
                    "grade",
                    "flags",
                    "confidence"
                  ]
                },
                "example": {
                  "mint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
                  "checkedAt": "2026-10-30T12:44:40.718Z",
                  "tokenProgram": "spl-token",
                  "decimals": 5,
                  "supplyUi": 87994308297519.88,
                  "mintAuthority": null,
                  "freezeAuthority": null,
                  "extensions": [],
                  "symbol": null,
                  "name": null,
                  "holders": {
                    "available": true,
                    "top": [
                      {
                        "rank": 1,
                        "tokenAccount": "5hpfC9VBxVcoW9opCnM2PqR6YWRLBzrBpabJTZnwwNiw",
                        "owner": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
                        "kind": "wallet",
                        "pctOfSupply": 9.486
                      }
                    ],
                    "top1WalletPct": 9.49,
                    "top10WalletPct": 38.72,
                    "poolOrProgramPct": 2.74,
                    "burnedPct": 0
                  },
                  "market": {
                    "available": true,
                    "source": "dexscreener",
                    "pools": 30,
                    "liquidityBucket": "$1M-$10M",
                    "volume24hBucket": "$1M-$10M",
                    "ageDays": 1409.7,
                    "dexCount": 3
                  },
                  "flags": [
                    {
                      "code": "TOP10_ELEVATED",
                      "severity": "low",
                      "points": 10,
                      "message": "Top 10 wallets hold 38.7% of supply."
                    }
                  ],
                  "score": 90,
                  "grade": "A",
                  "verdict": "Low risk on the checks we run.",
                  "confidence": "full",
                  "disclaimer": "Automated technical analysis of public on-chain data. Not financial advice. Do your own research."
                }
              }
            }
          },
          "400": {
            "description": "Invalid mint or malformed payment"
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the base64 x402 v2 PaymentRequired object; the JSON body carries the x402 v1 form."
          },
          "503": {
            "description": "Upstream data unavailable; payment is not settled"
          }
        }
      }
    }
  }
}