curl -X POST "https://api.blockdb.io/v1/evm/raw/logs" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"block_numbers": [
12345678,
12345679
],
"tx_hashes": [
"7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0"
],
"contract_addresses": [
"0000000000000000000000000000000000000000"
],
"topic_zeros": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
],
"limit": 200,
"cursor": null
}'
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"filters": {
"block_numbers": [
12345678,
12345679
],
"tx_hashes": [
"7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0"
],
"contract_addresses": [
"0000000000000000000000000000000000000000"
],
"topic_zeros": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
},
"data": [
{
"block_number": 12345678,
"block_time": "2025-11-11T18:42:15.123Z",
"tx_index": 4,
"log_index": 0,
"contract_address": "0000000000000000000000000000000000000000",
"topic_zero": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"data_topics": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "00000000000000000000000000000000000000000000000000000000000003e8",
"_tracing_id": "0103000000000000000000000000000000000000",
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
Primitives
Logs
Query decoded EVM log events with flexible topic filters.
POST
/
v1
/
evm
/
raw
/
logs
curl -X POST "https://api.blockdb.io/v1/evm/raw/logs" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"block_numbers": [
12345678,
12345679
],
"tx_hashes": [
"7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0"
],
"contract_addresses": [
"0000000000000000000000000000000000000000"
],
"topic_zeros": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
],
"limit": 200,
"cursor": null
}'
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"filters": {
"block_numbers": [
12345678,
12345679
],
"tx_hashes": [
"7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0"
],
"contract_addresses": [
"0000000000000000000000000000000000000000"
],
"topic_zeros": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
},
"data": [
{
"block_number": 12345678,
"block_time": "2025-11-11T18:42:15.123Z",
"tx_index": 4,
"log_index": 0,
"contract_address": "0000000000000000000000000000000000000000",
"topic_zero": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"data_topics": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "00000000000000000000000000000000000000000000000000000000000003e8",
"_tracing_id": "0103000000000000000000000000000000000000",
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
Overview
- Dataset ID:
0103 - Logs - Description: Event logs emitted by contract transactions.
- CSV Sample: Download
- JSON Sample: Download
Parameters
Range Filters (mutually exclusive)
Starting block number (inclusive) for the query. Use with
to_block.Ending block number (inclusive) for the query. Use with
from_block.Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with
to_timestamp.Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with
from_timestamp.Validation rule:
Every request must include at least one primary criterion: a block range (
Providing none of the above results in HTTP 400.
Every request must include at least one primary criterion: a block range (
from_block/to_block), a time range (from_timestamp/to_timestamp), block_numbers, or tx_hashes. A block range and a time range are mutually exclusive, as are block_numbers and tx_hashes.contract_addresses and topic_zeros are refinement filters that require a block range or time range specifically — they cannot be used on their own, and a block_numbers/tx_hashes set does not satisfy this (an unbounded scan over a hot contract or topic would time out).Providing none of the above results in HTTP 400.
Bounding Windows
Explicit set of block numbers (a bounding window). Mutually exclusive with
tx_hashes.Filter logs by parent transaction hash (hex string, 32 bytes, no
0x prefix); a bounding window. Mutually exclusive with block_numbers.Contract & Topic Filters
Filter by emitting contract address (hex string, 20 bytes, no
0x prefix). Requires a block range or time range.Filter by the primary event topic. Anonymous events have
topic_zero = null. Requires a block range or time range.Pagination Controls
Recommended default
250; maximum 1000 to stay under ~10 MB responses.Opaque pagination cursor supplied by a previous response.
Response Fields
Meta
Echo of request metadata applied to the response.
EVM chain ID echoed from the request.
Pure echo of the window you sent (
from_block/to_block/from_timestamp/to_timestamp); unset bounds are null.The concrete window the query actually executed against, after resolving the request. For a block range on a time-bucketed endpoint (OHLC/VWAP/VWAP-aggregate/fiat VWAP),
from_timestamp/to_timestamp hold the resolved timestamp window (and from_block/to_block echo your request). For a time range on a block-keyed endpoint, from_block/to_block hold the resolved block range (and the timestamps echo your request). null for selector-only requests (no window). No extra database work is done — these are the values the query already computed.Resolved/echoed start block of the executed window.
Resolved/echoed end block of the executed window.
Resolved/echoed start timestamp (ISO-8601) of the executed window.
Resolved/echoed end timestamp (ISO-8601) of the executed window.
Filters echoed from the request (block numbers, tx hashes, contract addresses, topics).
Data
Each element mirrors the table columns (chain implied by
meta.chain_id). Resolve transaction hash via block_number + tx_index and the transactions dataset if needed — there is no tx_hash column in SQL.Block height containing the log.
Block timestamp joined from the
blocks table for easier aggregation.Zero-based index of the parent transaction within the block.
Position of the log within the transaction.
Address of the emitting contract (20 bytes).
Primary topic hash identifying the event (32 bytes).
null for anonymous events.Subsequent event topics (
topics[1..n]), each stored as a 32-byte hex string.Raw event data payload (hex string (no
0x prefix)).Tracing identifier for the canonical transaction record (hex string, no
0x prefix).Record creation timestamp.
Record last update timestamp.
Envelope Fields
Cursor token for pagination.
Number of records returned in
data.curl -X POST "https://api.blockdb.io/v1/evm/raw/logs" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z",
"block_numbers": [
12345678,
12345679
],
"tx_hashes": [
"7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0"
],
"contract_addresses": [
"0000000000000000000000000000000000000000"
],
"topic_zeros": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
],
"limit": 200,
"cursor": null
}'
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 12345678,
"to_block": 12345999,
"from_timestamp": "2025-10-29T00:00:00Z",
"to_timestamp": "2025-11-11T00:00:00Z"
},
"filters": {
"block_numbers": [
12345678,
12345679
],
"tx_hashes": [
"7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0"
],
"contract_addresses": [
"0000000000000000000000000000000000000000"
],
"topic_zeros": [
"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
},
"data": [
{
"block_number": 12345678,
"block_time": "2025-11-11T18:42:15.123Z",
"tx_index": 4,
"log_index": 0,
"contract_address": "0000000000000000000000000000000000000000",
"topic_zero": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"data_topics": [
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "00000000000000000000000000000000000000000000000000000000000003e8",
"_tracing_id": "0103000000000000000000000000000000000000",
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
Last modified on May 29, 2026
Was this page helpful?
⌘I