# Blockscout Transaction State Changes

> Blockscout Transaction State Changes is a paid API for AI agents from api.blockscout.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-12).

Retrieves all state changes (balance and token changes) caused by a specific transaction on a given blockchain network

## Facts

- Endpoint: GET https://api.blockscout.com/%7Bchain_id%7D/api/v2/transactions/%7Btransaction_hash_param%7D/state-changes
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockscout-transaction-state-changes-13791c69
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_F7jhxaBzWrt37YaoDh5Qg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability blockscout-transaction-state-changes-13791c69
```

Example prompt: Show me all the state changes from transaction 0x4f2b...e91a on the Ethereum mainnet (chain ID 1) — I want to see which addresses had their balances changed and by how much before and after.

## When to prefer this

Use this endpoint when you need granular, per-address balance and token state diffs for a specific transaction — particularly for DeFi analysis, forensics, auditing, or reconciliation. Prefer this over general transaction detail endpoints when you specifically need before/after balance snapshots and all affected parties. The multichain support via chain_id makes it ideal when working across networks without switching APIs.

## Known failure modes

- Invalid or malformed transaction hash returns 404 or empty result
- Unsupported chain_id returns an error or no data
- Transaction hash exists but has no state changes (e.g. failed tx) returns empty items array
- Pagination params out of range may return empty next page
- Rate limiting or payment failure returns 402 or 429 error

## How this service works

Explore crypto activities with Blockscout's multichain search. Find transactions, addresses, tokens, and dapps across top blockchain networks — your go-to explorer for cross-chain blockchain data

## Output

Returns a paginated list of state change items, each containing the affected address (with metadata like name, ENS domain, tags, scam flag, contract status), the type of change, the token involved (if any), token ID, balance before and after the transaction, whether the address is a miner, and pagination parameters for fetching additional results.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "properties": {
      "chain_id": {
       "type": "string"
      },
      "transaction_hash_param": {
       "type": "string"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "items_count": {
       "type": "integer"
      },
      "state_changes_count": {
       "type": "integer"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "type": "string",
    "token": {},
    "change": "string",
    "address": {
     "hash": "string",
     "name": "string",
     "is_scam": true,
     "metadata": {},
     "proxy_type": "string",
     "reputation": "string",
     "is_contract": true,
     "is_verified": true,
     "public_tags": [
      {
       "label": "string",
       "address_hash": "string",
       "display_name": "string"
      }
     ],
     "private_tags": [
      {
       "label": "string",
       "address_hash": "string",
       "display_name": "string"
      }
     ],
     "ens_domain_name": "string",
     "implementations": [
      {
       "name": "string",
       "address_hash": "string"
      }
     ],
     "watchlist_names": [
      {
       "label": "string",
       "display_name": "string"
      }
     ]
    },
    "is_miner": true,
    "token_id": "string",
    "balance_after": "string",
    "balance_before": "string"
   }
  ],
  "next_page_params": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockscout-transaction-state-changes-13791c69/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.blockscout.com](https://www.zero.xyz/host/api.blockscout.com/llms.txt)
