---
title: "Get Contract On-Chain Profile"
method: GET
path: "/api/v1/contract/{address}/profile"
tags: ["Contract Intelligence"]
---

# Get Contract On-Chain Profile

`GET /api/v1/contract/{address}/profile`

## Request

- Base URL: `https://cleartracedata.com` (the document declares no server; this is the origin it was published from)
- URL: `https://cleartracedata.com/api/v1/contract/{address}/profile`
- Auth: none declared

**Public API: Returns a full on-chain profile for any contract or wallet address.**

Powered by Alchemy's enhanced APIs, this endpoint provides:
- **Token Balances**: All ERC-20 tokens held by the address via `alchemy_getTokenBalances`
- **Contract Metadata**: Bytecode size, ETH balance, account nonce
- **Auto-Classification**: Heuristic-based classification (treasury, MEV bot, router, factory, etc.)

Note on `nonce`: it is an activity count only for an EOA. A contract's nonce
starts at 1 and increments only on CREATE, so for a contract it reports
contracts deployed (`nonce - 1`), not transactions sent. That derived count
is served directly as `contracts_deployed` (null for an EOA, where it cannot
be read off the nonce). The legacy `transaction_count` field carries the
same value as `nonce` and is deprecated.

This is useful for identifying unknown proxy contracts in DEX attribution data.

## Path parameters

- `address` string, required

## Query parameters

- `chain` 'ethereum' | 'base' | 'arbitrum' | 'optimism': Blockchain network to query.

## Response `200`

A comprehensive on-chain profile including token balances, code size, ETH balance, and automated classification.

- ContractProfileResponse
  - `profile` ContractProfile, required
    - `address` string, required: The queried contract address.
    - `chain` string, required: The blockchain network.
    - `is_contract` boolean, required: Whether the address is a smart contract.
    - `code_size_bytes` integer, required: Size of the deployed bytecode in bytes.
    - `eth_balance` number, required: Native ETH balance.
    - `nonce` integer, required: The account nonce (eth_getTransactionCount). For an EOA this is the number of transactions sent. For a CONTRACT it is NOT an activity count: a contract's nonce starts at 1 and increments only on CREATE, so it counts contracts deployed (nonce - 1).
    - `contracts_deployed` integer, nullable: How many contracts this address has CREATEd, for a CONTRACT: it is `nonce - 1`, served directly so a consumer does not have to know that rule. NULL when `is_contract` is false — an EOA's nonce counts the transactions it sent, and some of those may have been deployments, so the CREATE count is genuinely unknown from the nonce alone. Null means unknown here, never zero.
    - `transaction_count` integer, required: DEPRECATED, use `nonce` instead. Identical value, kept for backward compatibility. The name is misleading for contracts, where this counts contracts deployed rather than transactions sent.
    - `token_balances` TokenBalance[], required: All ERC-20 token balances held by this address.
      - `contract` string, required: The ERC-20 token contract address.
      - `symbol` string, required: The token ticker symbol.
      - `name` string, required: The full token name.
      - `balance` number, required: The human-readable token balance.
    - `classification_hint` string, required: Automated classification based on on-chain signals.

---

[API](https://skmtc.dev/cleartracedata/apis/cleartrace-api.md) · [All operations](https://skmtc.dev/cleartracedata/apis/cleartrace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cleartracedata/apis/cleartrace-api/revisions/2073a5a38ab5?raw)
