Skip to main content
GET
/
{chain_id}
/
api
/
v2
/
blocks
/
{block_hash_or_number_param}
/
internal-transactions
List internal transactions in a specific block
curl --request GET \
  --url https://api.blockscout.com/{chain_id}/api/v2/blocks/{block_hash_or_number_param}/internal-transactions \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.blockscout.com/{chain_id}/api/v2/blocks/{block_hash_or_number_param}/internal-transactions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.blockscout.com/{chain_id}/api/v2/blocks/{block_hash_or_number_param}/internal-transactions', 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.blockscout.com/{chain_id}/api/v2/blocks/{block_hash_or_number_param}/internal-transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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.blockscout.com/{chain_id}/api/v2/blocks/{block_hash_or_number_param}/internal-transactions"

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

req.Header.Add("Authorization", "Bearer <token>")

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.blockscout.com/{chain_id}/api/v2/blocks/{block_hash_or_number_param}/internal-transactions")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.blockscout.com/{chain_id}/api/v2/blocks/{block_hash_or_number_param}/internal-transactions")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "block_number": 123,
      "created_contract": {
        "ens_domain_name": "<string>",
        "hash": "<string>",
        "implementations": [
          {
            "address_hash": "<string>",
            "name": "<string>"
          }
        ],
        "is_contract": true,
        "is_scam": true,
        "is_verified": true,
        "metadata": {
          "tags": [
            {
              "meta": {},
              "name": "<string>",
              "ordinal": 123,
              "slug": "<string>",
              "tagType": "<string>"
            }
          ]
        },
        "name": "<string>",
        "private_tags": [
          {
            "address_hash": "<string>",
            "display_name": "<string>",
            "label": "<string>"
          }
        ],
        "public_tags": [
          {
            "address_hash": "<string>",
            "display_name": "<string>",
            "label": "<string>"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "<string>",
            "label": "<string>"
          }
        ]
      },
      "error": "<string>",
      "from": {
        "ens_domain_name": "<string>",
        "hash": "<string>",
        "implementations": [
          {
            "address_hash": "<string>",
            "name": "<string>"
          }
        ],
        "is_contract": true,
        "is_scam": true,
        "is_verified": true,
        "metadata": {
          "tags": [
            {
              "meta": {},
              "name": "<string>",
              "ordinal": 123,
              "slug": "<string>",
              "tagType": "<string>"
            }
          ]
        },
        "name": "<string>",
        "private_tags": [
          {
            "address_hash": "<string>",
            "display_name": "<string>",
            "label": "<string>"
          }
        ],
        "public_tags": [
          {
            "address_hash": "<string>",
            "display_name": "<string>",
            "label": "<string>"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "<string>",
            "label": "<string>"
          }
        ]
      },
      "gas_limit": "<string>",
      "index": 123,
      "success": true,
      "timestamp": "2023-11-07T05:31:56Z",
      "to": {
        "ens_domain_name": "<string>",
        "hash": "<string>",
        "implementations": [
          {
            "address_hash": "<string>",
            "name": "<string>"
          }
        ],
        "is_contract": true,
        "is_scam": true,
        "is_verified": true,
        "metadata": {
          "tags": [
            {
              "meta": {},
              "name": "<string>",
              "ordinal": 123,
              "slug": "<string>",
              "tagType": "<string>"
            }
          ]
        },
        "name": "<string>",
        "private_tags": [
          {
            "address_hash": "<string>",
            "display_name": "<string>",
            "label": "<string>"
          }
        ],
        "public_tags": [
          {
            "address_hash": "<string>",
            "display_name": "<string>",
            "label": "<string>"
          }
        ],
        "watchlist_names": [
          {
            "display_name": "<string>",
            "label": "<string>"
          }
        ]
      },
      "transaction_hash": "<string>",
      "transaction_index": 123,
      "type": "<string>",
      "value": "<string>"
    }
  ],
  "meta": {
    "message": "<string>"
  },
  "next_page_params": {
    "index": 8,
    "transaction_index": 3
  }
}
{
"message": "Resource not found"
}
{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token in the Authorization header.

Path Parameters

block_hash_or_number_param
required

Block hash or number in the path

Required range: x >= 0
chain_id
string
required

The ID of the blockchain

Query Parameters

internal_type
enum<string>

Filter internal transactions by type:

  • all - Show all internal transactions (default)
  • call - Only show call internal transactions
  • create - Only show create internal transactions
  • create2 - Only show create2 internal transactions
  • reward - Only show reward internal transactions
  • selfdestruct - Only show selfdestruct internal transactions
  • stop - Only show stop internal transactions
  • invalid - Only show invalid internal transactions (Arbitrum only)
Available options:
call,
create,
create2,
reward,
selfdestruct,
stop,
invalid
call_type
enum<string>

Filter internal transactions by call type:

  • all - Show all internal transactions (default)
  • call - Only show call internal transactions
  • callcode - Only show callcode internal transactions
  • delegatecall - Only show delegatecall internal transactions
  • staticcall - Only show staticcall internal transactions
  • invalid - Only show invalid internal transactions (Arbitrum only)
Available options:
call,
callcode,
delegatecall,
staticcall,
invalid
items_count
integer

Number of items per page

Required range: x >= 1
transaction_index
integer

Transaction index for paging

index
integer

Item index for paging

Response

Internal transactions in the specified block.

items
InternalTransaction · object[]
required
meta
object
required
next_page_params
object | null
required
Example:
{ "index": 8, "transaction_index": 3 }