# How to Retrieve Multiple Protein Sequences from UniProt at Once

By the end of this tutorial you will be able to batch download protein sequences uniprot holds in its knowledgebase, in FASTA format, using four different routes: the UniProt website export, the REST API with curl, the ID mapping service for accession lists, and a scripted BioPerl approach. You will also know how to verify the download, which sequence subsets to request for common tasks, and which mistakes produce truncated or silently wrong datasets.

Here is what you need on hand before starting:

- A computer with internet access and either a terminal (macOS, Linux, or Windows with WSL) or a Python 3.8 or later installation.
- curl, which ships with macOS and most Linux distributions.
- Optionally, Perl with BioPerl installed if you want the scripted library route, and wget if you prefer it over curl for large files.
- A text file containing your protein identifiers if you already have a list (one accession per line, for example P69905, P68871, Q9BQB4).

The UniProt Knowledgebase is the reference storehouse of [protein sequence](/blog/guides/protein-sequence) and functional annotation, split into the manually curated Swiss-Prot section and the computationally annotated TrEMBL section, and it cross-links to UniRef clusters and the UniParc sequence archive [1]. Because the resource holds on the order of 190 million sequences and continues to reduce redundancy at the proteome level, typing accessions into a web form one at a time stopped being viable years ago. Batch retrieval is the normal workflow, and UniProt provides first-class support for it [2].

## How UniProt Is Organized, and Why It Matters for Batch Downloads

A short tour of the resource will save you from the most common download errors, because every batch decision depends on which slice of UniProt you actually want.

UniProt consists of three linked components. The UniProt Knowledgebase (UniProtKB) stores sequences with functional annotation and comes in two flavors: UniProtKB/Swiss-Prot, where entries are reviewed by human curators, and UniProtKB/TrEMBL, where annotation is generated automatically [1]. The UniProt Reference Clusters (UniRef) merge identical or near-identical sequences at 100%, 90%, or 50% identity thresholds to speed similarity searches, and UniParc stores every publicly available sequence with its history and source-database links [1].

Three consequences matter for batch retrieval:

1. **Scope.** If you want high-confidence sequences for machine learning, structure work, or phylogeny, restrict to reviewed Swiss-Prot entries or to a reference proteome. The full TrEMBL complement is enormous, roughly 190 million sequences as of the 2021 release, most of it redundant at the protein and proteome level [2]. Recent UniProt pipeline work explicitly limits sequences in UniProtKB to high-quality, non-redundant reference proteomes, which changes what a "download everything for organism X" query returns between releases [3].
2. **Stability.** Accessions can merge, split, or become obsolete. A script that worked last year can return fewer sequences this year. Plan a verification step (covered later) rather than assuming the file is complete.
3. **License.** UniProtKB is distributed under a CC-BY (4.0) license, so redistribution in publications, supplementary files, and derived databases is permitted with attribution [2]. UniProt has been awarded Global Core Biodata Resource status, which reflects its role as core infrastructure rather than a convenience service [3].

UniProt is accessed through the website at https://www.uniprot.org and through a REST API at https://rest.uniprot.org that returns plain text, FASTA, TSV, and other formats without authentication. If you are learning how to use UniProt for the first time, the mental model is simple: the website search box and the REST `query` parameter share the same query language, so anything you can search you can also script.

## Method 1: Download from the UniProt Website (Search and Export)

This is the right starting point for a few hundred to a few tens of thousands of sequences, and it doubles as a way to preview the query you will later reuse in scripts.

**Step 1. Open the protein search page.** Go to https://www.uniprot.org and click "Search" in the UniProtKB section, or navigate directly to the UniProtKB query page.

**Step 2. Build a query in the search box.** The query language supports field names with colons, Boolean operators in uppercase, and parentheses. Useful examples:

```
organism_id:9606 AND reviewed:true
protein_name:hemoglobin AND organism_id:9606
gene:BRCA1 AND organism_id:9606
proteome:UP000005640
```

