Description
Retrieves raw EVM logs (event emissions) enriched with provenance metadata.
Parameters
Target EVM network. See the Chain enumeration for supported values.
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:
You must provide either a block range, a time range, or explicit selectors.
Providing more than one option (e.g., both ranges or ranges plus selectors) results in HTTP 400.
Providing none results in HTTP 400.
Direct Selectors
Explicit set of block numbers. Mutually exclusive with tx_hashes.
Filter logs by parent transaction hash (hex string, 32 bytes, no 0x prefix). Mutually exclusive with block_numbers.
Contract & Topic Filters
Filter by emitting contract address (hex string, 20 bytes, no 0x prefix).
Filter by the primary event topic. Anonymous events have topic_zero = null.
Recommended default 250; maximum 1000 to stay under ~10 MB responses.
Opaque pagination cursor supplied by a previous response.
Response Fields
EVM chain ID echoed at the response root.
Echo of request metadata applied to the response.
Block/timestamp bounds derived from the request.
Filters echoed from the request (block numbers, tx hashes, contract addresses, topics).
Data
Block height containing the log.
Keccak-256 hash of the block containing the log (32 bytes, hex string, no 0x prefix).
Block timestamp joined from the blocks table for easier aggregation.
Keccak-256 hash of the transaction emitting the log (32 bytes, hex string, no 0x prefix).
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
}'
{
"chain_id": 1,
"meta": {
"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_hash": "f78e26c5959a94d6a62ed3837f5dcecf0d3761bf0a502e12a08fd7bc44c8568d",
"block_time": "2025-11-11T18:42:15.123Z",
"tx_hash": "7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0",
"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,
"count": 1
}