{"uid":"cap_4h9kLHYy4KqqUbMjq9Zmi","slug":"bitcoin-transaction-decoder-9d9c0d42","name":"Bitcoin Transaction Decoder","description":"Decode a raw Bitcoin transaction (hex): txid, wtxid, size, vsize, weight, inputs, outputs with addresses and values, SegWit and RBF flags. Nothing is broadcast.","url":"https://diamond.btc-intel.workers.dev/api/x402/decode_tx?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["hex"],"properties":{"hex":{"type":"string","maxLength":200000,"description":"Raw transaction as hex"}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"txid":"a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d","vsize":141,"segwit":true,"outputs":[{"n":0,"btc":0.001,"type":"witness_v0_keyhash","address":"bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"}],"product":"decoded_transaction","rbf_signaled":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mzoZbZUEFVF-_d80DLIVf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes a raw Bitcoin transaction hex string into structured fields including txid, wtxid, size, vsize, weight, inputs, outputs with addresses and values, and SegWit/RBF flags — without broadcasting it.","exampleAgentPrompt":"Can you decode this raw Bitcoin transaction hex for me and tell me the txid, vsize, all output addresses and amounts, and whether it signals RBF or uses SegWit? Here's the hex: 0200000001abcd...","exampleUseCases":[{"title":"Verify transaction before signing","prompt":"Before I sign and broadcast this transaction, decode the raw hex for me so I can confirm the output addresses and BTC amounts are correct — I want to make sure nothing was tampered with. Here's the hex: 020000000189ab..."},{"title":"Extract txid from unsigned transaction","prompt":"I built a raw Bitcoin transaction offline and need to know its txid and vsize before I do anything with it — can you decode this hex and give me those details? Hex: 01000000019a3c..."},{"title":"Check RBF and SegWit flags on a raw tx","prompt":"Can you tell me if this raw Bitcoin transaction signals replace-by-fee and whether it's a SegWit transaction? Just decode the hex and report those flags along with the full output breakdown. Hex: 02000000000101f7a9..."}],"resultDescription":"Returns a JSON object containing the txid, wtxid, byte size, vsize, weight, list of inputs, list of outputs (each with index, BTC value, script type, and address), a boolean for SegWit, and a boolean for RBF signaling. Nothing is broadcast to the network.","failureModes":["Invalid or malformed hex string returns an error response","Truncated transaction hex causes parsing failure","Non-Bitcoin hex data (e.g. Ethereum transaction) returns a decode error","Hex string exceeding 200,000 character limit is rejected","Empty or missing 'hex' query parameter returns a 400-level error"],"whenToPreferThis":"Use this endpoint when you need to decode and inspect the contents of a raw Bitcoin transaction before broadcasting, signing, or auditing it. It is ideal for offline analysis, compliance checks, verification of transaction structure, or extracting txid/addresses without touching the Bitcoin network. Prefer this over block explorer lookups when the transaction is not yet broadcast or when you need structured JSON output with SegWit and RBF flags explicitly surfaced.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T23:56:21.778Z","isFirstParty":false,"canonicalSlug":"bitcoin-transaction-decoder-9d9c0d42"}