# Blockscout Scroll Batches API

> Blockscout Scroll Batches API is a paid API for AI agents from api.blockscout.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-12).

Retrieves paginated list of Scroll L2 batch data including block ranges, transaction counts, and commitment/confirmation transaction details for a given chain

## Facts

- Endpoint: GET https://api.blockscout.com/%7Bchain_id%7D/api/v2/scroll/batches
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockscout-scroll-batches-api-dbd4d0b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eAW-7aXm3rBeFr7ASJyMK

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability blockscout-scroll-batches-api-dbd4d0b3
```

Example prompt: Show me the latest Scroll L2 batches on chain ID 534352 — I want to see the batch numbers, the block ranges they cover, how many transactions each batch contains, and the commitment and confirmation transaction hashes.

## When to prefer this

Use this endpoint when you need structured, paginated access to Scroll L2 batch data including block ranges, transaction counts, and on-chain commitment/confirmation proofs. Prefer this over generic block explorers when you need machine-readable rollup batch metadata with data availability info, or when building dashboards or monitoring tools for Scroll L2 finalization.

## Known failure modes

- Invalid or unsupported chain_id returns an error or empty response
- Batch number out of range returns empty items array
- Malformed query parameters cause 400 Bad Request
- Payment not fulfilled returns 402 Payment Required
- Rate limiting may return 429 Too Many Requests
- Chain not indexed by Blockscout returns empty or error response

## How this service works

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

## Output

Returns a paginated list of Scroll L2 batches, each containing the batch number, start and end block numbers, transaction count, data availability container type, commitment transaction (hash, timestamp, block number), confirmation transaction (hash, timestamp, block number), and next_page_params for cursor-based pagination.

## Request schema (JSON Schema)

```json
{
 "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"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "number": {
       "type": "integer"
      },
      "items_count": {
       "type": "integer"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "number": 0,
    "end_block_number": 0,
    "data_availability": {
     "batch_data_container": "string"
    },
    "start_block_number": 0,
    "transactions_count": 0,
    "commitment_transaction": {
     "hash": "string",
     "timestamp": "string",
     "block_number": 0
    },
    "confirmation_transaction": {
     "hash": "string",
     "timestamp": "string",
     "block_number": 0
    }
   }
  ],
  "next_page_params": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockscout-scroll-batches-api-dbd4d0b3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.blockscout.com](https://www.zero.xyz/host/api.blockscout.com/llms.txt)
