Documentation / API reference / Block
Get Block Number Over Interval
Last reviewed 2026-09-18
Returns block numbers and timestamps sampled at hourly or daily intervals within a requested time range. Use this to map a reporting period to indexed blocks.
Try it
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
timestamp_start | query | integer (int64) | Yes | Start of timestamp range in Unix timestamp (seconds since 1970-01-01) (inclusive) |
timestamp_end | query | integer (int64) | Yes | End of timestamp range in Unix timestamp (seconds since 1970-01-01) (inclusive) |
frequency | query | string | Default by_day One of by_hour, by_day. | |
page | query | integer (int32) | The page number of the response. | |
limit | query | integer (int32) | The number of responses. max is 200, | |
order | query | string | One of date_asc, date_desc. |
Responses
200 — Blocks retrieved successfully
| Field | Type | Required |
|---|---|---|
data | array | Yes |
data[].block_number | integer (int32) | Yes |
data[].timestamp | string (date-time) | Yes |
pagination | object | Yes |
pagination.current_page | integer (int32) | Yes |
pagination.next_page | integer (int32), nullable | |
pagination.per_page | integer (int32) | Yes |
pagination.prev_page | integer (int32), nullable | |
pagination.total_items | integer (int32) | Yes |
pagination.total_pages | integer (int32) | Yes |
Example response
json
{
"data": [
{
"block_number": 5007431,
"timestamp": "2025-02-25T23:59:48Z"
},
{
"block_number": 5000231,
"timestamp": "2025-02-24T23:59:48.001Z"
}
],
"pagination": {
"current_page": 1,
"next_page": null,
"per_page": 50,
"prev_page": null,
"total_items": 5,
"total_pages": 1
}
}Response details
text
{
"block_number": 5451731,
"timestamp": "2025-04-28T16:59:48Z"
},Other responses
| Status | Meaning |
|---|---|
400 | Bad request |
404 | Blocks not found |
500 | Internal server error |
Every request needs an Authorization header holding your API key — see Getting started with the Taostats API.