# Blockscout Smart Contract Lookup

> Blockscout Smart Contract Lookup 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-15).

Retrieves detailed verified smart contract information for a given contract address on a specified blockchain network

## Facts

- Endpoint: GET https://api.blockscout.com/:chain_id/api/v2/smart-contracts/:address_hash_param
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockscout-smart-contract-lookup-596f5c4d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fM6cqLw4uvNUJRJoed0u6

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-lookup-596f5c4d
```

Example prompt: Can you pull up the verified smart contract details for address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum mainnet (chain ID 1) from Blockscout?

## When to prefer this

Use this endpoint when you need verified smart contract source code, ABI, or compilation metadata for a specific contract address on an EVM-compatible chain indexed by Blockscout. Prefer it over Etherscan equivalents when working with chains that Blockscout indexes but Etherscan does not (e.g., many L2s and alt-EVMs), or when you need a pay-per-call model without API key registration.

## Known failure modes

- Contract address not found or not deployed on the specified chain — returns 404
- Contract exists but is not verified — returns partial data or a not-verified status
- Invalid address format — returns 400 bad request
- Unsupported or unknown chain_id — returns error or empty response
- Rate limiting or payment failure — returns 402 or 429

## How this service works

Access to api/v2/smart-contracts/:address_hash. Retrieve detailed information about a verified smart contract

## Output

Returns detailed information about a verified smart contract including its name, source code, ABI, bytecode, compiler version and settings, constructor arguments, verification status, creation transaction hash, and associated metadata such as token information if applicable.

## 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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockscout-smart-contract-lookup-596f5c4d/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)
