searchForBlockHeaders - Algorand

Search for block headers. Block headers are returned in ascending round order. Transactions are not included in the output.

Endpoint

httpGET /v2/block-headers

Query Parameters

ParameterTypeRequiredDescription
limitintegerOptionalMaximum number of results to return. There could be additional pages even if the limit is not reached.
nextstringOptionalThe next page of results. Use the next token provided by the previous results.
min-roundintegerOptionalInclude results at or after the specified min-round.
max-roundintegerOptionalInclude results at or before the specified max-round.
before-timestringOptionalInclude results before the given time. Must be an RFC 3339 formatted string.
after-timestringOptionalInclude results after the given time. Must be an RFC 3339 formatted string.
proposersarrayOptionalAccounts marked as proposer in the block header's participation updates. This parameter accepts a comma separated list of addresses.
expiredarrayOptionalAccounts marked as expired in the block header's participation updates. This parameter accepts a comma separated list of addresses.
absentarrayOptionalAccounts marked as absent in the block header's participation updates. This parameter accepts a comma separated list of addresses.

Example

bashexport ALGO_INDEXER=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl "${ALGO_INDEXER}v2/block-headers"

Response

Returns application/json. Top-level fields:

FieldTypeDescription
blocksarray—
current-roundintegerRound at which the results were computed.
next-tokenstringUsed for pagination, when making another request provide this token with the next parameter.

Error Handling

ErrorMessageDescription
400Bad requestA parameter was missing or malformed
404Not foundThe requested resource does not exist
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect