# Blockscout Smart Contract Details by Chain

> Blockscout Smart Contract Details by Chain 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-10).

Fetches full verified smart contract metadata for a given address on a specified blockchain network, including ABI, source code, compiler settings, and verification status.

## Facts

- Endpoint: GET https://api.blockscout.com/%7Bchain_id%7D/api/v2/smart-contracts/%7Baddress_hash_param%7D
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockscout-smart-contract-details-by-chain-8b6eb061
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p3gJdQQodX7BEN1hly8-o

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-smart-contract-details-by-chain-8b6eb061
```

Example prompt: Can you pull up the full smart contract details for address 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 on Ethereum (chain ID 1) — I need the ABI, source code, compiler version, and whether it's verified?

## When to prefer this

Use this endpoint when you need deep, structured smart contract metadata — including ABI, source code, and verification details — for a specific contract address on any of the supported EVM chains indexed by Blockscout. Prefer it over generic block explorers when you need machine-readable output for agent workflows, security audits, or DApp integration, especially when working across multiple chains via a single API.

## Known failure modes

- Invalid or non-existent address_hash_param returns 404 or empty result
- Unsupported or incorrect chain_id returns an error or no data
- Contract exists but is not verified — returns metadata without source code or ABI
- Network timeout or upstream Blockscout node unavailability
- Payment failure for x402-gated access resulting in 402 response

## 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 comprehensive JSON object containing the smart contract's ABI, verified source code, file path, compiler version, EVM version, optimization settings, proxy type, implementation addresses, constructor arguments, decoded constructor args, bytecode (creation and deployed), license type, verification status flags (verified, partially verified, verified via sourcify, verified via eth-bytecode-db, verified via verifier alliance), coin balance, transaction count, external libraries, additional source files, and GitHub repository metadata.

## 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"
      },
      "address_hash_param": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "abi": [
   {}
  ],
  "name": "string",
  "language": "string",
  "certified": true,
  "file_path": "string",
  "market_cap": "string",
  "proxy_type": "string",
  "reputation": "string",
  "evm_version": "string",
  "is_verified": true,
  "source_code": "string",
  "verified_at": "string",
  "coin_balance": "string",
  "is_blueprint": true,
  "license_type": "string",
  "package_name": "string",
  "creation_status": "string",
  "implementations": [
   {
    "name": "string",
    "address_hash": "string"
   }
  ],
  "compiler_version": "string",
  "constructor_args": "string",
  "compiler_settings": {},
  "creation_bytecode": "string",
  "deployed_bytecode": "string",
  "is_fully_verified": true,
  "optimization_runs": 0,
  "sourcify_repo_url": "string",
  "additional_sources": [
   {
    "file_path": "string",
    "source_code": "string"
   }
  ],
  "external_libraries": [
   {
    "name": "string",
    "address_hash": "string"
   }
  ],
  "transactions_count": 0,
  "is_changed_bytecode": true,
  "has_constructor_args": true,
  "optimization_enabled": true,
  "is_partially_verified": true,
  "verification_metadata": {},
  "decoded_constructor_args": [
   [
    {}
   ]
  ],
  "is_verified_via_sourcify": true,
  "github_repository_metadata": {},
  "verified_twin_address_hash": "string",
  "conflicting_implementations": [
   {
    "proxy_type": "string",
    "implementations": [
     {
      "name": "string",
      "address_hash": "string"
     }
    ]
   }
  ],
  "can_be_visualized_via_sol2uml": true,
  "is_verified_via_eth_bytecode_db": true,
  "is_verified_via_verifier_alliance": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockscout-smart-contract-details-by-chain-8b6eb061/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)
