Skip to main content

Check Availability

Check if a subname is available for registration and get pricing information.

Endpoint​

GET /api/subnames/{parent}/{name}/available

Authentication​

None required — This is a public read endpoint.

Parameters​

ParameterTypeLocationRequiredDescription
parentstringpathâś…Parent ENS name (e.g., aboutme.eth)
namestringpathâś…Subname label to check (e.g., alice)

Response (Available)​

{
"parent": "aboutme.eth",
"name": "alice",
"fullName": "alice.aboutme.eth",
"available": true,
"pricing": {
"price": 0.97,
"priceFormatted": "$0.97",
"tier": "standard",
"reason": "Standard name"
},
"timestamp": "2024-02-10T14:30:00.000Z"
}

Response (Taken)​

{
"parent": "aboutme.eth",
"name": "vitalik",
"fullName": "vitalik.aboutme.eth",
"available": false,
"pricing": {
"price": 9.97,
"priceFormatted": "$9.97",
"tier": "dictionary",
"reason": "Dictionary word"
},
"timestamp": "2024-02-10T14:30:00.000Z"
}

Pricing Tiers​

TierPrice/YearCriteria
ultraPremium$97.001-2 characters
ultraShort$19.973 characters
dictionary$9.97Common English words
short$4.974 characters
standard$0.975+ characters
reservedN/AReserved names (not available)
Free Registration

First registration per wallet/IP is FREE! Additional registrations require payment.

Examples​

cURL​

# Check if "mycoolname" is available
curl "https://api.web3identity.com/api/subnames/aboutme.eth/mycoolname/available"

# Check a 3-character name
curl "https://api.web3identity.com/api/subnames/aboutme.eth/abc/available"

JavaScript​

async function checkAvailability(parent, name) {
const response = await fetch(
`https://api.web3identity.com/api/subnames/${parent}/${name}/available`
);
return response.json();
}

// Check availability before registration
const result = await checkAvailability('aboutme.eth', 'mycoolname');

if (result.available) {
console.log(`${result.fullName} is available!`);
console.log(`Price: ${result.pricing.priceFormatted}/year (${result.pricing.tier})`);
} else {
console.log(`${result.fullName} is already taken`);
}

React Hook Example​

import { useState, useEffect } from 'react';

function useSubnameAvailability(parent, name) {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(false);

useEffect(() => {
if (!name || name.length < 1) return;

setLoading(true);
fetch(`https://api.web3identity.com/api/subnames/${parent}/${name}/available`)
.then(res => res.json())
.then(setData)
.finally(() => setLoading(false));
}, [parent, name]);

return { data, loading };
}

// Usage
function RegistrationForm() {
const [name, setName] = useState('');
const { data, loading } = useSubnameAvailability('aboutme.eth', name);

return (
<div>
<input
value={name}
onChange={e => setName(e.target.value)}
placeholder="Enter desired name"
/>
{loading && <span>Checking...</span>}
{data?.available && <span className="available">âś“ Available - {data.pricing.priceFormatted}</span>}
{data && !data.available && <span className="taken">âś— Already taken</span>}
</div>
);
}

Reserved Names​

Some names are reserved and cannot be registered:

  • admin, support, help
  • official, verified
  • aboutme, register, api

These return available: false with tier: "reserved".

Error Responses​

StatusCodeDescription
400BAD_REQUESTInvalid name format
429RATE_LIMITEDRate limit exceeded
500SUBNAME_ERRORInternal server error
  • Get Price — Get pricing only
  • Register — Register a subname (free tier)
  • Purchase — Purchase with x402 payment