Query subnames
curl --request POST \
--url https://offchain-manager.namespace.ninja/api/v1/subnames/search \
--header 'Content-Type: application/json' \
--data '
{
"parentName": "oppunk.eth",
"labelSearch": "alice"
}
'import requests
url = "https://offchain-manager.namespace.ninja/api/v1/subnames/search"
payload = {
"parentName": "oppunk.eth",
"labelSearch": "alice"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({parentName: 'oppunk.eth', labelSearch: 'alice'})
};
fetch('https://offchain-manager.namespace.ninja/api/v1/subnames/search', 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://offchain-manager.namespace.ninja/api/v1/subnames/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parentName' => 'oppunk.eth',
'labelSearch' => 'alice'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://offchain-manager.namespace.ninja/api/v1/subnames/search"
payload := strings.NewReader("{\n \"parentName\": \"oppunk.eth\",\n \"labelSearch\": \"alice\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://offchain-manager.namespace.ninja/api/v1/subnames/search")
.header("Content-Type", "application/json")
.body("{\n \"parentName\": \"oppunk.eth\",\n \"labelSearch\": \"alice\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://offchain-manager.namespace.ninja/api/v1/subnames/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"parentName\": \"oppunk.eth\",\n \"labelSearch\": \"alice\"\n}"
response = http.request(request)
puts response.read_bodyOffchain API Reference
Query subnames
Searches for subnames matching the provided criteria.
POST
/
api
/
v1
/
subnames
/
search
Query subnames
curl --request POST \
--url https://offchain-manager.namespace.ninja/api/v1/subnames/search \
--header 'Content-Type: application/json' \
--data '
{
"parentName": "oppunk.eth",
"labelSearch": "alice"
}
'import requests
url = "https://offchain-manager.namespace.ninja/api/v1/subnames/search"
payload = {
"parentName": "oppunk.eth",
"labelSearch": "alice"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({parentName: 'oppunk.eth', labelSearch: 'alice'})
};
fetch('https://offchain-manager.namespace.ninja/api/v1/subnames/search', 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://offchain-manager.namespace.ninja/api/v1/subnames/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parentName' => 'oppunk.eth',
'labelSearch' => 'alice'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://offchain-manager.namespace.ninja/api/v1/subnames/search"
payload := strings.NewReader("{\n \"parentName\": \"oppunk.eth\",\n \"labelSearch\": \"alice\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://offchain-manager.namespace.ninja/api/v1/subnames/search")
.header("Content-Type", "application/json")
.body("{\n \"parentName\": \"oppunk.eth\",\n \"labelSearch\": \"alice\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://offchain-manager.namespace.ninja/api/v1/subnames/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"parentName\": \"oppunk.eth\",\n \"labelSearch\": \"alice\"\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Subname parent name
Example:
"oppunk.eth"
List of subname parent names
Example:
["oppunk.eth", "example.eth"]
Search subnames by label
Example:
"alice"
Current page. Defaults to 1
Example:
1
Page size. Defaults to 25
Example:
25
Search by subname ownership
Example:
"0x1234...abcd"
Search by metadata properties
Example:
{ "role": "admin", "verified": "true" }
Response
Paged list of matching subnames
Was this page helpful?
⌘I

