Resolve a UniProtKB accession to a protein record
curl --request GET \
--url https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}import requests
url = "https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}', 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/uniprot/{uniprot_id}",
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/uniprot/{uniprot_id}"
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/uniprot/{uniprot_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}")
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{
"sequence": "<string>",
"protein_hash": "<string>",
"accession": "<string>",
"protein_name": "<string>",
"gene": "<string>",
"organism": "<string>",
"function": "",
"sequence_length": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Proteins
Resolve a UniProtKB accession to a protein record
Look up a UniProtKB accession or entry name (e.g. ‘P24941’, ‘P53_HUMAN’) and return its protein record: name, gene, organism, function, sequence, and the Atlas protein_hash. UniProtKB only — other accession namespaces (UniParc, MGnify, IMG) return 400.
GET
/
esm
/
protein
/
api
/
v1alpha1
/
uniprot
/
{uniprot_id}
Resolve a UniProtKB accession to a protein record
curl --request GET \
--url https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}import requests
url = "https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}', 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/uniprot/{uniprot_id}",
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/uniprot/{uniprot_id}"
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/uniprot/{uniprot_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/esm/protein/api/v1alpha1/uniprot/{uniprot_id}")
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{
"sequence": "<string>",
"protein_hash": "<string>",
"accession": "<string>",
"protein_name": "<string>",
"gene": "<string>",
"organism": "<string>",
"function": "",
"sequence_length": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
UniProtKB accession or entry name (e.g. 'P24941')
Response
Successful Response
A UniProtKB protein record resolved from an accession or entry name.
Amino acid sequence
MD5 of the upper-cased sequence — the Atlas content-address key; chain into GET /proteins/{protein_hash}/… reads
UniProtKB primary accession
Recommended full protein name
Primary gene name, if any
Source organism scientific name
Concatenated UniProt FUNCTION comments (may be empty)
Sequence length in residues