`organism_id:9606` uses the NCBI taxonomy identifier for human, `reviewed:true` restricts to Swiss-Prot, and `proteome:UP000005640` restricts to a specific proteome accession, which you can find on any proteome page. Note that inside URLs a space is written as `+` or `%20` and a colon as `%3A`, which matters when you reuse the query in Method 2.

**Step 3. Inspect the result count.** The page reports the number of matching entries at the top. This number is your ground truth for later verification. Write it down.

**Step 4. Export the results.** Click the "Download" button above the results table. A dialog offers:

- **Format:** choose `FASTA (uncompressed)` or `FASTA (compressed)`. Compressed is a gzip archive and is the better choice above a few thousand entries.
- **Columns:** when downloading FASTA, headers include the entry name and description by default. If you want a tabular metadata file in parallel, choose `TSV` or `Excel` and pick columns such as Entry, Protein names, Gene Names, Organism, and Length.

**Step 5. Save the file and name it with the query and date.** Something like `human_reviewed_2026-11-11.fasta.gz` makes later re-downloads and provenance tracking much easier.

**What the output looks like.** Open the uncompressed file and you should see entries like:

```
>sp|P69905|HBA_HUMAN Hemoglobin subunit alpha OS=Homo sapiens OX=9606 GN=HBA1 PE=1 SV=2
MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHG
KKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHLPAEFTP
...
```

The header encodes the database tag (`sp` for Swiss-Prot, `tr` for TrEMBL), the primary accession, the entry name, and structured fields (`OS` organism, `OX` taxonomy ID, `GN` gene, `PE` evidence level, `SV` sequence version). Many downstream tools parse these tags, so keep the default header format unless you have a reason not to.

**Limits.** The synchronous website export is comfortable up to tens of thousands of entries. For queries returning hundreds of thousands or millions of entries, use the asynchronous REST endpoints in Method 2 or the prebuilt files in Method 4, which exist precisely because interactive exports time out.

## Method 2: Batch Download Protein Sequences UniProt Makes Available Through the REST API

This is the workhorse for reproducible pipelines. Everything runs from the shell with curl, and the same URLs work in Python, R, or any HTTP client.

### 2.1 Stream a Whole Query Result to a FASTA File

The streaming endpoint accepts the same query language as the website:

```bash
curl -s -G "https://rest.uniprot.org/uniprotkb/stream" \
  -d "query=organism_id:9606+AND+reviewed:true" \
  -d "format=fasta" \
  -o human_reviewed.fasta
```

Parameters that matter:

- `query`: the UniProt query string. URL-encode spaces as `+`. Common fields are `organism_id`, `reviewed`, `protein_name`, `gene`, `proteome`, `keyword`, `go`, and `accession`.
- `format`: `fasta` for sequences, `tsv` for metadata, `txt` for full flat-file entries. For FASTA plus selected metadata you can pass `fields=accession,id,protein_name,organism_name,cc_subcellular_location&format=tsv`.
- `compressed=true`: returns gzip. Add this for anything large.
- `-o`: writes to a file rather than the terminal. The `-s` flag suppresses the curl progress meter.

Add `compressed=true` for a human proteome scale run and decompress with `gunzip human_reviewed.fasta.gz`.

### 2.2 Fetch One Sequence by Accession

For a single entry the direct endpoint is simplest:

```bash
curl -s "https://rest.uniprot.org/uniprotkb/P69905.fasta"
```

Expected output:

```
>sp|P69905|HBA_HUMAN Hemoglobin subunit alpha OS=Homo sapiens OX=9606 GN=HBA1 PE=1 SV=2
MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHG
...
```

This single-entry endpoint is exactly how many published machine learning studies assemble small datasets. For example, work on predicting Porphyromonas gingivalis resistant efflux proteins started from the UniProt ID A0A0K2J2N6_PORGN, obtained FASTA sequences, and applied quality assurance before model training [4]. The same one-at-a-time retrieval pattern underlies datasets built around sclerostin and related proteins identified by UniProt IDs such as Q9BQB4, Q6X4U4, and O75197 [5]. When you move past a handful of IDs, switch to the batch approaches below.

### 2.3 Download Sequences for a List of Accessions with ID Mapping

