---
agentTools:
  projectIndex: https://alphazk.readme.io/llms.txt
---

# Get Blocks

Returns the blocks for the given block range.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Aleo API",
    "version": "1.0",
    "description": "Aleo Rest API"
  },
  "servers": [
    {
      "url": "https://aleo-testnet3.alphazk.com/v1",
      "description": "Aleo Testnet III"
    }
  ],
  "paths": {
    "/blocks?start={start_height}&end={end_height}": {
      "summary": "Get Blocks",
      "description": "Returns the blocks for the given block range.",
      "get": {
        "summary": "",
        "parameters": [
          {
            "in": "path",
            "name": "start_height",
            "description": "The starting block height of the requested blocks",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "end_height",
            "description": "The ending block height of the requested blocks",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested blocks",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Schema for response of requested blocks",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "block_hash": {
                        "type": "string"
                      },
                      "previous_hash": {
                        "type": "string"
                      },
                      "header": {
                        "type": "object",
                        "properties": {
                          "previous_state_root": {
                            "type": "string"
                          },
                          "transactions_root": {
                            "type": "string"
                          },
                          "finalize_root": {
                            "type": "string"
                          },
                          "ratifications_root": {
                            "type": "string"
                          },
                          "solutions_root": {
                            "type": "string"
                          },
                          "subdag_root": {
                            "type": "string"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "network": {
                                "type": "number"
                              },
                              "round": {
                                "type": "number"
                              },
                              "height": {
                                "type": "number"
                              },
                              "cumulative_weight": {
                                "type": "number"
                              },
                              "cumulative_proof_target": {
                                "type": "number"
                              },
                              "coinbase_target": {
                                "type": "number"
                              },
                              "proof_target": {
                                "type": "number"
                              },
                              "last_coinbase_target": {
                                "type": "number"
                              },
                              "last_coinbase_timestamp": {
                                "type": "number"
                              },
                              "timestamp": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      },
                      "authority": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "subdag": {
                            "type": "object",
                            "properties": {
                              "subdag": {
                                "type": "object",
                                "properties": {
                                  "575278": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "batch_header": {
                                          "type": "object",
                                          "properties": {
                                            "batch_id": {
                                              "type": "string"
                                            },
                                            "author": {
                                              "type": "string"
                                            },
                                            "round": {
                                              "type": "number"
                                            },
                                            "timestamp": {
                                              "type": "number"
                                            },
                                            "transmission_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "previous_certificate_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "signature": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "signatures": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "575279": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "batch_header": {
                                          "type": "object",
                                          "properties": {
                                            "batch_id": {
                                              "type": "string"
                                            },
                                            "author": {
                                              "type": "string"
                                            },
                                            "round": {
                                              "type": "number"
                                            },
                                            "timestamp": {
                                              "type": "number"
                                            },
                                            "transmission_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "previous_certificate_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "signature": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "signatures": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "575280": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "batch_header": {
                                          "type": "object",
                                          "properties": {
                                            "batch_id": {
                                              "type": "string"
                                            },
                                            "author": {
                                              "type": "string"
                                            },
                                            "round": {
                                              "type": "number"
                                            },
                                            "timestamp": {
                                              "type": "number"
                                            },
                                            "transmission_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "previous_certificate_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "signature": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "signatures": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "575281": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "batch_header": {
                                          "type": "object",
                                          "properties": {
                                            "batch_id": {
                                              "type": "string"
                                            },
                                            "author": {
                                              "type": "string"
                                            },
                                            "round": {
                                              "type": "number"
                                            },
                                            "timestamp": {
                                              "type": "number"
                                            },
                                            "transmission_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "previous_certificate_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "signature": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "signatures": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "575282": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "batch_header": {
                                          "type": "object",
                                          "properties": {
                                            "batch_id": {
                                              "type": "string"
                                            },
                                            "author": {
                                              "type": "string"
                                            },
                                            "round": {
                                              "type": "number"
                                            },
                                            "timestamp": {
                                              "type": "number"
                                            },
                                            "transmission_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "previous_certificate_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "signature": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "signatures": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "575283": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "batch_header": {
                                          "type": "object",
                                          "properties": {
                                            "batch_id": {
                                              "type": "string"
                                            },
                                            "author": {
                                              "type": "string"
                                            },
                                            "round": {
                                              "type": "number"
                                            },
                                            "timestamp": {
                                              "type": "number"
                                            },
                                            "transmission_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "previous_certificate_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "signature": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "signatures": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "575284": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "batch_header": {
                                          "type": "object",
                                          "properties": {
                                            "batch_id": {
                                              "type": "string"
                                            },
                                            "author": {
                                              "type": "string"
                                            },
                                            "round": {
                                              "type": "number"
                                            },
                                            "timestamp": {
                                              "type": "number"
                                            },
                                            "transmission_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "previous_certificate_ids": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            },
                                            "signature": {
                                              "type": "string"
                                            }
                                          }
                                        },
                                        "signatures": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "ratifications": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            },
                            "amount": {
                              "type": "number"
                            }
                          }
                        }
                      },
                      "transactions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "index": {
                              "type": "number"
                            },
                            "transaction": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "execution": {
                                  "type": "object",
                                  "properties": {
                                    "transitions": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "program": {
                                            "type": "string"
                                          },
                                          "function": {
                                            "type": "string"
                                          },
                                          "inputs": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                },
                                                "id": {
                                                  "type": "string"
                                                },
                                                "value": {
                                                  "type": "string"
                                                }
                                              }
                                            }
                                          },
                                          "outputs": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string"
                                                },
                                                "id": {
                                                  "type": "string"
                                                },
                                                "value": {
                                                  "type": "string"
                                                }
                                              }
                                            }
                                          },
                                          "tpk": {
                                            "type": "string"
                                          },
                                          "tcm": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    },
                                    "global_state_root": {
                                      "type": "string"
                                    },
                                    "proof": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "fee": {
                                  "type": "object",
                                  "properties": {
                                    "transition": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "program": {
                                          "type": "string"
                                        },
                                        "function": {
                                          "type": "string"
                                        },
                                        "inputs": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string"
                                              },
                                              "id": {
                                                "type": "string"
                                              },
                                              "value": {
                                                "type": "string"
                                              }
                                            }
                                          }
                                        },
                                        "outputs": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string"
                                              },
                                              "id": {
                                                "type": "string"
                                              },
                                              "value": {
                                                "type": "string"
                                              }
                                            }
                                          }
                                        },
                                        "tpk": {
                                          "type": "string"
                                        },
                                        "tcm": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "global_state_root": {
                                      "type": "string"
                                    },
                                    "proof": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            },
                            "finalize": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "mapping_id": {
                                    "type": "string"
                                  },
                                  "index": {
                                    "type": "number"
                                  },
                                  "key_id": {
                                    "type": "string"
                                  },
                                  "value_id": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "aborted_transaction_ids": {
                        "type": "array",
                        "items": {}
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyHeader": {
        "type": "apiKey",
        "description": "API Key in header",
        "name": "apikey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "apiKeyHeader": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 73,
      "2": 184,
      "3": 211,
      "4": 33,
      "5": 45,
      "6": 128,
      "7": 0,
      "8": 12,
      "9": 45,
      "10": 70,
      "11": 68
    }
  }
}
```