{"uid":"cap_6DjTooAKjy-k1A1eKwU06","slug":"block-number-lookup-base-ethereum-e4a75714","name":"Block Number Lookup (Base & Ethereum)","description":"41 pay-per-call JSON APIs for AI agents. No account or API key: an unpaid POST returns HTTP 402, pay in USDC on Base with x402 v2, retry. Prices from $0.001 per call.","url":"https://x402-micro-pay.com/api/skills/block-number?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"chains":{"type":"array","items":{"enum":["base","ethereum"],"type":"string"},"default":["base"],"maxItems":2,"minItems":1,"uniqueItems":true},"request_id":{"type":"string","pattern":"^[A-Za-z0-9._:-]+$","maxLength":64,"minLength":1,"description":"Optional idempotency key. Echoed back; a credit-pack redemption with the same request_id and body is charged once."},"include_timestamp":{"type":"boolean","default":false,"description":"When true, also fetch eth_getBlockByNumber for the tip timestamp"}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"as_of":"2026-10-26T14:00:00Z","results":[{"chain":"base","chain_id":8453,"block_hex":"0x14fb180","timestamp":null,"block_number":22000000,"timestamp_iso":null}]},"next":["tx_status","gas_price"],"skill":"block_number","charged":true,"service":"block_number","sources":[{"url":"chain:8453","name":"base eth_blockNumber","fetched_at":"2026-10-26T14:00:00Z"}],"summary":"base#22000000","version":"1.0.0","warnings":[],"confidence":0.95,"data_as_of":"2026-10-26T14:00:00Z","generated_at":"2026-10-26T14:00:00Z"}},"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_9JgsC_V9u5HUbZtDULZK0","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 latest block number for Base and/or Ethereum chains, optionally with block timestamps, paid per-call via x402/USDC.","exampleAgentPrompt":"What's the current block number on Base right now, and include the timestamp for the latest block?","exampleUseCases":[{"title":"On-chain sync check for DeFi bot","prompt":"What's the latest block number on Base? I need to make sure my DeFi bot is synced to the chain tip before submitting a transaction."},{"title":"Block height comparison across chains","prompt":"Can you fetch the current block numbers for both Base and Ethereum at the same time so I can compare where each chain is right now?"},{"title":"Timestamped block snapshot for audit log","prompt":"Get the latest block number on Base and include the block timestamp — I need to record exactly when this snapshot was taken for our audit trail."}],"resultDescription":"Returns a JSON object with ok:true and a data object containing results array with chain name, chain_id, block_number, block_hex, and optionally timestamp/timestamp_iso for each requested chain. Also includes a summary string (e.g. 'base#22000000'), confidence score, data_as_of timestamp, and a 'next' array suggesting related skills to call.","failureModes":["HTTP 402 returned if payment not attached — must pay $0.001 USDC via x402 on Base before retrying","Invalid chain value (not 'base' or 'ethereum') returns a validation error","RPC node unavailability may cause missing or stale block data","chains array with 0 items or >2 items rejected by schema","Malformed request_id (non-alphanumeric characters) causes rejection"],"whenToPreferThis":"Use this endpoint when you need the current canonical block number for Base or Ethereum chains without setting up API keys or accounts — ideal for AI agents that need on-chain synchronization points, timestamped block anchors, or chain-tip references in automated workflows. Prefer this over direct RPC calls when you want a simple JSON wrapper with no infrastructure overhead and micropayment-based access.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T12:44:53.751Z","isFirstParty":false,"canonicalSlug":"block-number-lookup-base-ethereum-e4a75714"}