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>"
}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
API key passed as a Bearer token in the Authorization header.
Path Parameters
The chain (network) where domain search should be done
Name of domain, for example vitalik.eth
Query Parameters
Filtering field to remove expired domains
Protocol id of domain, default is first priority protocol on that chain
Response
A successful response.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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.
Optional. Deep link to this domain inside the protocol's own dApp,
rendered from the protocol's protocol_dapp_url_template config.
Show child attributes
Show child attributes
Optional. RFC 3339 datetime of expiry date.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?