{"uid":"cap_BrAA72e3E0ZRJ6t6ocrCt","slug":"blockscout-optimism-batch-blocks-lookup-f9eb1332","name":"Blockscout Optimism Batch Blocks Lookup","description":"Explore crypto activities with Blockscout's multichain search. Find transactions, addresses, tokens, and dapps across top blockchain networks — your go-to explorer for cross-chain blockchain data","url":"https://api.blockscout.com/%7Bchain_id%7D/api/v2/blocks/optimism-batch/%7Bbatch_number_param%7D","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"},"pathParams":{"type":"object","properties":{"chain_id":{"type":"string"},"batch_number_param":{"type":"integer"}}},"queryParams":{"type":"object","properties":{"items_count":{"type":"integer"},"block_number":{"type":"integer"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"items":[{"hash":"string","size":0,"type":"string","miner":{},"nonce":"string","height":0,"rewards":[{"type":"string","reward":"string"}],"arbitrum":{"status":"string","send_root":"string","send_count":0,"batch_number":0,"l1_block_number":0,"delayed_messages":0,"batch_data_container":"string","commitment_transaction":{"hash":"string","status":"string","timestamp":"string"},"confirmation_transaction":{"hash":"string","status":"string","timestamp":"string"}},"gas_used":"string","gas_limit":"string","timestamp":"string","burnt_fees":"string","difficulty":"string","parent_hash":"string","priority_fee":"string","uncles_hashes":[{"hash":"string"}],"base_fee_per_gas":"string","total_difficulty":"string","transaction_fees":"string","is_pending_update":true,"withdrawals_count":0,"transactions_count":0,"gas_used_percentage":0,"burnt_fees_percentage":0,"gas_target_percentage":0,"internal_transactions_count":0}],"next_page_params":{}}},"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_9w5OJlBabj3mhhMe_RToR","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":"Retrieves the list of L2 blocks included in a specific Optimism batch on a given blockchain network via Blockscout's multichain explorer API","exampleAgentPrompt":"Can you pull up all the L2 blocks included in Optimism batch number 8432 on chain ID 10 using Blockscout?","exampleUseCases":[{"title":"Audit Optimism batch block contents","prompt":"Show me all the L2 blocks that were bundled into Optimism batch 5000 on chain 10 — I want to see the block hashes, transaction counts, and gas usage for each one."},{"title":"Track batch confirmation status","prompt":"What's the commitment and confirmation transaction status for the blocks in Optimism batch 3200 on chain ID 10? I'm trying to verify whether the batch has been finalized on L1."},{"title":"Analyze gas efficiency across batch","prompt":"Fetch the blocks in Optimism batch 7800 on chain 10 and break down the gas used, gas limit, and burnt fees for each block so I can analyze how efficiently the sequencer packed transactions."}],"resultDescription":"Returns a paginated list of L2 block objects included in the specified Optimism batch. Each block contains its hash, height, size, miner, nonce, timestamp, gas used, gas limit, burnt fees, priority fee, base fee per gas, transaction count, internal transaction count, withdrawals count, uncle hashes, and Optimism-specific metadata including batch number, L1 block number, send root, send count, batch data container, and the commitment and confirmation transaction details (hash, status, timestamp). Also includes next_page_params for pagination.","failureModes":["Invalid chain_id returns 404 or empty response","Non-existent batch_number_param returns empty items array","Malformed batch_number_param (non-integer) returns 400 bad request","Chain not supported by Blockscout returns 404","Rate limiting or payment failure returns 402 Payment Required","Network timeout on slow chains returns 5xx"],"whenToPreferThis":"Use this endpoint when you need to enumerate the specific L2 blocks that were included in a particular Optimism rollup batch, especially when you need Optimism-specific metadata like commitment/confirmation transaction status, send root, and L1 block anchoring. Prefer this over generic block list endpoints when your query is batch-centric rather than block-height-centric.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:50:47.825Z","isFirstParty":false}