Skip to main content

block_search REST API Endpoint

Searches for blocks by BeginBlock and EndBlock events.

Updated on
May 15, 2024

Query Parameters

query
string
REQUIRED

query is a string, which has a form: 'condition AND condition ...' (no OR at the moment). condition has a form: 'key operation operand'. key is a string with a restricted set of possible symbols (

()'=>< are not allowed). operation can be =, <, <=, >, >=, CONTAINS. An operand can be a string (escaped with single quotes), number, date, or time

page
integer
REQUIRED

The page number (1-based). The default value is 1

per_page
integer
REQUIRED

The number of entries per page. The default value is 30

order_by
string
REQUIRED

The order in which blocks are sorted (asc or desc), by height. If empty, default asc sorting still applies

match_events
boolean

Matches attributes in query within events, in addition to the height and txhash

Returns

blocks
array

An array of matching blocks

block_id
object

The block ID object containing the hash and parts

block
object

The full block object including header, data, evidence, and last commit

total_count

The total count of matching blocks

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free