---
title: "EpochsInfo queries the metadata of epochs in a given range, depending on the parameters in the pagination request. Th main use case will be querying the latest epochs in time order."
method: GET
path: "/babylon/epoching/v1/epochs"
tags: ["Query"]
---

# EpochsInfo queries the metadata of epochs in a given range, depending on the parameters in the pagination request. Th main use case will be querying the latest epochs in time order.

`GET /babylon/epoching/v1/epochs`

## Request

- The document declares no server URL.
- Auth: none declared

## Query parameters

- `pagination.key` string, byte
- `pagination.offset` string, uint64
- `pagination.limit` string, uint64
- `pagination.count_total` boolean
- `pagination.reverse` boolean

## Response `200`

A successful response.

- object
  - `epochs` object[]
    - `epoch_number` string, uint64
    - `current_epoch_interval` string, uint64
    - `first_block_height` string, uint64
    - `last_block_time` string, date-time: last_block_time is the time of the last block in this epoch. Babylon needs to remember the last header's time of each epoch to complete unbonding validators/delegations when a previous epoch's checkpoint is finalised. The last_block_time field is nil in the epoch's beginning, and is set upon the end of this epoch.
    - `sealer_app_hash_hex` string: sealer is the last block of the sealed epoch sealer_app_hash points to the sealer but stored in the 1st header of the next epoch as hex string.
    - `sealer_block_hash` string: sealer_block_hash is the hash of the sealer the validator set has generated a BLS multisig on the hash, i.e., hash of the last block in the epoch as hex string.
  - `pagination` object: PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
    - `next_key` string, byte: next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results.
    - `total` string, uint64

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs.md) - [All operations](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/babylonlabs-io/apis/babylon-grpc-gateway-docs/revisions/93a09c641887?raw)
