Web3 Name API

SPACE ID provides a free HTTP API to help dApps integrate domain resolutions with ease. All data is queried on-chain securely in real time.

The primary capabilities of the SPACE ID Web3 Name API include:

  1. Domain Name -> Address resolution: Retrieve the crypto address uniquely bound to the domain name by entering the domain name.

  2. Address -> Domain Name resolution: Retrieve the domain name associated with the address via inputs: 1) the crypto address, and 2) the chain id.

    • Given one crypto address could own multiple domain names, users can set a primary name such that their address can be 1-to-1 mapped to this primary name

1. Resolve Domain Name -> Address

GET https://nameapi.space.id/getAddress?domain=

Request URL Example:

Status Code: 200 OK
{
"address":"0xb5932a6B7d50A966AEC6C74C97385412Fb497540"
"code":0
"msg":"success"
}

Return Field Description

Name
Description

address

Returns the resolved address. If no domain records are found, the address field will not be returned

code

0: address found, 1: no address found, -1: error

msg

result status and error message

2. Resolve Address -> Domain Name

GET https://nameapi.space.id/getName?chainid=&address=

Query Parameters

Name
Description

chainid

The Chain ID that tells which chain the app is on (e.g. Ethereum: 1, BNB Chain: 56, Solana: 900)

address

The crypto address that can be resolved to a primary domain name

Request URL Example (single chain query):

Status Code: 200 OK
{
  "code": 0,
  "data": {
    "name": "spaceid.bnb",
    "chainID": 56,
    "errMsg": ""
  },
  "msg": "success"
}

Request URL Example (multi-chain query):

Status Code: 200 OK
{
   "code": 0,
   "data": [
       {
           "name": "0x5206.arb",
           "chainID": 42161,
           "errMsg": ""
       },
       {
           "name": "allen.bnb",
           "chainID": 56,
           "errMsg": ""
       },
       {
           "name": "",
           "chainID": 0,
           "errMsg": "unsupported chain id: 101"
       },
       {
           "name": "",
           "chainID": 185,
           "errMsg": "corresponding domain not found"
       }
   ],
   "msg": "success"
}

Return Field Description

Name
Description

name

Returns the resolved domain name. If no record is found, the name field will not be returned

code

0: name found, 1: name not found, -1: error

msg

result status and error message

3. Resolve Payment ID -> Address

GET https://nameapi.space.id/getPaymentIdName/”paymentID”/”chaintype”

Query Parameters

Name
Description

paymentID

The payment ID name that needs to be resolved (e.g. jerry@binance)

chaintype

The chain address to be resolved, from btc, evm, sol, tron, aptos, sui

Request URL Example:

Status Code: 200 OK
{
  "address": "0x5bcb636853ab70b873adaf2d9759ca1489669cce",
  "code": 0,
  "msg": "success"
}

Appendix for Supported Domains & Chains

Chain
Chain ID
Domain

Ethereum Mainnet

1

.eth

BNB Chain

56

.bnb

Solana

900

.sol

Arbitrum One

42161

.arb

Manta Pacific Mainnet

169

.manta

Mode

34443

.mode

ZKFair Mainnet

42766

.zfk

Lightlink Phoenix Mainnet

1890

.ll

ZetaChain Mainnet

7000

.zeta

Merlin Mainnet

4200

.merlin

Gnosis

100

.gno

Taiko Alethia

167000

.taiko

AlienX Mainnet

10241024

.alien

Mint Mainnet

185

.mint

AILayer Mainnet

2649

.ail

Morph

2818

.mph

DuckChain Mainnet

5545

.duck

Gravity Alpha Mainnet

1625

.g

Story

1514

.ip

Injective

901

.inj

Sei

902

.sei

.lens on Polygon

903

.lens

.crypto on Polygon

904

.crypto

Last updated