![Flowchart from an ID file through job submission, status checks, FASTA streaming and a check for missing IDs.](/article-images/illustrations/batch-download-protein-sequences-uniprot-idmapping-workflow.webp)

Given a text file of identifiers (accessions, gene names, RefSeq or Ensembl IDs, PDB IDs), the clean route is UniProt's ID mapping service. You submit the list as a job, wait for it to finish, then stream the results in FASTA.

**Step 1. Prepare the ID file.** One identifier per line, no quotes:

```
P69905
P68871
P02042
```

**Step 2. Submit the job.**

```bash
curl -s -X POST "https://rest.uniprot.org/idmapping/run" \
  -d "from=UniProtKB_AC-ID" \
  -d "to=UniProtKB_AC-ID" \
  -d "ids=$(paste -s -d, id_list.txt)"
```

- `from` and `to` name the identifier types. For plain UniProt accessions use `UniProtKB_AC-ID` on both sides. Other supported values include `Gene_Name`, `RefSeq_Protein`, `Ensembl_Protein`, and `PDB`, which is handy when your starting point is a structural database. This cross-reference problem is common in structure work, where tools such as PDBrenum rely on the SIFTS mapping to associate PDB entries with the correct UniProt sequence and renumber residues to match it [6].
- `ids` is a comma-separated string. The `paste -s -d,` shell idiom collapses your newline-separated file into `P69905,P68871,P02042`.

**Step 3. Read the job ID.** The response is JSON containing a `jobId`, for example:

```json
{"jobId":"9e2a4f0c8b1d47f3a5c6e70213f8b9a4"}
```

**Step 4. Poll until finished.**

```bash
curl -s "https://rest.uniprot.org/idmapping/status/9e2a4f0c8b1d47f3a5c6e70213f8b9a4"
```

When the response contains `"jobStatus":"FINISHED"`, proceed. For big jobs poll every few seconds in a loop.

**Step 5. Stream the mapped sequences.**

```bash
curl -s -G "https://rest.uniprot.org/idmapping/uniprotkb/results/stream/9e2a4f0c8b1d47f3a5c6e70213f8b9a4" \
  -d "format=fasta" \
  -o mapped_batch.fasta
```

A Python wrapper that does the whole job end to end looks like this:

```python
import time
import requests

BASE = "https://rest.uniprot.org"

def run_idmapping(ids, from_db="UniProtKB_AC-ID", to_db="UniProtKB_AC-ID"):
    resp = requests.post(
        f"{BASE}/idmapping/run",
        data={"from": from_db, "to": to_db, "ids": ",".join(ids)},
        timeout=60,
    )
    resp.raise_for_status()
    job_id = resp.json()["jobId"]

    while True:
        status = requests.get(f"{BASE}/idmapping/status/{job_id}", timeout=60).json()
        if status.get("jobStatus") in ("FINISHED", "ERROR"):
            break
        time.sleep(3)

    if status.get("jobStatus") == "ERROR":
        raise RuntimeError(status)

    fasta_resp = requests.get(
        f"{BASE}/idmapping/uniprotkb/results/stream/{job_id}",
        params={"format": "fasta"},
        timeout=300,
    )
    fasta_resp.raise_for_status()
    return fasta_resp.text

if __name__ == "__main__":
    with open("id_list.txt") as fh:
        ids = [line.strip() for line in fh if line.strip()]
    fasta_text = run_idmapping(ids)
    with open("mapped_batch.fasta", "w") as out:
        out.write(fasta_text)
```

**Expected output.** A FASTA file where each header carries the UniProt accession, in the same `sp|ACCESSION|NAME` or `tr|ACCESSION|NAME` format as above.

### 2.4 Alternative: Query with an OR List

For lists of a few hundred accessions you can skip ID mapping and build a query directly:

```bash
python3 - <<'EOF'
ids = [line.strip() for line in open("id_list.txt") if line.strip()]
query = " OR ".join(f"accession:{i}" for i in ids)
print(query)
EOF
```

Paste the result into the stream call:

