Home
Aptos
Get_Block_By_Height
Get_Block_By_Height
This endpoint allows you to get the transactions in a block
and the corresponding block information.
Transactions are limited by max default transactions size. If not all transactions
are present, the user will need to query for the rest of the transactions via the
get transactions API.
If the block is pruned, it will return a 410
Blocks
Get_Block_By_Height is an example object payload from Aptos, with 9 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
Top-level fields
method path operationId summary description tags parameters requestBody responses
Example Payload
{
"method": "GET",
"path": "/blocks/by_height/{block_height}",
"operationId": "get_block_by_height",
"summary": "Get blocks by height",
"description": "This endpoint allows you to get the transactions in a block\nand the corresponding block information.\n\nTransactions are limited by max default transactions size. If not all transactions\nare present, the user will need to query for the rest of the transactions via the\nget transactions API.\n\nIf the block is pruned, it will return a 410",
"tags": [
"Blocks"
],
"parameters": [
{
"name": "block_height",
"in": "path",
"required": true,
"description": "Block height to lookup. Starts at 0",
"schema": {
"type": "integer",
"format": "uint64"
}
},
{
"name": "with_transactions",
"in": "query",
"required": false,
"description": "If set to true, include all transactions in the block\n\nIf not provided, no transactions will be retrieved",
"schema": {
"type": "boolean"
}
}
],
"requestBody": null,
"responses": {
"200": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/Block"
},
"example": {}
},
"400": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/AptosError"
},
"example": {}
},
"403": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/AptosError"
},
"example": {}
},
"404": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/AptosError"
},
"example": {}
},
"410": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/AptosError"
},
"example": {}
},
"500": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/AptosError"
},
"example": {}
},
"503": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/AptosError"
},
"example": {}
}
}
}
Every example here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for examples
4 MCP tools reach this
find_examplesBrowse and filter every example in the catalog.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This example
curl "https://apis.io/api/v1/examples/get_block_by_height"
All examples
curl "https://apis.io/api/v1/examples?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms .
A second provider on the same verified email joins the account you already have.