POSTDetect address

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/detectAddress
CU10

Validates an address and returns it in all standard formats. Use this to convert between address formats or to validate user input. Returns raw format (0:abc), base64 bounceable (EQ), base64 non-bounceable (UQ), and URL-safe variants.

Request Body
addressstringrequired

Account address in raw format (e.g., 0:ca6e321c...) or user-friendly format (e.g., EQDKbjIcfM...). All formats are automatically detected.

Responses
okbooleanrequired

Returns true if the request succeeded; otherwise false. See the error field for details.

@typestring (enum)required

TonLib type identifier for address detection results. Refer to the TonLib type reference for a full list.

raw_formstringrequired

Raw address in workchain_id:account_id hex format (e.g., 0:abc...def). This is the canonical on-chain representation without flags or checksum.

bounceableobjectrequired

Bounceable form of the address in standard base64 and URL-safe base64. Bounceable addresses (prefix E...) instruct wallet software to set the bounce flag on outgoing messages, so funds are returned if the destination contract cannot process them.

@typestring (enum)required

TonLib type identifier for base64 address encoding variants. Refer to the TonLib type reference for a full list.

b64stringrequired

Address in standard base64 encoding (48 characters, uses + and /).

b64urlstringrequired

Address in URL-safe base64 encoding (48 characters, uses - and _ instead of + and /).

non_bounceableobjectrequired

Non-bounceable form of the address in standard base64 and URL-safe base64. Non-bounceable addresses (prefix U...) instruct wallet software to clear the bounce flag, ensuring funds are credited even if the recipient has no deployed contract.

@typestring (enum)required

TonLib type identifier for base64 address encoding variants. Refer to the TonLib type reference for a full list.

b64stringrequired

Address in standard base64 encoding (48 characters, uses + and /).

b64urlstringrequired

Address in URL-safe base64 encoding (48 characters, uses - and _ instead of + and /).

given_typestring (enum)required

The encoding format of the address as provided in the request (e.g., raw_form, dns, friendly_bounceable, friendly_non_bounceable).

test_onlybooleanrequired

Returns true if the user-friendly address has the testnet-only flag set (0x80); otherwise false. This is a flag in the address encoding that tells wallet software to reject this address on mainnet. The underlying account itself can exist on both networks.

@extrastring

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.

X-API-KEY
Request
cURL
curl -X POST "https://ton-mainnet.nodit.io/api/v2/detectAddress" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "EQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqFtN"
  }'
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "ext.utils.detectedAddress",
    "raw_form": "0:b941e620df58205a590b0d6ebe919c66b9bcea7fcfd34f75633d221b7fa430a8",
    "bounceable": {
      "@type": "ext.utils.detectedAddressVariant",
      "b64": "EQC5QeYg31ggWlkLDW6+kZxmubzqf8/TT3VjPSIbf6QwqFtN",
      "b64url": "EQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqFtN"
    },
    "non_bounceable": {
      "@type": "ext.utils.detectedAddressVariant",
      "b64": "UQC5QeYg31ggWlkLDW6+kZxmubzqf8/TT3VjPSIbf6QwqAaI",
      "b64url": "UQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqAaI"
    },
    "given_type": "friendly_bounceable",
    "test_only": false
  },
  "@extra": "1795684380:_:0.028"
}