```bash
curl -s -G "https://rest.uniprot.org/uniprotkb/stream" \
  -d "query=accession:P69905+OR+accession:P68871+OR+accession:P02042" \
  -d "format=fasta" -o small_batch.fasta
```

This is convenient for small sets but unwieldy and fragile for thousands of IDs, where URL length limits and escaping bite. Use ID mapping beyond a few hundred identifiers.

## Method 3: Scripted Retrieval with BioPerl

When your pipeline is already in Perl, BioPerl's database modules handle retrieval and parsing in one place, and this route has a documented track record. A BioPerl-based workflow was used to download the complete protein sequence set of Populus trichocarpa from UniProt precisely because scripted access avoids manual copying and preserves accuracy across thousands of entries [7].

A minimal script that fetches Swiss-Prot entries and writes them to a FASTA file:

```perl
#!/usr/bin/perl
use strict;
use warnings;
use Bio::Perl;
use Bio::SeqIO;

my @ids = qw(P69905 P68871 P02042);
my $out = Bio::SeqIO->new(-file => ">batch_output.fasta", -format => "fasta");

foreach my $id (@ids) {
    eval {
        my $seq = get_sequence("swissprot", $id);
        $out->write_seq($seq);
    };
    if ($@) {
        warn "FAILED: $id\n";
    }
}
```

What each line does:

- `Bio::SeqIO` is the sequence input and output factory. `-format => "fasta"` writes standard FASTA, which downstream tools accept.
- `get_sequence("swissprot", $id)` performs network retrieval from the Swiss-Prot source through BioPerl's remote database adapters. Substitute `"refseq"` or `"genbank"` if your IDs come from those databases.
- The `eval` block keeps one dead accession from aborting the whole run and logs it for a retry pass.

Run it with:

```bash
perl fetch_batch.pl
```

The strength of this approach is that parsed `Bio::Seq` objects give you immediate access to sequence length, description, and alphabet, so you can filter or reformat in the same script instead of shelling out to other tools. If you prefer Python, the requests-based code in Method 2.3 covers the same ground.

## Method 4: Whole Proteomes and Prebuilt Files

For anything at proteome scale or larger, do not stream entry by entry. UniProt publishes complete proteome files and full-database files that you download in one HTTP or FTP request.

**Per-proteome FASTA.** Every proteome has a stable accession such as UP000005640 for the human reference proteome. On the proteome page, use the Download button to fetch the FASTA, or construct the REST call:

```bash
curl -s -G "https://rest.uniprot.org/uniprotkb/stream" \
  -d "query=proteome:UP000005640" \
  -d "format=fasta" \
  -d "compressed=true" \
  -o human_proteome.fasta.gz
```

Restricting to reference proteomes is the recommended default. UniProt's production pipeline now limits UniProtKB content to high-quality, non-redundant reference proteomes, so proteome-scoped downloads give you a cleaner, more defensible dataset than unfiltered searches [3]. Systems that predict Gene Ontology functions across many species, such as UniGOPred, run against the proteomes of several organisms stored in UniProtKB, which illustrates why proteome-level files are the standard unit of batch retrieval [8].

**Complete database files.** Full UniProtKB releases and sequence collections by taxonomic division and complete proteomes have been part of UniProt's download offering since the early days of the resource, and they remain the fastest way to obtain everything at once [1]. On the website these live under the Downloads section, with gzip-compressed FASTA for Swiss-Prot and TrEMBL.

A practical rule of thumb: if your target set exceeds roughly one hundred thousand sequences, prefer a prebuilt file or a proteome-scoped compressed stream over any iterative per-accession script.

## Choosing Among the Methods

![Decision tree leading from set size to website export, REST stream, ID mapping or prebuilt proteome files.](/article-images/illustrations/batch-download-protein-sequences-uniprot-method-choice.webp)

