> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# zks_getL1BatchBlockRange | zkSync Era

> The zks_getL1BatchBlockRange API method is designed to provide the range of blocks within a specific zkSync network batch. On zkSync Era.

The `zks_getL1BatchBlockRange` API method is designed to provide the range of blocks within a specific zkSync network batch. Given a batch number, it returns the starting and ending block numbers in hexadecimal format.

## Parameters

* `batch` — an `L1BatchNumber` representing the [batch number](https://explorer.zksync.io/batch/443314) for which the block range is being requested.

## Response

The response provides the starting and ending block numbers of the specified batch, returned as hexadecimal strings:

* `result` — the block range is returned as an array containing two elements: the starting and ending block numbers in hexadecimal format.

<Note>
  You can use the Chainstack [EVM Swiss Army Knife](https://web3tools.chainstacklabs.com/) to convert values.
</Note>

## Use case

A developer creating a security audit tool for DeFi applications on zkSync could use `zks_getL1BatchBlockRange` to monitor and analyze transactions within specific batches. This enables timely detection of suspicious patterns or anomalies, enhancing the application's security by ensuring transactions align with expected behavior and regulatory compliance.


## OpenAPI

````yaml openapi/zksync_node_api/zks_getL1BatchBlockRange.json POST /afb8312f3710a5bc469f4c87cad3a2e4
openapi: 3.0.0
info:
  title: JSON-RPC API
  version: 1.0.0
servers:
  - url: https://nd-995-911-243.p2pify.com
security: []
paths:
  /afb8312f3710a5bc469f4c87cad3a2e4:
    post:
      summary: zks_getL1BatchBlockRange | zkSync Era
      operationId: zks_getL1BatchBlockRange
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequestForL1BatchBlockRange'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponseForL1BatchBlockRange'
components:
  schemas:
    JsonRpcRequestForL1BatchBlockRange:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
      properties:
        jsonrpc:
          type: string
          example: '2.0'
          default: '2.0'
        id:
          type: integer
          example: 1
          default: 1
        method:
          type: string
          example: zks_getL1BatchBlockRange
          default: zks_getL1BatchBlockRange
        params:
          type: array
          default:
            - 443314
          items:
            type: integer
            example: 443314
            default: 443314
    JsonRpcResponseForL1BatchBlockRange:
      type: object
      required:
        - jsonrpc
        - id
        - result
      properties:
        jsonrpc:
          type: string
          example: '2.0'
          default: '2.0'
        id:
          type: integer
          default: 1
        result:
          type: object
          properties:
            startBlock:
              type: integer
              description: The starting block number of the L1 batch.
            endBlock:
              type: integer
              description: The ending block number of the L1 batch.

````