Skip to main content

block_search REST API Endpoint

Searches for blocks by BeginBlock and EndBlock events.

Updated on
Apr 15, 2024

block_search REST API Endpoint

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
prove
boolean
REQUIRED
Adds proofs of the transactions inclusion in the block
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 transactions are sorted (asc or desc), by height & index. If empty, default asc sorting still applies
match_events
boolean
Matches attributes in query within events, in addition to the height and txhash

Returns

result
object
The result object with the following fields:
txs
array
An array of txs
hash
The hash of the transaction
height
The height at which the transaction was included
index
The index of the transaction
tx_result
object
The tx_result object which contains the following fields:
log
The log information of the transaction
gas_wanted
Gas limit specified by the transaction
gas_used
Gas consumed by the transaction
tags
object
The tags object which contains the following fields:
key
The key associated with the tag
value
The value associated with the tag
index
The index of the tag
tx
The base64 encoded representation of the transaction
proof
object
The proof object which contains the following fields:
RootHash
The root hash of the Merkle tree
Data
The base64 encoded data
Proof
object
The Proof object which contains the following fields:
total
The total number of elements in the proof
index
The index of the proof
leaf_hash
The hash of the leaf node
aunts
The list of aunt hashes
total_count
The total count of blocks
Request
1
curl --location 'https://docs-demo.sei-pacific.quiknode.pro/block_search?query=YOUR_QUERY&prove=true&page=1&per_page=30&order_by=asc'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free