{"uid":"cap_1MINIHOGSxtZqo9wZ_oTf","slug":"block402-bitcoin-rpc-api-018a01c1","name":"Block402 Bitcoin RPC API","description":"Blockchain intelligence for AI agents. Query blockchain data through a read-only, pay-per-request API with x402.","url":"https://api.block402.xyz/rpc/bitcoin?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"id":{"type":["string","integer"]},"method":{"enum":["getblockcount","getbestblockhash","getblockhash","getblockheader","getblock","getrawtransaction","gettxout"],"type":"string"},"params":{"type":"array","maxItems":20},"jsonrpc":{"const":"2.0"}}},"responseSchema":{"type":"json","example":{"id":1,"result":969011,"jsonrpc":"2.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0025","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.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KuMDnfQxqQkTCB95Nsf5r","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Query Bitcoin blockchain data via JSON-RPC methods including block counts, hashes, headers, transactions, and unspent outputs","exampleAgentPrompt":"What is the current Bitcoin block count, and can you also get me the block hash for block height 850000 using the Block402 Bitcoin RPC?","exampleUseCases":[{"title":"Real-time Bitcoin block monitoring","prompt":"What is the current Bitcoin block height and what is the best block hash on the chain right now?"},{"title":"Bitcoin transaction verification","prompt":"Can you fetch the raw transaction data for this Bitcoin TXID: a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d and tell me its details?"},{"title":"Inspect UTXO for a specific output","prompt":"Check if the unspent transaction output for TXID f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 at output index 0 is still unspent on the Bitcoin blockchain."}],"resultDescription":"A JSON-RPC 2.0 response object containing the result of the requested Bitcoin query — for example, an integer block count, a hex-encoded block hash string, a block header object with fields like confirmations and difficulty, a full block object with transaction list, or a raw transaction hex string and decoded UTXO details.","failureModes":["Invalid or unsupported RPC method name returns an error response","Missing or malformed params array causes a parse/invalid-params error","Block hash or TXID not found on chain returns null result","Exceeding maxItems (20) in params array is rejected","Payment not processed (402 response) if x402 payment is not properly attached","Network timeout if Bitcoin node is temporarily unavailable"],"whenToPreferThis":"Choose this endpoint when you need real-time, read-only access to Bitcoin blockchain data — specifically block counts, block hashes, block headers, full block contents, raw transactions, or UTXO states — via a standard JSON-RPC interface. It is ideal for AI agents that need pay-per-request access without a subscription, using the x402 micropayment protocol. Prefer this over general blockchain explorers when you need programmatic, structured JSON output rather than human-readable pages, and when you specifically need Bitcoin (not Ethereum or other chains).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:38:08.688Z","isFirstParty":false,"canonicalSlug":"block402-bitcoin-rpc-api-018a01c1"}