Get Entity by Name
curl --request GET \
--url https://api.shoal.xyz/v1/entities/byName \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shoal.xyz/v1/entities/byName"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoal.xyz/v1/entities/byName', 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.shoal.xyz/v1/entities/byName",
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.shoal.xyz/v1/entities/byName"
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.shoal.xyz/v1/entities/byName")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoal.xyz/v1/entities/byName")
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_bodyEntities
Get Entity by Name
Resolve a canonical Shoal entity by canonical name or alias
GET
/
v1
/
entities
/
byName
Get Entity by Name
curl --request GET \
--url https://api.shoal.xyz/v1/entities/byName \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shoal.xyz/v1/entities/byName"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoal.xyz/v1/entities/byName', 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.shoal.xyz/v1/entities/byName",
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.shoal.xyz/v1/entities/byName"
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.shoal.xyz/v1/entities/byName")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoal.xyz/v1/entities/byName")
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_bodyThis is the canonical entity lookup surface. Use it when you have a name like
Ethereum, Binance, or Tether and need the stable Shoal entity id for traversal.
Query Parameters
name(string, required)entityName(string, optional) — Compatibility alias fornamelimit(integer, optional)offset(integer, optional)
Request
cURL
curl -X GET "https://api.shoal.xyz/v1/entities/byName?name=Ethereum" \
-H "Authorization: Bearer YOUR_API_KEY"
Response (200)
{
"data": [
{
"id": 23151,
"canonicalName": "Ethereum",
"displayName": "Ethereum",
"entityType": "project",
"status": "active",
"aliases": ["Ethereum Foundation", "ETH"],
"references": [],
"matchedVia": "canonical_name",
"matchType": "exact",
"matchRank": 0,
"matchedValue": "Ethereum"
}
]
}
Notes
idis the stable Shoal traversal id for the entity.referencesis present in the canonical entity contract even before richer reference storage is populated.matchedVia,matchType,matchRank, andmatchedValueexplain why the entity matched the query.- This route is the preferred canonical lookup surface going forward.
organizations/byOrganizationNameremains available as a compatibility route.
Errors
- 400 if
nameis missing - 500 on internal server error