---
title: "Get all blocks"
method: GET
path: "/{chainId}/blocks"
tags: ["blocks"]
---

# Get all blocks

`GET /{chainId}/blocks`

Retrieve all blocks

## Path parameters

- `chainId` string, required

## Query parameters

- `filter` string
- `group_by` string
- `sort_by` string
- `sort_order` string
- `page` integer
- `limit` integer
- `aggregate` string[]
- `force_consistent_data` boolean

## Response `200`

OK

- object — QueryResponse represents the response structure for a query
  - `aggregations` object[] — @Description Aggregation results
  - `data` CommonBlockModel[] — @Description Query result data
    - `base_fee_per_gas` integer
    - `block_hash` string
    - `block_number` integer
    - `block_timestamp` integer
    - `chain_id` string
    - `difficulty` string
    - `extra_data` string
    - `gas_limit` string
    - `gas_used` string
    - `logs_bloom` string
    - `miner` string
    - `mix_hash` string
    - `nonce` string
    - `parent_hash` string
    - `receipts_root` string
    - `sha3_uncles` string
    - `size` integer
    - `state_root` string
    - `total_difficulty` string
    - `transaction_count` integer
    - `transactions_root` string
    - `withdrawals_root` string
  - `meta` ApiMeta — Meta represents metadata for a query response
    - `address` string — @Description Contract address
    - `chain_id` integer — @Description Chain ID of the blockchain
    - `limit` integer — @Description Number of items per page
    - `page` integer — @Description Current page number
    - `signature` string — @Description Function or event signature
    - `total_items` integer — @Description Total number of items
    - `total_pages` integer — @Description Total number of pages

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

## Changes

- **2025-02-26** `e62eb392955d` — 1 info
  - endpoint added
- **2024-10-01** `8b52267689cc` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/thirdweb/apis/thirdweb-insight/changes/:chainId/blocks/get.md)

---

[API](https://skmtc.dev/thirdweb/apis/thirdweb-insight.md) · [All operations](https://skmtc.dev/thirdweb/apis/thirdweb-insight/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/thirdweb/thirdweb-insight/revisions/a0a466ab88d5/schema)
