curl --request GET \
--url https://biohub.ai/esm/protein/api/v1alpha1/similarity-searchimport requests
url = "https://biohub.ai/esm/protein/api/v1alpha1/similarity-search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://biohub.ai/esm/protein/api/v1alpha1/similarity-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://biohub.ai/esm/protein/api/v1alpha1/similarity-search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://biohub.ai/esm/protein/api/v1alpha1/similarity-search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://biohub.ai/esm/protein/api/v1alpha1/similarity-search")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/esm/protein/api/v1alpha1/similarity-search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"query_sequence": "<string>",
"similar_proteins": [
{
"protein_hash": "<string>",
"protein_accession": "<string>",
"sequence_length": 123,
"similarity_score": 123,
"pdb": "<string>",
"ptm": 123,
"mean_plddt": 123,
"residues_plddt": [
123
],
"cluster_size": 123,
"protein_name": "<string>"
}
],
"protein_hash": "<string>",
"top_features_across_results": [],
"restricted_count": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Search for similar proteins using SAE feature vectors
Submit an amino acid sequence and find similar proteins in the atlas based on SAE feature vector similarity.
curl --request GET \
--url https://biohub.ai/esm/protein/api/v1alpha1/similarity-searchimport requests
url = "https://biohub.ai/esm/protein/api/v1alpha1/similarity-search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://biohub.ai/esm/protein/api/v1alpha1/similarity-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://biohub.ai/esm/protein/api/v1alpha1/similarity-search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://biohub.ai/esm/protein/api/v1alpha1/similarity-search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://biohub.ai/esm/protein/api/v1alpha1/similarity-search")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/esm/protein/api/v1alpha1/similarity-search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"query_sequence": "<string>",
"similar_proteins": [
{
"protein_hash": "<string>",
"protein_accession": "<string>",
"sequence_length": 123,
"similarity_score": 123,
"pdb": "<string>",
"ptm": 123,
"mean_plddt": 123,
"residues_plddt": [
123
],
"cluster_size": 123,
"protein_name": "<string>"
}
],
"protein_hash": "<string>",
"top_features_across_results": [],
"restricted_count": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Query Parameters
Amino acid sequence
1 - 2048Number of similar proteins to return
x <= 100Number of top features to return
x <= 100Minimum similarity score; results below this threshold are excluded
0 <= x <= 1If set, only return hits whose cluster_pct_characterized is <= this value. Use 0 to find clusters whose members have no characterized Pfam annotations (proxy for uncharacterized / novel).
0 <= x <= 100If true, each result includes the representative protein's cluster_size and human-readable protein_name, sparing the caller a follow-up /clusters/{hash} request per result.
Response
Successful Response
Response schema for V2 SAE search endpoint.
Normalized query amino acid sequence
List of similar proteins
Show child attributes
Show child attributes
MD5 hash of the query sequence; present only when the protein exists in the atlas
Top SAE features commonly activated across similar proteins
Show child attributes
Show child attributes
Number of proteins removed from results that are similar to the deny list proteins