Skip to main content
GET
/
api
/
v1
/
celestia
/
l2BatchMetadata
cURL
curl --request GET \
  --url https://eth.blockscout.com/api/v2/api/v1/celestia/l2BatchMetadata
import requests

url = "https://eth.blockscout.com/api/v2/api/v1/celestia/l2BatchMetadata"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://eth.blockscout.com/api/v2/api/v1/celestia/l2BatchMetadata', 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://eth.blockscout.com/api/v2/api/v1/celestia/l2BatchMetadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://eth.blockscout.com/api/v2/api/v1/celestia/l2BatchMetadata"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://eth.blockscout.com/api/v2/api/v1/celestia/l2BatchMetadata")
.asString();
require 'uri'
require 'net/http'

url = URI("https://eth.blockscout.com/api/v2/api/v1/celestia/l2BatchMetadata")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "l2ChainId": 123,
  "l2BatchId": "<string>",
  "l2StartBlock": "<string>",
  "l2EndBlock": "<string>",
  "l2BatchTxCount": 123,
  "l2BlockscoutUrl": "<string>",
  "l1TxHash": "<string>",
  "l1TxTimestamp": "<string>",
  "l1ChainId": 123,
  "relatedBlobs": [
    {
      "height": "<string>",
      "namespace": "<string>",
      "commitment": "<string>"
    }
  ]
}
{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}

Query Parameters

height
string<uint64>
namespace
string
commitment
string

Response

A successful response.

l2ChainId
integer<int64>
l2BatchId
string
l2StartBlock
string<uint64>
l2EndBlock
string<uint64>
l2BatchTxCount
integer<int64>
l2BlockscoutUrl
string
l1TxHash
string
l1TxTimestamp
string<uint64>
l1ChainId
integer<int64>