| Method | Best for | Typical size | Key command or action |
|, - |, - |, - |, - |
| Website search and Download button | Exploratory queries, small to medium sets | Up to tens of thousands | Build query, click Download, choose FASTA (compressed) |
| REST stream endpoint | Reproducible pipelines, medium to large queries | Thousands to hundreds of thousands | `curl -d "query=..." -d "format=fasta"` on `/uniprotkb/stream` |
| ID mapping service | Converting an ID list from another database | Hundreds to millions of IDs | POST to `/idmapping/run`, poll status, stream results |
| Prebuilt proteome and database files | Whole organisms, complete releases | Millions | Download proteome FASTA or full-database archives |
| BioPerl script | Perl pipelines needing parsed objects in-line | Hundreds to thousands | `get_sequence("swissprot", $id)` with `Bio::SeqIO` |

Two format notes that prevent rework. First, FASTA is the interchange format that essentially every downstream tool consumes, from alignment and prediction servers to machine learning frameworks. Published pipelines regularly state that sequences were obtained from UniProt and formatted as FASTA before analysis, whether for coiled-coil domain prediction [9] or for deep-learning function prediction trained on UniProt-SwissProt data [10]. Second, if you need annotation alongside sequences, fetch a parallel TSV with the same query and `format=tsv`, then join the files on the accession. Do not try to pack metadata into FASTA headers you edit by hand, because it desynchronizes downstream bookkeeping.

## Verification: How to Check Your Download Is Correct

Never trust a batch download without three cheap checks.

**Check the count.** Count FASTA records and compare to the result count you noted from the website:

```bash
grep -c "^>" mapped_batch.fasta
```

If the search page reported 20,152 reviewed human entries and your file has 20,151, something dropped. Common causes are covered in the next section.

**Check the headers and lengths.** Look at a sample of headers and confirm the organism and database tag match what you intended:

```bash
grep "^>" mapped_batch.fasta | head -5
```

Then get a length distribution, since a single concatenated record or an accidental DNA sequence shows up immediately:

```bash
awk '/^>/{if(len)print len; len=0; next}{len+=length($0)}END{print len}' mapped_batch.fasta | sort -n | uniq -c | head
```

Every record should be a plausible protein length (tens to thousands of residues) and contain only the 20 standard amino acid letters plus the ambiguity codes B, Z, X, and the rare U and O. A quick alphabet check:

```bash
sed '/^>/d' mapped_batch.fasta | tr -d '\n' | fold -w1 | sort -u
```

**Check against your input list.** For accession-list downloads, confirm every requested identifier appears exactly once in the output headers:

```bash
while read -r acc; do
  grep -q "|$acc|" mapped_batch.fasta || echo "MISSING: $acc"
done < id_list.txt
```

Also strip duplicate sequences when your downstream method requires uniqueness. Datasets built from UniProtKB routinely undergo preprocessing in which identical sequences are grouped under the same heading before modeling [11], and the UniRef clusters exist precisely to collapse redundancy at 100%, 90%, or 50% identity [1]. Whether to deduplicate is a scientific decision, not a mechanical one, but you should know your duplication rate either way.

## Common Mistakes and Limitations

These are the failures that produce silent errors, wasted compute, or wrong biological conclusions.

**1. Confusing canonical sequences with isoforms.** A UniProt accession like Q9BQB4 resolves to the canonical sequence, while Q9BQB4-1 and Q9BQB4-2 are named isoforms produced by alternative splicing. Datasets that need one sequence per gene should use the canonical form, which is the default in FASTA downloads, whereas studies of transcript-variant effects must deliberately include isoform accessions, as done in work on PTEN and CHD8 variants [8] and in sclerostin variant datasets that list Q9BQB4 alongside Q9BQB4-1 and Q9BQB4-2 [5]. If you mix both levels unintentionally you get duplicate-looking proteins with overlapping sequences.

**2. Ignoring the reviewed versus unreviewed distinction.** A query without `reviewed:true` returns mostly TrEMBL entries, which carry automated annotation. For some purposes that breadth is the point, and large-scale domain discovery has processed full Swiss-Prot releases in this spirit [12]. For comparative analyses, curated Swiss-Prot subsets are smaller, cleaner, and traceable. Decide once per project and record the choice in your methods section.

