{"uid":"cap_sx7fI4yc29rKqk3Js2unA","slug":"bitcoin-block-header-lookup-8c2a4309","name":"Bitcoin Block Header Lookup","description":"Header of any Bitcoin block by height or hash: hash, previous and next hash, merkle root, time, median time past, bits, difficulty, nonce, version, tx count, confirmations.","url":"https://diamond.btc-intel.workers.dev/api/x402/block_header?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":["block_id"],"properties":{"block_id":{"type":"string","maxLength":64,"description":"Block height (for example 974000) or block hash (64 hex characters)"}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"hash":"00000000000000000000d7d13f5ac024052cad9613d9a6608f76df081d74e865","time":"2026-11-07T18:00:00Z","as_of":"2026-11-07T18:00:00Z","height":974000,"product":"block_header","tx_count":3600,"difficulty":150000000000000,"confirmations":957}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LIVkLDY3pvKcOzAnBTy0w","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches the header metadata for a specific Bitcoin block by height or hash, including tx count, difficulty, confirmations, and timestamp.","exampleAgentPrompt":"What's the block header for Bitcoin block 974000 — give me the hash, timestamp, transaction count, difficulty, and how many confirmations it has?","exampleUseCases":[{"title":"Verify block timestamp for audit","prompt":"Can you pull the block header for Bitcoin block 850000 and tell me exactly when it was mined and how many transactions it included?"},{"title":"Confirm transaction finality by block","prompt":"I need to check if the block at height 980000 has enough confirmations to consider a transaction final — can you fetch its header details?"},{"title":"Research difficulty at specific block","prompt":"What was the mining difficulty when Bitcoin block 760000 was mined? Pull the full header so I can see the difficulty and timestamp."}],"resultDescription":"Returns a JSON object with the block's 64-character hex hash, UTC timestamp when it was mined, an as-of UTC freshness timestamp, block height, number of transactions in the block, mining difficulty, and confirmation count since that block.","failureModes":["Invalid block_id format (not a valid height integer or 64-char hex hash) returns an error","Block height beyond the current chain tip returns not-found error","Network or worker timeout returns a 5xx error","Orphaned block hash may return unexpected results","Missing block_id parameter returns a 400 validation error"],"whenToPreferThis":"Use this endpoint when you need lightweight, pay-per-call block header metadata (height, hash, timestamp, tx count, difficulty, confirmations) without running a full node or subscribing to a plan. Ideal for one-off lookups, verification workflows, or agents that need on-demand Bitcoin block data at low cost ($0.002 USDC). Prefer over block explorer scraping for reliability and structured JSON output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:36:17.685Z","isFirstParty":false,"canonicalSlug":"bitcoin-block-header-lookup-8c2a4309"}