---
title: "Get block by number or hash"
method: GET
path: "/api/v2/polygon/blocks/{block_number}"
tags: ["Polygon Blockchain Queries"]
---

# Get block by number or hash

`GET /api/v2/polygon/blocks/{block_number}`

This Method returns the block by its number

## Headers

- `X-Network` 'testnet' | 'mainnet'
- `Authorization` string, required
- `Content-Type` 'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data'

## Response `200`

- union
  - object — Block fetched
    - `status` integer
    - `ok` boolean
    - `message` string
    - `data` object
      - `difficulty` integer
      - `extraData` string
      - `gasLimit` integer
      - `gasUsed` string
      - `hash` string
      - `logsBloom` string
      - `miner` string
      - `mixHash` string
      - `nonce` string
      - `number` integer
      - `parentHash` string
      - `receiptsRoot` string
      - `sha3Uncles` string
      - `size` integer
      - `stateRoot` string
      - `timestamp` string
      - `totalDifficulty` integer
      - `transactions` object[]
        - `blockHash` string
        - `blockNumber` string
        - `from` string
        - `gas` string
        - `gasPrice` string
        - `hash` string
        - `input` string
        - `nonce` string
        - `to` string
        - `transactionIndex` string
        - `value` string
        - `type` string
        - `chainId` string
        - `v` string
        - `r` string
        - `s` string
      - `transactionsRoot` string
      - `uncles` unknown[]
        - unknown
  - object, nullable

---

[API](https://skmtc.net/chaingateway/apis/chaingateway-api-documentation.md) · [All operations](https://skmtc.net/chaingateway/apis/chaingateway-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chaingateway/chaingateway-api-documentation/revisions/ddb709b4ade7/schema)
