# Account Nonce Lookup (EVM)

> Account Nonce Lookup (EVM) is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the transaction count (nonce) of an EVM account address as both decimal and hex, optionally scoping to pending mempool state.

## Facts

- Endpoint: GET https://agent402.tools/api/chain/nonce
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/account-nonce-lookup-evm-6ecdb8cf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_67ZduSU5JZRZUv9EvlXxv

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 account-nonce-lookup-evm-6ecdb8cf
```

Example prompt: What's the pending nonce for 0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0 on Base — I need it to sign my next transaction and want to include any mempool transactions in the count.

## When to prefer this

Use this endpoint when you need the transaction count / nonce for an EVM account before constructing or signing a transaction, especially with block=pending to capture in-flight mempool transactions. Prefer it over general block explorer APIs when you need both decimal and hex nonce quickly with a simple GET call across multiple EVM chains (Ethereum, Base, Polygon, Arbitrum, Optimism).

## Known failure modes

- Invalid or malformed address returns an error response
- Unsupported network name returns an error
- Invalid block tag value returns an error
- Network RPC node unavailability causes a timeout or 5xx error
- Address with zero transactions returns nonce 0 (not an error, but may be unexpected)

## How this service works

The transaction count of an account, which is the nonce its next transaction must carry. Ask for block "pending" to include transactions already in the mempool, which is what you want before signing; the default "latest" counts only mined transactions. Returns the count as a decimal string and as hex. EVM chains: ethereum, base, polygon, arbitrum, optimism.

## Output

A JSON object containing the queried address, the network, the block tag used, the transaction count as a decimal string (nonce), and the same value as a hex string (nonceHex). Example: {"address":"0xabf4...","network":"base","block":"latest","nonce":"412","nonceHex":"0x19c"}.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "block": {
       "type": "string",
       "description": "latest (default), pending, earliest, safe, finalized, or a block number. Use \"pending\" for the nonce of a transaction you are about to send."
      },
      "address": {
       "type": "string",
       "description": "0x account address"
      },
      "network": {
       "type": "string",
       "description": "ethereum | base | polygon | arbitrum | optimism (default base)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "address",
      "network",
      "block",
      "nonce",
      "nonceHex"
     ],
     "properties": {
      "block": {
       "type": "string"
      },
      "nonce": {
       "type": "string"
      },
      "address": {
       "type": "string"
      },
      "network": {
       "type": "string"
      },
      "nonceHex": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "block": "latest",
  "nonce": "412",
  "address": "0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0",
  "network": "base",
  "nonceHex": "0x19c"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/account-nonce-lookup-evm-6ecdb8cf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
