{"uid":"cap_soJBqj6BmgSLI59-iDKZx","slug":"bitcoin-block-metadata-by-height-or-hash-f1b243d4","name":"Bitcoin Block Metadata by Height or Hash","description":"Bitcoin block metadata by height or hash (or the chain tip when neither is given), fused with the current difficulty-adjustment context, a computed halving countdown and a network hashrate snapshot. Informational, not advice.","url":"https://api.agentstools.dev/btc/block","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"hash":{"type":"string","description":"Block hash (64 hex characters); alternative to height"},"height":{"type":"integer","description":"Block height; omit height and hash for the chain tip"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.008","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ROqWgoUn-hH2EM6Y1GVRB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns Bitcoin block metadata (by height, hash, or chain tip) fused with difficulty-adjustment context, halving countdown, and network hashrate snapshot.","exampleAgentPrompt":"What are the details for Bitcoin block at height 840000 — include the difficulty adjustment context and how many blocks are left until the next halving?","exampleUseCases":null,"resultDescription":"Returns a JSON object containing block metadata (hash, height, timestamp, transaction count, size, weight), current difficulty-adjustment context (blocks remaining in epoch, expected adjustment), a computed halving countdown (blocks remaining, estimated date), and a network hashrate snapshot.","failureModes":["Invalid or non-existent block hash returns an error response","Block height out of range or negative integer returns an error","Malformed hash (not 64 hex characters) causes a validation error","Network or upstream node unavailability causes a 5xx error","Providing both hash and height simultaneously may cause ambiguous resolution"],"whenToPreferThis":"Use this endpoint when you need a rich, fused view of a specific Bitcoin block combined with mining network context (difficulty adjustment, halving countdown, hashrate) — not just raw block data. Prefer it over general blockchain explorers when you want structured, agent-ready JSON with precomputed countdown metrics in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:34:28.627Z","isFirstParty":false}