Burn & Claim’s new API is in preview: these pages describe it as it will be at launch.
Burn & Claim Docs
SDKCookbook

Get extra SOL back from accounts you keep

Take the SOL above today's rent out of token accounts the wallet keeps using, with nothing closed.

Solana lowered the rent an account must hold (SIMD-0437), so accounts made before then hold extra SOL. withdraw_excess takes the lamports above a token account's current rent-exempt minimum out, and keeps the account open, balance and all: the wallet goes on using it. How extra SOL works explains it.

examples/reclaim-excess-rent.ts
const items = scan.assets
  .filter((asset) => asset.actions.some((option) => option.action === 'withdraw_excess'))
  .map((asset) => ({ assetId: asset.id, action: 'withdraw_excess' as const }))

// Accounts with no extra SOL to give back say why in `excessReason`.
for (const asset of scan.assets) {
  if (asset.excessReason && !items.some((item) => item.assetId === asset.id))
    console.log(`${asset.id}: ${asset.excessReason}`)
}

const result = await reclaim(bnc, {
  wallet,
  items,
  transactionVersions: [0, 1],
  signTransactions: signWithYourWallet,
})
console.log(`${result.totals.netLamports} lamports of extra SOL back, after fees`)

An asset offers withdraw_excess only when it holds enough above the minimum to be worth a transaction, so selecting what offers it follows the floor. Its excessLamports in the scan is how much, excessNetLamports what the wallet gets after fees, and excessReason why an account offers none (current_rate, below_floor, native, paused) or offers only its extra SOL (close_authority, confidential_balance).