---
updatedAt: 2026-07-31T20:29:59.000Z
agentTools:
  projectIndex: https://docs.blockberry.one/llms.txt
---

# getBlocks

Get a list of all blocks (both canonical and orphaned) on the Mina Blockchain.
Orphaned blocks are blocks that didn’t enter the canonical chain. Transactions that enter orphaned blocks are failed and wait to be executed until they’re added in a canonical block.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Mina Mesa API",
    "description": "Mina Mesa (testnet) public REST API by Minascan / Blockberry.",
    "termsOfService": "https://blockberry.one/terms",
    "contact": {
      "name": "Staketab tech support",
      "url": "https://staketab.com/",
      "email": "support@staketab.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.blockberry.one/mina-mesa",
      "description": "Production"
    }
  ],
  "security": [
    {
      "x-api-key": []
    }
  ],
  "paths": {
    "/v1/blocks": {
      "get": {
        "tags": [
          "Blocks"
        ],
        "summary": "getBlocks",
        "description": "Get a list of all blocks (both canonical and orphaned) on the Mina Blockchain.\nOrphaned blocks are blocks that didn’t enter the canonical chain. Transactions that enter orphaned blocks are failed and wait to be executed until they’re added in a canonical block.",
        "operationId": "getBlocks",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Queried API page.",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Number of queried entries.",
            "required": true,
            "schema": {
              "maximum": 50,
              "minimum": 1,
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "orderBy",
            "in": "query",
            "description": "Sorting method: from the lowest element to the highest (ASC) or from the highest element to the lowest (DESC).",
            "required": true,
            "schema": {
              "type": "string",
              "default": "DESC",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "address",
            "in": "query",
            "description": "Address of the queried block producer (validator).",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "B62qqD7eMRc6Ki9jntgg89oKeAoWAbTLAGmuQym9j9HekVfrYspNfHD"
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Select sorting parameter.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "HEIGHT",
              "enum": [
                "HEIGHT",
                "TIMESTAMP",
                "SLOT",
                "HEIGHT",
                "TIMESTAMP",
                "SLOT"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Select the queried block type.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "ALL",
              "enum": [
                "CANONICAL",
                "ORPHANED",
                "ALL",
                "ALL",
                "CANONICAL",
                "ORPHANED"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CutPageBlocks"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PageableObject": {
        "type": "object",
        "properties": {
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "paged": {
            "type": "boolean"
          },
          "unpaged": {
            "type": "boolean"
          }
        }
      },
      "SortObject": {
        "type": "object",
        "properties": {
          "sorted": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          },
          "unsorted": {
            "type": "boolean"
          }
        }
      },
      "Blocks": {
        "type": "object",
        "properties": {
          "stateHash": {
            "type": "string"
          },
          "parentHash": {
            "type": "string"
          },
          "ledgerHash": {
            "type": "string"
          },
          "blockHeight": {
            "type": "integer",
            "format": "int64"
          },
          "slot": {
            "type": "integer",
            "format": "int64"
          },
          "epoch": {
            "type": "integer",
            "format": "int64"
          },
          "globalSlotSinceGenesis": {
            "type": "integer",
            "format": "int64"
          },
          "timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "accountAddress": {
            "type": "string"
          },
          "accountName": {
            "type": "string"
          },
          "accountImg": {
            "type": "string"
          },
          "transactionsCount": {
            "type": "integer",
            "format": "int64"
          },
          "zkappTransactionsCount": {
            "type": "integer",
            "format": "int64"
          },
          "coinbase": {
            "type": "number"
          },
          "isCanonical": {
            "type": "boolean"
          },
          "snarkersCount": {
            "type": "integer",
            "format": "int64"
          },
          "snarkJobsCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "CutPageBlocks": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "writeOnly": true,
            "items": {
              "$ref": "#/components/schemas/Blocks"
            }
          },
          "currentPage": {
            "type": "integer",
            "format": "int32",
            "writeOnly": true
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int64",
            "writeOnly": true
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Blocks"
            }
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "last": {
            "type": "boolean"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "first": {
            "type": "boolean"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "empty": {
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "x-api-key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  }
}
```