---
title: "Get block by hash or number"
method: GET
path: "/api/v1/blocks/{hashOrNumber}"
tags: ["blocks"]
---

# Get block by hash or number

`GET /api/v1/blocks/{hashOrNumber}`

Returns the block information by given hash or number.

## Path parameters

- `hashOrNumber` string, required

## Response `200`

OK

- Block
  - `count` integer
  - `gas_used` integer, nullable
  - `hapi_version` string, nullable
  - `hash` string
  - `logs_bloom` string, nullable — A hex encoded 256-byte array with 0x prefix
  - `name` string
  - `number` integer
  - `previous_hash` string
  - `size` integer, nullable
  - `timestamp` TimestampRange — A timestamp range an entity is valid for
    - `from` string — The inclusive from timestamp in seconds
    - `to` string, nullable — The exclusive to timestamp in seconds

## Other responses

- `400` — Invalid parameter
- `404` — Not Found

---

[API](https://skmtc.dev/hedera/apis/mirror-node-rest-api.md) · [All operations](https://skmtc.dev/hedera/apis/mirror-node-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hedera/mirror-node-rest-api/revisions/45f5ccac560c/schema)
