{"uid":"cap_WgSssMarLtglzENJg4wtS","slug":"x402-chain-tools-get-current-base-mainnet-block-number-65b32e20","name":"x402 Chain Tools – Get Current Base Mainnet Block Number","description":"Check the latest or current Base Mainnet block number. Use this to get the live Base block height.","url":"https://blockchain-api.x402-chain-tools.workers.dev/chain/block","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":[],"properties":{},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","network","block"],"properties":{"ok":{"type":"boolean","const":true},"block":{"type":"object","required":["number","number_hex"],"properties":{"number":{"type":["integer","string"]},"number_hex":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"}},"additionalProperties":false},"network":{"type":"string","const":"eip155:8453"}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"ok":true,"block":{"number":0,"number_hex":"0x0"},"network":"eip155:8453"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LHsh9gPc1ukhsPRX0ENtf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the current block number of the Base Mainnet blockchain in both decimal and hex formats.","exampleAgentPrompt":"What's the current block number on Base Mainnet right now — give me both the decimal and hex values?","exampleUseCases":[{"title":"Real-time chain sync check","prompt":"Can you grab the current Base Mainnet block number so I can verify my indexer is fully synced?"},{"title":"Onchain timestamp anchoring","prompt":"What block is Base on right now? I need the block number to anchor a time-sensitive onchain event I'm recording."},{"title":"Block height monitoring alert","prompt":"Check the current Base block number and let me know if it's past block 20000000 yet."}],"resultDescription":"Returns a JSON object with a boolean 'ok' field, a 'network' string (eip155:8453), and a 'block' object containing the current block 'number' as an integer and 'number_hex' as a 0x-prefixed hexadecimal string.","failureModes":["RPC node unavailable or rate-limited — may return a non-ok response or timeout","Payment not processed — endpoint requires $0.001 USDC via x402 protocol, missing payment causes 402 rejection","Network connectivity issues with Cloudflare Worker — transient 5xx errors possible"],"whenToPreferThis":"Use this endpoint when you need a lightweight, pay-per-call lookup of the current Base Mainnet block height without setting up your own RPC node. Ideal for agents that need to occasionally anchor onchain time, check sync status, or gate logic on block progression without a full blockchain integration.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:41:54.352Z","isFirstParty":false}