GET /api/logs
Summary: Event Logs by Address
Operation ID: getLogs
Auth: api_key
Operation ID: getLogs
Auth: api_key
Description
Get event logs from a specific contract address. Supports filtering by topics and block range. Maximum 1000 results per query.
Parameters (11)
action
(string, query, required)
Constraints: {'enum': ['getLogs']}
address
(string, query, optional)
Contract address to get logs from
apikey
(string, query, required)
Your Etherscan API key (obtain free key at https://etherscan.io/apis)
chainid
(string, query, required)
Chain ID (1=Ethereum Mainnet, 11155111=Sepolia, 8453=Base, 137=Polygon, 56=BSC, 42161=Arbitrum)
fromBlock
(string, query, optional)
Starting block (inclusive)
module
(string, query, required)
Constraints: {'enum': ['logs']}
offset
(string, query, optional, default: 100)
Max records to return (max 1000)
toBlock
(string, query, optional)
Ending block (inclusive). Use 'latest' for most recent.
topic0
(string, query, optional)
First topic (event signature hash)
topic0_1_opr
(string, query, optional)
Operator between topic0 and topic1 (and/or)
Constraints: {'enum': ['and', 'or']}
topic1
(string, query, optional)
Second topic
Examples (3)
| Title | Type | URL | Action |
|---|---|---|---|
| Get event logs for DAI contract with block range | curl |
https://api.etherscan.io/api?module=logs&action=getLogs&address=0x6B175474E89094C44Da98b954EedeAC495271d0F&fromBlock=18000000&toBlock=18000100&chainid=1&offset=100 |
|
| Get Transfer event logs for USDC with topic filter | curl |
https://api.etherscan.io/api?module=logs&action=getLogs&address=0xA0b86a33E6441e0A421e56E4773C3C4b0Db7E5b0&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&fromBlock=latest&toBlock=latest&chainid=1&offset=50 |
|
| Get logs with multiple topic filters using AND operator | curl |
https://api.etherscan.io/api?module=logs&action=getLogs&address=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&topic1=0x000000000000000000000000a0b86a33e6441e0a421e56e4773c3c4b0db7e5b0&topic0_1_opr=and&fromBlock=19000000&toBlock=19001000&chainid=1&offset=200 |
Probe History
Status Codes
| Time | Status | Latency | Size |
|---|---|---|---|
| 2026-03-23 09:45:48.619274 | 200 | 553ms | |
| 2026-03-23 09:22:55.701459 | 200 | 565ms | |
| 2026-03-23 09:21:41.173706 | 200 | 568ms |