**3. Not compressing large downloads.** Multi-hundred-megabyte plain FASTA files waste bandwidth and disk and slow every subsequent grep and awk. Add `compressed=true` to stream calls and pick the compressed option on the website for anything big.

**4. Assuming the ID mapping is one to one.** When you map from gene names, RefSeq IDs, or PDB IDs, one input ID can yield multiple UniProt entries, and different input IDs can converge on the same entry. The result stream can therefore be larger or smaller than your input list, and neither direction is an error. Inspect the mapping results, not just the final FASTA. Structural biologists face this constantly, since many PDB entries map to the same UniProt sequence, which is why PDBrenum exists to reconcile author residue numbering with UniProt-derived numbering through the SIFTS correspondence [6].

**5. Missing obsolete or merged accessions.** An accession in your list may have been merged or retired. In a streaming query the invalid accession simply matches nothing, so your file is short by exactly those entries and nothing warns you. The per-list verification command above catches this. Resolve outdated accessions through the UniProt entry page, which lists history and suggested replacements.

**6. Hammering the service in a tight loop.** Fetching tens of thousands of entries with one request per accession is slow and unkind to a shared public resource. Batch by query, use ID mapping for lists, and use prebuilt files for proteomes. Any pipeline that must stay current also needs a re-download schedule, because UniProtKB changes with every release, and datasets that fed predictors built from UniProt in 2016 differ from today's releases in size, redundancy, and annotation depth [8].

**7. Forgetting sequence versions in provenance.** The `SV=n` field in the FASTA header is the sequence version. Two downloads months apart can carry different SV values for the same accession, meaning the sequence changed. Record the download date and, ideally, the release version so results remain reproducible. Machine learning studies that train on UniProt-derived FASTA data depend on this kind of dataset stabilization before results can be compared across groups [4].

**8. Mixing DNA with protein in one file.** If your ID list is ambiguous, a gene-name query can pull nucleotide-derived artifacts or fragments. The alphabet check in the verification section catches non-amino-acid characters. Filter with `reviewed:true` or restrict to a reference proteome to avoid most of these strays [3].

**9. Treating FASTA line-wrapping as significant.** Some older scripts assume a fixed 60 or 80 characters per line. Line breaks in FASTA are cosmetic. If a tool complains, reformat with a single pass rather than hand-editing.

## Practical Tips for Reliable Batch Downloads

**Record the query, not just the file.** Save the exact query string (for example `organism_id:9606 AND reviewed:true`) in a text file next to the FASTA. Re-running the same query is the only honest way to refresh a dataset.

**Pin reviewed status and taxonomy ID.** Searching by organism name invites ambiguity. Taxonomy IDs and the `reviewed` field make the query deterministic.

**Fetch metadata in parallel.** Run the identical query twice, once with `format=fasta` and once with `format=tsv` plus your chosen `fields`, then keep both files. Later steps that need protein names, lengths, or GO terms can join on the accession without a second download.

**Chunk very large lists.** If you must fetch by accession, split the list into blocks of a few thousand, map each block, and concatenate. This keeps individual requests small and makes retry logic trivial:

```bash
split -l 2000 -d id_list.txt block_
for f in block_*; do
  echo "processing $f"
done
```

**Expect and tolerate partial failures.** Published pipelines that start from UniProt FASTA sequences routinely pass them through quality assurance before modeling [4], and the same discipline applies to retrieval itself. Log any identifier that returns nothing and decide whether it is obsolete, misspelled, or from the wrong identifier namespace.

**Match the dataset to the method.** Methods trained or evaluated on curated data, such as function predictors trained on UniProt-SwissProt [10], domain classifiers evaluated on Swiss-Prot releases [12], and disorder predictors designed to run at whole-proteome scale [13], all assume the input reflects the kind of sequences their training data contained. A reviewed, reference-proteome FASTA is the safest input for those tools. Datasets for fungi GO classification were likewise collected from UniProt and labeled before modeling [14], showing that retrieval, labeling, and modeling decisions form one chain.

## Next Steps in Your Pipeline

