# UniProt API
> The UniProt protein knowledge base as an API, powered by the official UniProt REST service curated by EMBL-EBI, SIB and PIR. Look up any protein by its UniProt accession for protein and gene names, organism, length, mass, function, keywords, Gene Ontology (GO) terms and linked PDB 3D structures; run full-text protein searches filtered by organism (NCBI taxon id) and Swiss-Prot review status; fetch amino-acid sequences with FASTA, molecular weight and CRC64 checksum; list sequence features such as signal peptides, chains, domains, active and binding sites, modified residues and natural variants, with a by-type breakdown; resolve NCBI taxonomy nodes with their full lineage; and pull reference proteomes with protein counts and genome-assembly ids. Across all kingdoms of life, from human to bacteria. Ideal for bioinformatics pipelines, drug-discovery and proteomics tools, sequence-analysis dashboards, academic research apps and life-science chatbots.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/uniprot-api/..."
```

## Pricing
- **Free** (Free) — 600 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 20,000 calls/Mo, 6 req/s
- **Pro** ($22/Mo) — 90,000 calls/Mo, 15 req/s
- **Mega** ($60/Mo) — 350,000 calls/Mo, 40 req/s

## Endpoints

### Proteins

#### `GET /v1/protein` — A full UniProtKB protein entry

**Parameters:**
- `id` (query, required, string) — UniProt accession, e.g. P01308 Example: `P01308`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uniprot-api/v1/protein?id=P01308"
```

**Response:**
```json
{
    "data": {
        "protein": {
            "mass": 11981,
            "genes": [
                "INS"
            ],
            "length": 110,
            "function": "Insulin decreases blood glucose concentration. It increases cell permeability to monosaccharides, amino acids and fatty acids. It accelerates glycolysis, the pentose phosphate cycle, and glycogen synthesis in liver",
            "go_count": 70,
            "go_terms": [
                "C:endoplasmic reticulum lumen",
                "C:endoplasmic reticulum-Golgi intermediate compartment membrane",
                "C:endosome lumen",
                "C:extracellular region",
                "C:extracellular space",
                "C:Golgi lumen",
                "C:Golgi membrane",
                "C:secretory granule lumen",
                "C:transport vesicle",
                "F:hormone activity",
                "F:identical protein binding",
                "F:insulin receptor binding",
                "F:insulin-like growth factor receptor binding",
                "F:protease binding",
                "F:receptor ligand activity",
                "P:acute-phase response",
                "P:alpha-beta T cell activation",
                "P:cell-cell signaling",
                "P:cognition",
                "P:fatty acid homeostasis",
                "P:G protein-coupled receptor signaling pathway",
                "P:glucose homeostasis",
                "P:glucose metabolic process",
       
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Full-text protein search

**Parameters:**
- `query` (query, required, string) — Search text, e.g. insulin Example: `insulin`
- `organism` (query, optional, string) — NCBI taxon id filter, e.g. 9606 Example: `9606`
- `reviewed` (query, optional, string) — true = Swiss-Prot only Example: `true`
- `limit` (query, optional, string) — Max results (1-100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uniprot-api/v1/search?query=insulin&organism=9606&reviewed=true"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "query": "insulin",
        "results": [
            {
                "genes": [
                    "INS"
                ],
                "length": 110,
                "organism": "Homo sapiens",
                "reviewed": true,
                "taxon_id": 9606,
                "accession": "P01308",
                "entry_name": "INS_HUMAN",
                "protein_name": "Insulin"
            },
            {
                "genes": [
                    "INSR"
                ],
                "length": 1382,
                "organism": "Homo sapiens",
                "reviewed": true,
                "taxon_id": 9606,
                "accession": "P06213",
                "entry_name": "INSR_HUMAN",
                "protein_name": "Insulin receptor"
            },
            {
                "genes": [
                    "IDE"
                ],
                "length": 1019,
                "organism": "Homo sapiens",
                "reviewed": true,
                "taxon_id": 9606,
                "accession": "P14735",
                "entry_name": "IDE_HUMAN",
                "protein_name": "Insulin-degrading enzyme"
            },
            {
                "genes": [
                    "INSL5"
                ],
                "length": 135,
                "organism": "Homo sapiens",
                "reviewed": true,
                "taxon_id": 9606,
                "accession": "Q9Y5Q6",
          
…(truncated, see openapi.json for full schema)
```

### Sequences

#### `GET /v1/features` — Sequence features (domains, sites, variants…)

