BYTETOOLS

UniProt API

Free UniProt REST API with no key: protein sequences, functions, structures and cross-references for every known protein. Field selection keeps responses small. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the UniProt API?

The UniProt REST API is a free, key-free interface to the world's central protein sequence and function database. It returns curated entries covering sequence, function, subcellular location, disease associations, structures and cross-references to hundreds of other biological databases.

UniProt is the reference protein database, maintained jointly by the EBI, SIB and PIR, and its REST API is what most bioinformatics tooling talks to. Entries come in two flavours that matter: Swiss-Prot entries are manually curated and reviewed by biocurators, while TrEMBL entries are automatically annotated. The `entryType` field tells you which you are looking at, and the difference in reliability between them is substantial.

Full UniProt entries are enormous — a well-studied human protein can run to hundreds of kilobytes of annotation with thousands of literature references. The `fields` parameter is therefore not an optimisation but a necessity: name the handful of attributes you actually need and the response shrinks by orders of magnitude. The same records are also available as FASTA, XML, RDF and TSV by changing the file extension.

Quick facts

Base URL
https://rest.uniprot.org
Authentication
No API key or account. UniProt asks that heavy programmatic users include a contact email in the User-Agent so they can get in touch about problem traffic.
Rate limit
No hard published limit. Large batch jobs should use the asynchronous ID mapping and stream endpoints rather than looping over single lookups.
Pricing
Free. Data is released under CC BY 4.0.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the UniProt API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch selected fields for human amyloid-beta precursor protein

GET https://rest.uniprot.org/uniprotkb/P05067.json?fields=accession,protein_name,organism_name

curl
curl 'https://rest.uniprot.org/uniprotkb/P05067.json?fields=accession,protein_name,organism_name'
JavaScript (fetch)
const res = await fetch("https://rest.uniprot.org/uniprotkb/P05067.json?fields=accession,protein_name,organism_name");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://rest.uniprot.org/uniprotkb/P05067.json?fields=accession,protein_name,organism_name", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "entryType": "UniProtKB reviewed (Swiss-Prot)",
  "primaryAccession": "P05067",
  "organism": {
    "scientificName": "Homo sapiens",
    "commonName": "Human",
    "taxonId": 9606,
    "lineage": [
      "Eukaryota",
      "Metazoa",
      "Chordata",
      "Craniata",
      "Vertebrata",
      "Euteleostomi",
      "Mammalia",
      "Eutheria",
      "Euarchontoglires",
      "Primates",
      "Haplorrhini",
      "Catarrhini",
      "Hominidae",
      "Homo"
    ]
  },
  "proteinDescription": {
    "recommendedName": {
      "fullName": {
        "evidences": [
          {
            "evidenceCode": "ECO:0000312",
            "source": "HGNC",
            "id": "HGNC:620"
          }
        ],
        "value": "Amyloid-beta precursor protein"
      },
      "shortNames": [
        {
          "evidences": [
            {
              "evidenceCode": "ECO:0000312",
              "source": "HGNC",
              "id": "HGNC:620"
            }
          ],
          "value": "APP"
        }
      ]
    },
    "alternativeNames": [
      {
        "fullName": {
          "value": "ABPP"
        }
      },
      {
        "fullName": {
          "value": "APPI"
        }
      },
      {
        "fullName": {
          "value": "Alzheimer disease amyloid A4 protein homolog"
        }
      },
      {
        "fullName": {
          "value": "Alzheimer disease amyloid protein"
        }
      },
      {
        "fullName": {
          "evidences": [
            {
              "evidenceCode": "ECO:0000305"
            }
          ],
          "value": "Amyloid precursor

Parameters

ParameterTypeRequiredDescription
accessionpath segmentRequiredUniProt accession, the stable identifier for an entry. Appending `.json` selects the format. P05067
fieldsqueryOptionalComma-separated list of the attributes to return. Without it you get the entire entry, which is very large. accession,protein_name,organism_name
formatextensionOptionalResponse format chosen by file extension: `.json`, `.fasta`, `.xml`, `.txt`, `.rdf` or `.tsv`. json
queryqueryOptionalOn the search endpoint, a Lucene-style query such as `gene:BRCA1 AND reviewed:true`. gene:APP
sizequeryOptionalPage size on search results, up to 500. Follow the `Link` response header for the next page. 25

Response fields

entryTypestring
Whether the entry is `UniProtKB reviewed (Swiss-Prot)` — manually curated — or `UniProtKB unreviewed (TrEMBL)`, which is automatically annotated and less reliable.
primaryAccessionstring
The stable accession for the entry. Secondary accessions from merged records also resolve here.
organismobject
`scientificName`, `commonName`, NCBI `taxonId` and the full taxonomic `lineage` array.
proteinDescription.recommendedNameobject
The curated preferred name, with `shortNames` and `alternativeNames` alongside it.
evidencesarray
Attached to most annotations: an ECO evidence code plus the source that supports the claim. This provenance is the reason UniProt is trusted.
sequenceobject
Amino acid sequence with length, molecular mass and a CRC64 checksum — only returned when requested via `fields`.

What you can build with the UniProt API

  • Resolve a protein accession to a human-readable name and organism
  • Pull FASTA sequences for a set of proteins in a bioinformatics pipeline
  • Cross-reference proteins to PDB structures, Ensembl genes or GO terms
  • Filter to reviewed Swiss-Prot entries only for a curated analysis

Common errors and how to fix them

404

Unknown or obsolete accession.

Fix: Deleted entries return 404 while merged ones redirect. Follow redirects, and check the UniProt history endpoint if an accession has vanished.

400

Malformed `fields` or `query` syntax.

Fix: Field names are exact and lowercase with underscores. Build the query in the web interface first, then copy it — the site and the API share a syntax.

Very large response

No `fields` parameter was supplied.

Fix: Always name the fields you need. A full entry for a well-studied protein can be hundreds of kilobytes.

UniProt API — frequently asked questions

Is the UniProt API free?

Yes, completely free with no API key or registration. The data is released under CC BY 4.0, so you may redistribute it with attribution.

What is the difference between Swiss-Prot and TrEMBL entries?

Swiss-Prot entries are manually reviewed by biocurators and carry evidence codes for their annotations; TrEMBL entries are automatically annotated and unreviewed. The `entryType` field distinguishes them, and for anything where accuracy matters you should filter to reviewed entries.

How do I get just a protein sequence from UniProt?

Request the accession with a `.fasta` extension instead of `.json` and you get a plain FASTA record. Alternatively request `fields=sequence` on the JSON endpoint to receive it with length and mass metadata.

How do I search UniProt by gene name?

Use the search endpoint with a query such as `gene:BRCA1 AND organism_id:9606 AND reviewed:true`. The API accepts the same query syntax as the UniProt website, so you can prototype a query there and paste it in.

Tools that pair with this API

UniProt is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.