{"data":{"billing":{"currency":"USD","mode":"fixed","priceMicroUsd":"0","rounding":null,"unit":"call","unitQuantity":null},"capabilityId":"57336ffa-f78a-4cd1-9e48-e7e7d36336df","catalogType":"api","categories":["crypto-defi"],"dataPlatform":"blockscout","dataPlatformLogoUrl":"https://www.blockscout.com/favicon/apple-touch-icon-180x180.png","dataPlatformTranslations":{"ar":"Blockscout","ja":"Blockscout","zh":"Blockscout"},"dataProduct":"explorer-rest","description":"List Blockscout Optimism batch blocks via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Blockscout, pass parameters such as Set, and retrieve structured data including L2 block hash, L2 block height, reported block timestamp, reported block transaction count, and reported block gas used for batch detail pages, and rollup inspection.","descriptionTranslations":{"ar":"اعرض كتل L2 داخل دفعة من عائلة Optimism عبر OpenAny REST بمدخلات السلسلة والدفعة، مع استكمال برقم الكتلة وأعداد المعاملات لأدوات فحص الدفعات ونشاط Rollup. استخدم البيانات في واجهات المستكشف أو أدوات فحص السلسلة، مع الاحتفاظ بمعرفات السلسلة والموارد عند دمج النتائج، وراجع قوالب الطلبات والمدخلات المدعومة وتسعير التنفيذ المحدد في صفحة التفاصيل.","ja":"OpenAny REST にチェーンとバッチを指定し、Optimism 系バッチ内の L2 ブロックと取引件数を取得して、ブロック番号で継続できます。 返されたデータをエクスプローラー画面やチェーン調査ツールで利用できます。結果を結合する際はチェーンとリソースの識別子を保持し、詳細ページのリクエスト例、対応入力、選択した実装の料金を確認してください。","zh":"通过 OpenAny REST 使用链和批次输入查询 Optimism 系批次内的 L2 区块，按区块号续页并读取交易计数，用于批次检查、浏览器关联和 Rollup 活动工具。 可将返回数据用于浏览器界面或链上调查工具，合并结果时保留链与资源标识符；详情页提供请求模板、支持的输入及所选实现的价格。"},"effectContentHtml":"","executionMode":"sync","id":"2249d195-e856-4f8c-abdc-7dab72097d2f","includedContentHtml":"","inputs":[{"description":"Batch number","location":"path","minimum":"0","name":"batch_number_param","nullable":false,"required":true,"type":"integer"},{"description":"The ID of the blockchain","location":"path","name":"chain_id","nullable":false,"required":true,"type":"string"},{"description":"Number of items per page","location":"query","minimum":"1","name":"items_count","nullable":false,"required":false,"type":"integer"},{"description":"Block number for paging","location":"query","minimum":"0","name":"block_number","nullable":false,"required":false,"type":"integer"}],"logoUrl":"https://www.blockscout.com/favicon/apple-touch-icon-180x180.png","method":"GET","name":"Blockscout — List L2 blocks in an Optimism batch","nameTranslations":{"ar":"Blockscout — إدراج كتل L2 في دفعة Optimism","ja":"Blockscout — Optimism バッチ内の L2 ブロックを一覧表示","zh":"Blockscout — 列出 Optimism 批次中的 L2 区块"},"overviewHtml":"\u003ch2\u003eBlockscout Optimism Batch Blocks API\u003c/h2\u003e\n\u003cp\u003eProvide chain_id and the non-negative integer batch_number_param on the optimism-batch block route. items contains L2 block records. Continue with block_number of at least 0 and optional items_count of at least 1.\u003c/p\u003e\n\u003ch2\u003eQuick Facts\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eFact\u003c/th\u003e\n\u003cth\u003eValue\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAccess\u003c/td\u003e\n\u003ctd\u003eOpenAny REST\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAuthentication\u003c/td\u003e\n\u003ctd\u003eOpenAny API key in the Authorization header\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCore inputs\u003c/td\u003e\n\u003ctd\u003epath: batch_number_param, chain_id; query: items_count, block_number\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSelected implementation\u003c/td\u003e\n\u003ctd\u003eblockscout · Blockscout — List L2 blocks in an Optimism batch\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBilling\u003c/td\u003e\n\u003ctd\u003eSee the pricing area for the selected implementation and request options\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eWhat You Can Build\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eBatch detail pages\u003c/strong\u003e: Display the blocks associated with one batch.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eRollup inspection\u003c/strong\u003e: Keep batch identity separate from block height and hash.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eDocumented Response Fields\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eField\u003c/th\u003e\n\u003cth\u003eMeaning\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].hash\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eL2 block hash\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].height\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eL2 block height\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].timestamp\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eReported block timestamp\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].transactions_count\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eReported block transaction count\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eitems[].gas_used\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eReported block gas used\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eQuick Start\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eSet OPENANY_API_KEY to your OpenAny API key.\u003c/li\u003e\n\u003cli\u003eSet the path variables shown in the URL to your target values; URL-encode each path segment before calling.\u003c/li\u003e\n\u003cli\u003eCheck the HTTP response and business result before reading optional fields.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003ecurl --request GET --get \\\n  \u0026#34;https://api.openany.si/v1/agent-apis/blockscout/${CHAIN_ID_URI:?Set CHAIN_ID_URI}/api/v2/blocks/optimism-batch/${BATCH_NUMBER_PARAM_URI:?Set BATCH_NUMBER_PARAM_URI}\u0026#34; \\\n  -H \u0026#34;Authorization: Bearer ${OPENANY_API_KEY}\u0026#34; \\\n  -H \u0026#39;Content-Type: application/json\u0026#39;\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003eRequest and Response Examples\u003c/h2\u003e\n\u003cp\u003eThe response example is a schema template, not a captured response. Set the named path variables for your target chain and resource before using the request template; read actual returned values and optional fields from the result.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://openany.si/api/v1/agent-apis/2249d195-e856-4f8c-abdc-7dab72097d2f\"\u003ePublished Blockscout Optimism Batch Blocks API implementation contract\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003ePricing and Billing\u003c/h2\u003e\n\u003cp\u003eThe pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service\u0026#39;s public availability does not determine OpenAny billing.\u003c/p\u003e\n\u003ch2\u003eFrequently Asked Questions\u003c/h2\u003e\n\u003ch3\u003eIs batch_number_param a block height?\u003c/h3\u003e\n\u003cp\u003eNo. It selects a batch; each returned block has its own height and hash.\u003c/p\u003e\n\u003ch3\u003eWhich pagination inputs are exposed?\u003c/h3\u003e\n\u003cp\u003eUse block_number and items_count. This block-list route does not expose the transaction-list index cursor.\u003c/p\u003e\n\u003ch3\u003eCan I reuse the same batch number across rollups?\u003c/h3\u003e\n\u003cp\u003eKeep the rollup-specific route and chain context with the batch number.\u003c/p\u003e\n\u003ch3\u003eDoes this return all transaction objects in the batch?\u003c/h3\u003e\n\u003cp\u003eIt lists blocks. Use the corresponding batch transaction route for transaction records.\u003c/p\u003e\n\u003ch3\u003eWhich API key should I use?\u003c/h3\u003e\n\u003cp\u003eUse your OpenAny API key as Bearer authentication on the documented OpenAny route.\u003c/p\u003e\n\u003ch3\u003eWhere can I check the current request price?\u003c/h3\u003e\n\u003cp\u003eCheck the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.\u003c/p\u003e\n\u003ch2\u003eRelated APIs\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/blockscout/blockscout-list-games\"\u003eBlockscout — List games.\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/blockscout/blockscout-list-individual-nft-instances-for-a-token-contract\"\u003eBlockscout — List individual NFT instances for a token contract\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/blockscout/blockscout-list-internal-transactions-generated-during-smart-contract-execution\"\u003eBlockscout — List internal transactions generated during smart contract execution\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/blockscout/blockscout-list-l2-blocks-in-an-optimism-batch?offering=2249d195-e856-4f8c-abdc-7dab72097d2f","providerId":"blockscout","publicPath":"/v1/agent-apis/blockscout/{chain_id}/api/v2/blocks/optimism-batch/{batch_number_param}","requestContentType":"none","revision":4,"samples":[{"http_status":200,"name":"Schema template · Schema template (not executed)","request":{"body":null,"headers":{},"path":{"batch_number_param":0,"chain_id":"\u003cchain_id\u003e"},"query":{}},"response_body":{"items":[{"base_fee_per_gas":"\u003cbase_fee_per_gas\u003e","burnt_fees":"\u003cburnt_fees\u003e","burnt_fees_percentage":0,"difficulty":"\u003cdifficulty\u003e","gas_limit":"\u003cgas_limit\u003e","gas_target_percentage":0,"gas_used":"\u003cgas_used\u003e","gas_used_percentage":0,"hash":"\u003chash\u003e","height":0,"internal_transactions_count":0,"is_pending_update":false,"miner":{"ens_domain_name":"\u003cens_domain_name\u003e","hash":"\u003chash\u003e","implementations":[{"address_hash":"\u003caddress_hash\u003e","name":"\u003cname\u003e"}],"is_contract":false,"is_scam":false,"is_verified":false,"metadata":{"tags":[{"meta":{},"name":"\u003cname\u003e","ordinal":0,"slug":"\u003cslug\u003e","tagType":"\u003ctagType\u003e"}]},"name":"\u003cname\u003e","proxy_type":"eip1167","reputation":"ok"},"nonce":"\u003cnonce\u003e","parent_hash":"\u003cparent_hash\u003e","priority_fee":"\u003cpriority_fee\u003e","rewards":[{"reward":"\u003creward\u003e","type":"emission_funds"}],"size":0,"timestamp":"\u003ctimestamp\u003e","total_difficulty":"\u003ctotal_difficulty\u003e","transaction_fees":"\u003ctransaction_fees\u003e","transactions_count":0,"type":"block","uncles_hashes":[{"hash":"\u003chash\u003e"}],"withdrawals_count":0}],"next_page_params":{"block_number":22566361}}}],"seoDescription":"List Blockscout Optimism batch blocks via REST or MCP powered by Blockscout. Pay per call, no subscription. Get L2 block hash and L2 block height in JSON.","updatedAt":"2026-12-03T02:49:20.429Z","usageInstructionsHtml":""}}