Once the FASTA file is verified, the standard destinations are well trodden. For functional annotation, you can feed sequences into GO-based predictors that take UniProt-derived FASTA as input [8]. For enzyme classification, ensemble tools such as ECPred predict EC numbers across a hierarchy of 858 classes from sequence input [15]. For structural and disorder features, predictors handle batch submissions, and modern fast tools are designed to scale to whole proteomes, which matches the file sizes you now produce [13]. For sequence encoding and similarity features, pseudo-component generators turn raw FASTA into numeric feature vectors for machine learning [16], and language-model based pipelines consume FASTA directly [17].

Whatever the destination, the same discipline applies at every handoff: keep the query, the date, the release, and the verification counts with the file. A batch download from UniProt takes minutes. Reproducing it a year later without provenance takes days.

## Frequently Asked Questions

### Can I download all protein sequences for one organism in one file?

Yes. Query with `organism_id:<taxonomy ID>` through the stream endpoint or click Download on the website results, and for reference proteomes use the `proteome:UPXXXXXX` query or the proteome page download button. Add `compressed=true` for anything above a few thousand entries.

### What is the difference between reviewed and unreviewed entries?

Reviewed entries form UniProtKB/Swiss-Prot, where curators check the sequence and annotation, while unreviewed entries form TrEMBL with automated annotation. Use `reviewed:true` in your query to restrict to Swiss-Prot, which is usually the right choice for curated datasets.

### How do I download sequences for a list of accession numbers?

Submit the list to the ID mapping service with POST to `https://rest.uniprot.org/idmapping/run`, poll the status endpoint with the returned job ID, then stream results with `format=fasta`. For lists of a few hundred you can instead build an OR query on `accession:` terms.

### Why does my FASTA file have fewer sequences than my input list?

Some accessions were merged, retired, or simply not found, and streaming queries return nothing for them without a warning. Run the per-accession grep verification against your input list and resolve each missing ID on the UniProt entry page.

### Should I download canonical sequences or isoforms?

Use canonical sequences when you want one representative per protein, and include isoform accessions only when your question concerns transcript variants. FASTA downloads default to canonical sequences, so isoform work needs a deliberate choice of isoform-level identifiers.

### Is downloading from UniProt free and redistributable?

Yes. UniProtKB is available under a CC-BY (4.0) license, so you can redistribute sequences in supplementary files and derived databases with attribution.

### How do I avoid timeouts on very large downloads?

Do not iterate one accession per request. Use the stream endpoint with `compressed=true` for large queries, prefer prebuilt complete-database or proteome files for proteome-scale needs, and chunk ID-mapping jobs into blocks of a few thousand identifiers.

### How often should I re-download my UniProt dataset?

Whenever you refresh an analysis that depends on current annotation, because UniProtKB changes with every release as entries are added, merged, and reannotated. Re-run the saved query, re-verify counts, and record the new release date and sequence versions with the updated file.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Can I download all protein sequences for one organism in one file?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Query with organism_id:<taxonomy ID> through the stream endpoint or click Download on the website results, and for reference proteomes use the proteome:UPXXXXXX query or the proteome page download button. Add compressed=true for anything above a few thousand entries."
      }
    },
    {
      "@type": "Question",
      "name": "What is the difference between reviewed and unreviewed entries?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Reviewed entries form UniProtKB/Swiss-Prot, where curators check the sequence and annotation, while unreviewed entries form TrEMBL with automated annotation. Use reviewed:true in your query to restrict to Swiss-Prot, which is usually the right choice for curated datasets."
      }
    },
    {
      "@type": "Question",
      "name": "How do I download sequences for a list of accession numbers?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Submit the list to the ID mapping service with POST to https://rest.uniprot.org/idmapping/run, poll the status endpoint with the returned job ID, then stream results with format=fasta. For lists of a few hundred you can instead build an OR query on accession terms."
      }
    },
    {
      "@type": "Question",
      "name": "Why does my FASTA file have fewer sequences than my input list?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Some accessions were merged, retired, or simply not found, and streaming queries return nothing for them without a warning. Run a per-accession grep verification against your input list and resolve each missing ID on the UniProt entry page."
      }
    },
    {
      "@type": "Question",
      "name": "Should I download canonical sequences or isoforms?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Use canonical sequences when you want one representative per protein, and include isoform accessions only when your question concerns transcript variants. FASTA downloads default to canonical sequences, so isoform work needs a deliberate choice of isoform-level identifiers."
      }
    },
    {
      "@type": "Question",
      "name": "Is downloading from UniProt free and redistributable?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. UniProtKB is available under a CC-BY (4.0) license, so you can redistribute sequences in supplementary files and derived databases with attribution."
      }
    },
    {
      "@type": "Question",
      "name": "How do I avoid timeouts on very large downloads?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Do not iterate one accession per request. Use the stream endpoint with compressed=true for large queries, prefer prebuilt complete-database or proteome files for proteome-scale needs, and chunk ID-mapping jobs into blocks of a few thousand identifiers."
      }
    },
    {
      "@type": "Question",
      "name": "How often should I re-download my UniProt dataset?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Whenever you refresh an analysis that depends on current annotation, because UniProtKB changes with every release as entries are added, merged, and reannotated. Re-run the saved query, re-verify counts, and record the new release date and sequence versions with the updated file."
      }
    }
  ]
}
</script>

