Get Block Logs
curl --request GET \
--url https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs \
--header 'apikey: <api-key>'import requests
url = "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"block_number": 81901165,
"offset": 0,
"limit": 10,
"result": [
{
"block_number": 81901165,
"timestamp": 1768922302,
"datetime": "2026-01-20T15:18:22",
"transaction_hash": "0x6a9cb0071fe44d7cf50962bc9ea05dfe45662d34c71f4f8b12fb3918f62f9692",
"transaction_index": 0,
"transaction_from": "0x17fc3813d8761eab20e8d16ba7d38b92547dec91",
"transaction_to": "0x4eb48fecfb61873809270972f7d9d5a90c23752d",
"log_index": 0,
"address": "0x0000000000000000000000000000000000001010",
"data": "0x00000000000000000000000000000000000000000000000001157946f3885900",
"topics": [
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"0x0000000000000000000000000000000000000000000000000000000000001010",
"0x00000000000000000000000017fc3813d8761eab20e8d16ba7d38b92547dec91",
"0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0"
],
"topic1": "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"topic2": "0x0000000000000000000000000000000000000000000000000000000000001010",
"topic3": "0x00000000000000000000000017fc3813d8761eab20e8d16ba7d38b92547dec91",
"topic4": "0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0",
"version": 0
}
],
"count": 1
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Logs
Get Block Logs
Get all logs in a block
GET
/
api
/
v1
/
customer
/
{chain}
/
blocks
/
logs
Get Block Logs
curl --request GET \
--url https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs \
--header 'apikey: <api-key>'import requests
url = "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.sonarx.com/api/v1/customer/{chain}/blocks/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"block_number": 81901165,
"offset": 0,
"limit": 10,
"result": [
{
"block_number": 81901165,
"timestamp": 1768922302,
"datetime": "2026-01-20T15:18:22",
"transaction_hash": "0x6a9cb0071fe44d7cf50962bc9ea05dfe45662d34c71f4f8b12fb3918f62f9692",
"transaction_index": 0,
"transaction_from": "0x17fc3813d8761eab20e8d16ba7d38b92547dec91",
"transaction_to": "0x4eb48fecfb61873809270972f7d9d5a90c23752d",
"log_index": 0,
"address": "0x0000000000000000000000000000000000001010",
"data": "0x00000000000000000000000000000000000000000000000001157946f3885900",
"topics": [
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"0x0000000000000000000000000000000000000000000000000000000000001010",
"0x00000000000000000000000017fc3813d8761eab20e8d16ba7d38b92547dec91",
"0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0"
],
"topic1": "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"topic2": "0x0000000000000000000000000000000000000000000000000000000000001010",
"topic3": "0x00000000000000000000000017fc3813d8761eab20e8d16ba7d38b92547dec91",
"topic4": "0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0",
"version": 0
}
],
"count": 1
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
API key for authentication
Path Parameters
The blockchain network to query
Available options:
polygon Example:
"polygon"
Query Parameters
Block number to query (>= 0)
Required range:
x >= 0Example:
81901165
Filter by contract address (42 character hex string)
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"
Maximum number of results (1-50)
Required range:
1 <= x <= 50Number of results to skip for pagination
Required range:
x >= 0⌘I