---
updatedAt: 2025-06-11T20:38:33.000Z
agentTools:
  projectIndex: https://docs.allthatnode.com/llms.txt
---

# Get block results at a specified height

Get block_results.

If the `height` field is set to a non-default value, upon success, the
`Cache-Control` header will be set with the default maximum age.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "CometBFT RPC",
    "contact": {
      "name": "CometBFT",
      "url": "https://cometbft.com/"
    },
    "description": "CometBFT supports the following RPC protocols:\n\n* URI over HTTP\n* JSONRPC over HTTP\n* JSONRPC over websockets\n\n## Configuration\n\nRPC can be configured by tuning parameters under `[rpc]` table in the\n`$CMTHOME/config/config.toml` file or by using the `--rpc.X` command-line\nflags.\n\nThe default RPC listen address is `tcp://127.0.0.1:26657`.\nTo set another address, set the `laddr` config parameter to desired value.\nCORS (Cross-Origin Resource Sharing) can be enabled by setting\n`cors_allowed_origins`, `cors_allowed_methods`, `cors_allowed_headers`\nconfig parameters.\n\nIf testing using a local RPC node, under the `[rpc]`\nsection change the `cors_allowed_origins` property, please add the URL of\nthe site where this OpenAPI document is running, for example:\n\n  `cors_allowed_origins = [\"http://localhost:8088\"]`\n\nor if testing from the official documentation site:\n\n  `cors_allowed_origins = [\"https://docs.cometbft.com\"]`\n\n## Arguments\n\nArguments which expect strings or byte arrays may be passed as quoted\nstrings, like `\"abc\"` or as `0x`-prefixed strings, like `0x616263`.\n\n## URI/HTTP\n\nA REST like interface.\n\n    curl localhost:26657/block?height=5\n\n## JSONRPC/HTTP\n\nJSONRPC requests can be POST'd to the root RPC endpoint via HTTP.\n\n    curl --header \"Content-Type: application/json\" --request POST --data '{\"method\": \"block\", \"params\": [\"5\"], \"id\": 1}' localhost:26657\n\n## JSONRPC/websockets\n\nJSONRPC requests can be also made via websocket.\nThe websocket endpoint is at `/websocket`, e.g. `localhost:26657/websocket`.\nAsynchronous RPC functions like event `subscribe` and `unsubscribe` are\nonly available via websockets.\n\nFor example using the [websocat](https://github.com/vi/websocat) tool, you can subscribe for 'NewBlock` events\nwith the following command:\n\n    echo '{ \"jsonrpc\": \"2.0\",\"method\": \"subscribe\",\"id\": 0,\"params\": {\"query\": \"tm.event='\"'NewBlock'\"'\"} }' | websocat -n -t ws://127.0.0.1:26657/websocket\n",
    "version": "v0.38.x",
    "license": {
      "name": "Apache 2.0",
      "url": "https://github.com/cometbft/cometbft/blob/v0.38.x/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://rpc.cosmos.directory/cosmoshub",
      "description": "Interact with the CometBFT RPC from a public node in the Cosmos registry"
    },
    {
      "url": "http://localhost:26657",
      "description": "Interact with CometBFT RPC node running locally"
    }
  ],
  "tags": [
    {
      "name": "Info",
      "description": "Informations about the node APIs"
    }
  ],
  "paths": {
    "/block_results": {
      "get": {
        "summary": "Get block results at a specified height",
        "operationId": "block_results",
        "parameters": [
          {
            "in": "query",
            "name": "height",
            "description": "height to return. If no height is provided, it will fetch information regarding the latest block.",
            "schema": {
              "type": "integer",
              "default": 0,
              "example": 1
            }
          }
        ],
        "tags": [
          "Info"
        ],
        "description": "Get block_results.\n\nIf the `height` field is set to a non-default value, upon success, the\n`Cache-Control` header will be set with the default maximum age.\n",
        "responses": {
          "200": {
            "description": "Block results.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlockResultsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JSONRPC": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 0
          },
          "jsonrpc": {
            "type": "string",
            "example": "2.0"
          }
        }
      },
      "ErrorResponse": {
        "description": "Error Response",
        "allOf": [
          {
            "$ref": "#/components/schemas/JSONRPC"
          },
          {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "example": "Description of failure"
              }
            }
          }
        ]
      },
      "BlockResultsResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "result"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "example": "2.0"
          },
          "id": {
            "type": "integer",
            "example": 0
          },
          "result": {
            "type": "object",
            "required": [
              "height"
            ],
            "properties": {
              "height": {
                "type": "string",
                "example": "12"
              },
              "txs_results": {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "0"
                    },
                    "data": {
                      "type": "string",
                      "example": ""
                    },
                    "log": {
                      "type": "string",
                      "example": "not enough gas"
                    },
                    "info": {
                      "type": "string",
                      "example": ""
                    },
                    "gas_wanted": {
                      "type": "string",
                      "example": "100"
                    },
                    "gas_used": {
                      "type": "string",
                      "example": "100"
                    },
                    "events": {
                      "type": "array",
                      "nullable": true,
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "example": "app"
                          },
                          "attributes": {
                            "type": "array",
                            "nullable": false,
                            "items": {
                              "$ref": "#/components/schemas/Event"
                            }
                          }
                        }
                      }
                    },
                    "codespace": {
                      "type": "string",
                      "example": "ibc"
                    }
                  }
                }
              },
              "finalize_block_events": {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "app"
                    },
                    "attributes": {
                      "type": "array",
                      "nullable": false,
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    }
                  }
                }
              },
              "validator_updates": {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "object",
                  "properties": {
                    "pub_key": {
                      "type": "object",
                      "required": [
                        "type",
                        "value"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "tendermint/PubKeyEd25519"
                        },
                        "value": {
                          "type": "string",
                          "example": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
                        }
                      }
                    },
                    "power": {
                      "type": "string",
                      "example": "300"
                    }
                  }
                }
              },
              "consensus_param_updates": {
                "$ref": "#/components/schemas/ConsensusParams"
              }
            }
          }
        }
      },
      "ConsensusParams": {
        "type": "object",
        "nullable": true,
        "required": [
          "block",
          "evidence",
          "validator"
        ],
        "properties": {
          "block": {
            "type": "object",
            "required": [
              "max_bytes",
              "max_gas",
              "time_iota_ms"
            ],
            "properties": {
              "max_bytes": {
                "type": "string",
                "example": "22020096"
              },
              "max_gas": {
                "type": "string",
                "example": "1000"
              },
              "time_iota_ms": {
                "type": "string",
                "example": "1000"
              }
            }
          },
          "evidence": {
            "type": "object",
            "required": [
              "max_age"
            ],
            "properties": {
              "max_age": {
                "type": "string",
                "example": "100000"
              }
            }
          },
          "validator": {
            "type": "object",
            "required": [
              "pub_key_types"
            ],
            "properties": {
              "pub_key_types": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "ed25519"
                ]
              }
            }
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "action"
          },
          "value": {
            "type": "string",
            "example": "send"
          },
          "index": {
            "type": "boolean",
            "example": false
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```