**Parameters:**
- `id` (query, required, string) — UniProt accession Example: `P01308`
- `type` (query, optional, string) — Filter by feature type, e.g. Domain
- `limit` (query, optional, string) — Max features (1-500)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uniprot-api/v1/features?id=P01308"
```

**Response:**
```json
{
    "data": {
        "count": 34,
        "total": 34,
        "by_type": {
            "Signal": 1,
            "Peptide": 2,
            "Propeptide": 1,
            "Disulfide bond": 3,
            "Natural variant": 27
        },
        "features": [
            {
                "end": 24,
                "type": "Signal",
                "start": 1,
                "feature_id": null,
                "description": null
            },
            {
                "end": 54,
                "type": "Peptide",
                "start": 25,
                "feature_id": "PRO_0000015819",
                "description": "Insulin B chain"
            },
            {
                "end": 87,
                "type": "Propeptide",
                "start": 57,
                "feature_id": "PRO_0000015820",
                "description": "C peptide"
            },
            {
                "end": 110,
                "type": "Peptide",
                "start": 90,
                "feature_id": "PRO_0000015821",
                "description": "Insulin A chain"
            },
            {
                "end": 96,
                "type": "Disulfide bond",
                "start": 31,
                "feature_id": null,
                "description": "Interchain (between B and A chains)"
            },
            {
                "end": 109,
                "type": "Disulfide bond",
                "start": 43,
                "feature_id": null,
                "desc
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/sequence` — Amino-acid sequence + FASTA

**Parameters:**
- `id` (query, required, string) — UniProt accession Example: `P01308`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uniprot-api/v1/sequence?id=P01308"
```

**Response:**
```json
{
    "data": {
        "md5": "12E9C9E4E2835C302E8BA615115EDDA3",
        "mass": 11981,
        "crc64": "C2C3B23B85E520E5",
        "fasta": ">sp|P01308|INS_HUMAN Insulin OS=Homo sapiens OX=9606 GN=INS PE=1 SV=1\nMALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAED\nLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN",
        "length": 110,
        "organism": "Homo sapiens",
        "sequence": "MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN",
        "accession": "P01308",
        "entry_name": "INS_HUMAN",
        "protein_name": "Insulin"
    },
    "meta": {
        "timestamp": "2026-06-01T00:03:28.548Z",
        "request_id": "db305f81-086d-461a-b734-414e6d224ed7"
    },
    "status": "ok",
    "message": "Sequence retrieved",
    "success": true
}
```

### Taxonomy

#### `GET /v1/proteome` — Reference proteomes

**Parameters:**
- `organism` (query, optional, string) — NCBI taxon id, e.g. 9606 Example: `9606`
- `id` (query, optional, string) — Or a proteome id, e.g. UP000005640

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uniprot-api/v1/proteome?organism=9606"
```

**Response:**
```json
{
    "data": {
        "count": 2,
        "organism": 9606,
        "proteomes": [
            {
                "id": "UP000005640",
                "type": "Reference and representative proteome",
                "organism": "Homo sapiens",
                "taxon_id": 9606,
                "genome_source": "Ensembl",
                "protein_count": 83526,
                "genome_assembly": "GCA_000001405.29"
            },
            {
                "id": "UP001055169",
                "type": "Excluded",
                "organism": "Homo sapiens",
                "taxon_id": 9606,
                "genome_source": "ENA/EMBL",
                "protein_count": 54825,
                "genome_assembly": "GCA_022833125.2"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:03:28.674Z",
        "request_id": "4a999c1b-3613-493e-b3f7-f871c4033129"
    },
    "status": "ok",
    "message": "Proteomes retrieved",
    "success": true
}
```

#### `GET /v1/taxonomy` — An NCBI taxonomy node

**Parameters:**
- `id` (query, optional, string) — NCBI taxon id, e.g. 9606 Example: `9606`
- `name` (query, optional, string) — Or search by name

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uniprot-api/v1/taxonomy?id=9606"
```

**Response:**
```json
{
    "data": {
        "taxon": {
            "rank": "species",
            "lineage": [
                "cellular organisms",
                "Eukaryota",
                "Opisthokonta",
                "Metazoa",
                "Eumetazoa",
                "Bilateria",
                "Deuterostomia",
                "Chordata",
                "Craniata",
                "Vertebrata",
                "Gnathostomata",
                "Teleostomi",
                "Euteleostomi",
                "Sarcopterygii",
                "Dipnotetrapodomorpha",
                "Tetrapoda",
                "Amniota",
                "Mammalia",
                "Theria",
                "Eutheria",
                "Boreoeutheria",
                "Euarchontoglires",
                "Primates",
                "Haplorrhini",
                "Simiiformes",
                "Catarrhini",
                "Hominoidea",
                "Hominidae",
                "Homininae",
                "Homo"
            ],
            "mnemonic": "HUMAN",
            "taxon_id": 9606,
            "parent_id": 9605,
            "common_name": "Human",
            "scientific_name": "Homo sapiens"
        }
    },
    "meta": {
        "timestamp": "2026-06-01T00:03:28.768Z",
        "request_id": "549cd38c-23db-4dd2-ae82-e90fa76e7c39"
    },
    "status": "ok",
    "message": "Taxonomy retrieved",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uniprot-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "The UniProt protein knowledge base. /v1/protein?id=P01308 = a full UniProtKB entry (protein & gene names, organism, length, mass, function, keywords, GO terms, PDB structures, reviewed/Swiss-Prot flag); /v1/search?query=insulin&organism=9606&reviewed=true = full-text protein search (organism = NCBI taxon id); /v1/sequence?id=P01308 = the amino-acid sequence plus FASTA, mass & CRC64; /v1/features?id=P01308 = sequence features (signal peptides, chains, domains, active/binding sites, modified residues, natural variants…) with a by-type breakdown (filter type=Domain); /v1/taxonomy?id=9606 (or name=Escherichia coli) = an NCBI taxonomy node with lineage; /v1/proteome?organism=9606 (or id=UP000005640) = reference proteomes with protein counts & genome assembly. Accessions look like P01308 or A0A0C5B5G6. Curated by EMBL-EBI, SIB & PIR.",
        "source": "UniProt REST API (rest.uniprot.org) — UniProtKB, taxonomy & proteomes",
        "endpoints": [
            "/v1/protein",
            "/v1/search",
            "/v1/sequence",
            "/v1/features",
            "/v1/taxonomy",
            "/v1/proteome",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:03:28.826Z",
        "request_id": "878be616-84e1-4954-a5f2-eb07d182d746"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/uniprot-api
OpenAPI spec: https://www.oanor.com/api/uniprot-api/openapi.json