## Sources

1. [The Universal Protein Resource (UniProt): an expanding universe of protein information](https://pubmed.ncbi.nlm.nih.gov/16381842/)
2. [UniProt: the universal protein knowledgebase in 2021](https://pubmed.ncbi.nlm.nih.gov/33237286/)
3. [UniProt: the Universal Protein Knowledgebase in 2025](https://pubmed.ncbi.nlm.nih.gov/39552041/)
4. [Analyzing and exploring Graph Attention Networks and protein-based language models for predicting Porhyromonas gingivalis resistant efflux protein sequences.](https://pubmed.ncbi.nlm.nih.gov/40372388/)
5. [Pre-Trained Language Models Based Sequence Prediction of Wnt-Sclerostin Protein Sequences in Alveolar Bone Formation](https://doi.org/10.61091/jpms202312311)
6. [PDBrenum: A webserver and program providing Protein Data Bank files renumbered according to their UniProt sequences](https://pubmed.ncbi.nlm.nih.gov/34228733/)
7. [基于BioPerl实现精确下载毛果杨蛋白质序列 Realize Accurately the Download of Populus trichocarpa Protein Sequences Based on BioPerl](https://doi.org/10.12677/HJCB.2016.62004)
8. [Large-scale automated function prediction of protein sequences and an experimental case study validation on PTEN transcript variants](https://pubmed.ncbi.nlm.nih.gov/29098713/)
9. [CoCoNat: A Deep Learning-Based Tool for the Prediction of Coiled-coil Domains in Protein Sequences](https://pubmed.ncbi.nlm.nih.gov/38405078/)
10. [Deep_CNN_LSTM_GO: Protein function prediction from amino-acid sequences](https://pubmed.ncbi.nlm.nih.gov/34601431/)
11. [MehNet: a vigesimal-based model by amino acid melting points generates unique ID numbers for protein sequences](https://pubmed.ncbi.nlm.nih.gov/38230442/)
12. [EVEREST: automatic identification and classification of protein domains in all protein sequences](https://pubmed.ncbi.nlm.nih.gov/16749920/)
13. [flDPnn3: Fast and accurate prediction of intrinsic disorder in protein sequences.](https://pubmed.ncbi.nlm.nih.gov/41500381/)
14. [BERT-based classification of fungi protein sequences with multiple GO labels](https://doi.org/10.1145/3599957.3606249)
15. [ECPred: a tool for the prediction of the enzymatic functions of protein sequences based on the EC nomenclature](https://pubmed.ncbi.nlm.nih.gov/30241466/)
16. [Pse-in-One: a web server for generating various modes of pseudo components of DNA, RNA, and protein sequences](https://pubmed.ncbi.nlm.nih.gov/25958395/)
17. [Improving protein function prediction by learning and integrating representations of protein sequences and function labels](https://pubmed.ncbi.nlm.nih.gov/39233898/)