Logs

Get Event Logs by Address

Returns the event logs from an address, with optional filtering by block range.

https://api.lineascan.build/api
   ?module=logs
   &action=getLogs
   &address=0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f
   &fromBlock=113740
   &toBlock=113750
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken

Try this endpoint in your browser 🔗

Query Parameters

ParameterDescription

address

the string representing the address to check for logs

fromBlock

the integer block number to start searching for logs eg. 12878196

toBlock

the integer block number to stop searching for logs eg. 12879196

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page limited to 1000 records per query, use the page parameter for subsequent records

Get Event Logs by Topics

Returns the events log in a block range, filtered by topics.

https://api.lineascan.build/api
   ?module=logs
   &action=getLogs
   &fromBlock=113740
   &toBlock=113750
   &topic0=0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c
   &topic0_1_opr=and
   &topic1=0x0000000000000000000000003f0ca22af602b42cddb4e9153f525dc9de12eae7
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken

Usage:

  • For a single topic, specify the topic number such as topic0, topic1, topic2, topic3

  • For multiple topics, specify the topic numbers and topic operator either and or or such as below topic0_1_opr (and|or between topic0 & topic1), topic1_2_opr (and|or between topic1 & topic2) topic2_3_opr (and|or between topic2 & topic3), topic0_2_opr (and|or between topic0 & topic2) topic0_3_opr (and|or between topic0 & topic3), topic1_3_opr (and|or between topic1 & topic3)

Try this endpoint in your browser 🔗

Query Parameters

ParameterDescription

fromBlock

the integer block number to start searching for logs eg. 12878196

toBlock

the integer block number to stop searching for logs eg. 12879196

topic

the topic numbers to search for limited totopic0, topic1, topic2, topic3

topicOperator

the topic operator when multiple topic combinations are used limited to and or or

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page limited to 1000 records per query, use the page parameter for subsequent records

Get Event Logs by Address filtered by Topics

Returns the event logs from an address, filtered by topics and block range.

https://api.lineascan.build/api
   ?module=logs
   &action=getLogs
   &fromBlock=113740
   &toBlock=113750
   &address=0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f
   &topic0=0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c
   &topic0_1_opr=and
   &topic1=0x0000000000000000000000003f0ca22af602b42cddb4e9153f525dc9de12eae7
   &page=1
   &offset=1000
   &apikey=YourApiKeyToken

Try this endpoint in your browser 🔗

Query Parameters

ParameterDescription

fromBlock

the integer block number to start searching for logs eg. 12878196

toBlock

the integer block number to stop searching for logs eg. 12879196

address

the string representing the address to check for logs

topic

the topic numbers to search for limited totopic0, topic1, topic2, topic3

topicOperator

the topic operator when multiple topic combinations are used limited to and or or

page

the integer page number, if pagination is enabled

offset

the number of transactions displayed per page limited to 1000 records per query, use the page parameter for subsequent records

Last updated