Skip to main content
GET
/
services
/
bens
/
api
/
v1
/
{chain_id}
/
domains
/
{name}
Get detailed information about domain for Detailed domain page
curl --request GET \
  --url https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.blockscout.com/services/bens/api/v1/{chain_id}/domains/{name}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "expiry_date": "<string>",
  "id": "<string>",
  "name": "<string>",
  "other_addresses": {},
  "owner": {
    "chain_id": "<string>",
    "contract_name": "<string>",
    "domain_info": {
      "address": "<string>",
      "expiry_date": "<string>",
      "name": "<string>",
      "names_count": 123
    },
    "hash": "<string>",
    "is_contract": true,
    "is_token": true,
    "is_verified_contract": true,
    "token_name": "<string>",
    "token_type": "TOKEN_TYPE_UNSPECIFIED"
  },
  "protocol": {
    "deployment_blockscout_base_url": "<string>",
    "description": "<string>",
    "docs_url": "<string>",
    "icon_url": "<string>",
    "id": "<string>",
    "short_name": "<string>",
    "title": "<string>",
    "tld_list": [
      "<string>"
    ]
  },
  "protocol_dapp_logo": "<string>",
  "protocol_dapp_url": "<string>",
  "registrant": {
    "chain_id": "<string>",
    "contract_name": "<string>",
    "domain_info": {
      "address": "<string>",
      "expiry_date": "<string>",
      "name": "<string>",
      "names_count": 123
    },
    "hash": "<string>",
    "is_contract": true,
    "is_token": true,
    "is_verified_contract": true,
    "token_name": "<string>",
    "token_type": "TOKEN_TYPE_UNSPECIFIED"
  },
  "registration_date": "<string>",
  "resolved_address": {
    "chain_id": "<string>",
    "contract_name": "<string>",
    "domain_info": {
      "address": "<string>",
      "expiry_date": "<string>",
      "name": "<string>",
      "names_count": 123
    },
    "hash": "<string>",
    "is_contract": true,
    "is_token": true,
    "is_verified_contract": true,
    "token_name": "<string>",
    "token_type": "TOKEN_TYPE_UNSPECIFIED"
  },
  "resolved_with_wildcard": true,
  "resolver_address": {
    "chain_id": "<string>",
    "contract_name": "<string>",
    "domain_info": {
      "address": "<string>",
      "expiry_date": "<string>",
      "name": "<string>",
      "names_count": 123
    },
    "hash": "<string>",
    "is_contract": true,
    "is_token": true,
    "is_verified_contract": true,
    "token_name": "<string>",
    "token_type": "TOKEN_TYPE_UNSPECIFIED"
  },
  "stored_offchain": true,
  "tokens": [
    {
      "address": "<string>",
      "chain_id": "<string>",
      "icon_url": "<string>",
      "is_verified_contract": true,
      "name": "<string>",
      "symbol": "<string>"
    }
  ],
  "wrapped_owner": {
    "chain_id": "<string>",
    "contract_name": "<string>",
    "domain_info": {
      "address": "<string>",
      "expiry_date": "<string>",
      "name": "<string>",
      "names_count": 123
    },
    "hash": "<string>",
    "is_contract": true,
    "is_token": true,
    "is_verified_contract": true,
    "token_name": "<string>",
    "token_type": "TOKEN_TYPE_UNSPECIFIED"
  }
}
{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token in the Authorization header.

Path Parameters

chain_id
string<int64>
required

The chain (network) where domain search should be done

name
string
required

Name of domain, for example vitalik.eth

Query Parameters

only_active
boolean

Filtering field to remove expired domains

protocol_id
string

Protocol id of domain, default is first priority protocol on that chain

Response

A successful response.

expiry_date
string
id
string
name
string
other_addresses
Map chain -> resolved_address that contains other blockchain addresses. This map will contain `current_chain_id` -> `resovled_address` if `resovled_address` is not None · object
owner
The account that owns the domain · object
protocol
Information about protocol that domain belongs to · object

Optional. Logo URL of the protocol's own dApp. Same value for every domain in the protocol, surfaced here for convenient rendering alongside protocol_dapp_url.

protocol_dapp_url
string

Optional. Deep link to this domain inside the protocol's own dApp, rendered from the protocol's protocol_dapp_url_template config.

registrant
Optional. The account that owns the ERC721 NFT for the domain · object
registration_date
string

Optional. RFC 3339 datetime of expiry date.

resolved_address
Optional. Resolved address of this domain · object
resolved_with_wildcard
boolean
resolver_address
object
stored_offchain
boolean
tokens
List of NFT tokens related to this domain · object[]
wrapped_owner
Optional. Owner of NameWrapper NFT · object