> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.to/llms.txt
> Use this file to discover all available pages before exploring further.

# Token tag counts

> Returns how many traders of a token carry each trader tag (dev, sniper, migration_sniper, block_zero_buyer, insider, caller, pro_trader, bundler, cex), plus `tagged`, the number of traders with at least one tag. Use it to show counts next to the trades `tags` filter. A trader with several tags is counted once per tag and once in `tagged`. Per-trade flags such as `fresh` and the bot types describe individual trades rather than traders and are not counted. A token with no tagged trader returns zeros. For live updates subscribe to the `token_tag_counts` websocket room.

Each field is the number of distinct traders of the token that carry that tag. A trader carrying several tags appears in each of their counts and once in `tagged`.

| Field | Traders who… |
| - | - |
| `dev` | created the token |
| `sniper` | bought within the first blocks after launch |
| `migration_sniper` | bought within the first blocks after migration |
| `block_zero_buyer` | bought in the token's first block |
| `insider` | were funded by or linked to the token's creator |
| `caller` | are known callers |
| `pro_trader` | are recognised professional traders or use a trading bot |
| `bundler` | bought in a bundle with the launch |
| `cex` | are exchange addresses |

Use these counts to label the `tags` options of [token trades](https://docs.struct.to/api-reference/token-market/token-transaction-trades.md). Trade-level flags such as `fresh` and the bot types are not trader tags and have no count here. The [token tag counts room](https://docs.struct.to/websockets/rooms/token-tag-counts.md) pushes the same figures as they change.

```bash theme={null}
curl "https://staging-api.struct.to/v1/token/tag-counts?chain=robinhood&chain_id=4663&token_address=0x39dBED3a2bd333467115dE45665cC57F813C4571&fields=short" \
  -H "X-API-Key: YOUR_API_KEY"
```

```json Response (Long) theme={null}
{
  "token_address": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
  "tagged": 412,
  "dev": 1,
  "sniper": 37,
  "migration_sniper": 4,
  "block_zero_buyer": 22,
  "insider": 9,
  "caller": 3,
  "pro_trader": 118,
  "bundler": 15,
  "cex": 2,
  "updated_at_ms": 1790683200000
}
```

```jsonc Response (Short) theme={null}
{
  "ta": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
  "tgd": 412,
  "dv": 1,
  "sn": 37,
  "ms": 4,
  "b0": 22,
  "isn": 9,
  "cl": 3,
  "pt": 118,
  "bd": 15,
  "cx": 2,
  "u": 1790683200000
}
```


## OpenAPI

````yaml onchain-openapi.json GET /token/tag-counts
openapi: 3.1.0
info:
  title: Struct On-chain API
  description: >-
    RESTful API for token market data, discovery, holders, audits, and trader
    analytics across supported chains. Pass `fields=short` or header
    `x-field-names: short` for abbreviated keys. HTTP defaults to `long`. Token
    candlesticks, token trades and wallet batch trades also support
    `fields=array` for typed positional rows.
  version: 1.0.0
servers:
  - url: https://staging-api.struct.to/v1
    description: Staging
security:
  - ApiKey: []
paths:
  /token/tag-counts:
    get:
      tags:
        - Token
      summary: Token tag counts
      description: >-
        Returns how many traders of a token carry each trader tag (dev, sniper,
        migration_sniper, block_zero_buyer, insider, caller, pro_trader,
        bundler, cex), plus `tagged`, the number of traders with at least one
        tag. Use it to show counts next to the trades `tags` filter. A trader
        with several tags is counted once per tag and once in `tagged`.
        Per-trade flags such as `fresh` and the bot types describe individual
        trades rather than traders and are not counted. A token with no tagged
        trader returns zeros. For live updates subscribe to the
        `token_tag_counts` websocket room.
      operationId: get_token_tag_counts
      parameters:
        - name: chain
          in: query
          description: Chain name. Required unless `chain_id` is provided.
          required: false
          schema:
            type: string
          example: robinhood
        - name: chain_id
          in: query
          description: Chain id. Required unless `chain` is provided. Use `-1` for Solana.
          required: false
          schema:
            type: integer
            format: int64
          example: 4663
        - name: token_address
          in: query
          description: Token address (required).
          required: true
          schema:
            type: string
          example: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
        - name: x-field-names
          in: header
          required: false
          description: >-
            Select long (full) or short (abbreviated) field names. HTTP defaults
            to `long`. Takes precedence over `fields`. See [Response
            Format](/api-reference/response-format#long-and-short-field-names).
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
        - name: fields
          in: query
          required: false
          description: >-
            Same as `x-field-names`. Use `long` or `short`. HTTP defaults to
            `long`. Ignored when the header is set. `field_names` is accepted as
            an alias.
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
      responses:
        '200':
          description: Tagged-trader counts per tag
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenTagCountsResponse'
              examples:
                long:
                  summary: Response (Long)
                  value:
                    token_address: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                    tagged: 412
                    dev: 1
                    sniper: 37
                    migration_sniper: 4
                    block_zero_buyer: 22
                    insider: 9
                    caller: 3
                    pro_trader: 118
                    bundler: 15
                    cex: 2
                    updated_at_ms: 1790683200000
                short:
                  summary: Response (Short)
                  value:
                    ta: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                    tgd: 412
                    dv: 1
                    sn: 37
                    ms: 4
                    b0: 22
                    isn: 9
                    cl: 3
                    pt: 118
                    bd: 15
                    cx: 2
                    u: 1790683200000
        '400':
          description: Validation error — missing or invalid `token_address`.
components:
  schemas:
    TokenTagCountsResponse:
      type: object
      description: |-
        Tagged-trader counts for one token. Each field is the number of distinct
        traders of the token that carry that tag; a trader with several tags is
        counted once per tag and once in `tagged`.
      required:
        - token_address
        - tagged
        - dev
        - sniper
        - migration_sniper
        - block_zero_buyer
        - insider
        - caller
        - pro_trader
        - bundler
        - cex
        - updated_at_ms
      properties:
        token_address:
          type: string
        tagged:
          type: integer
          format: int64
          description: Traders with at least one behavioural tag.
        dev:
          type: integer
          format: int64
        sniper:
          type: integer
          format: int64
        migration_sniper:
          type: integer
          format: int64
        block_zero_buyer:
          type: integer
          format: int64
        insider:
          type: integer
          format: int64
        caller:
          type: integer
          format: int64
        pro_trader:
          type: integer
          format: int64
        bundler:
          type: integer
          format: int64
        cex:
          type: integer
          format: int64
        updated_at_ms:
          type: integer
          format: int64
          description: |-
            Unix milliseconds of the last count change; 0 when the token has no
            tagged trader.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Secret API key (`sk_*`) or JWT public key (`pk_jwt_*`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.