---
title: Remote BLAST guide
description: Run BLAST against NCBI's hosted databases with the -remote flag instead of shipping and indexing data yourself.
---

Run [BLAST](/docs/blast) against NCBI's hosted databases with the `-remote` flag instead of shipping and indexing data yourself. Query size and rate matter most — NCBI throttles remote requests, so keep queries small and add sleeps between submissions to avoid HTTP 429s.

> **Where these commands run**

> You cannot open a shell on the platform yourself. The commands on this page are BLAST+ command lines: ask Ivy in chat to run them in the chat's [code workspace](/docs/sandbox), which ships BLAST+, or run them on your own machine. For a hosted search with no commands, see the [BLAST quickstart](/docs/blast/quickstart).

## When to use remote BLAST

- Quick public searches without shipping databases.
- Low-frequency runs where download/build overhead dominates.
- Not ideal for large/private databases (prefer local).

## Minimal remote command

```bash
blastn \
  -query inputs/query.fasta \
  -db nt \
  -remote \
  -entrez_query "Homo sapiens[Organism]" \
  -out outputs/remote.tsv \
  -outfmt "6 qseqid sseqid pident length evalue bitscore"
```

## Throttling and retries

```bash
for q in inputs/queries/*.fasta; do
  blastn -query "$q" -db nt -remote \
    -out "outputs/$(basename "$q").tsv" \
    -outfmt "6 std qcovs" \
    || { echo "retrying $q" && sleep 5 && blastn -query "$q" -db nt -remote -out "outputs/$(basename "$q").tsv" -outfmt "6 std qcovs"; }
  sleep 1
done
```

- Add sleeps between requests to avoid HTTP 429.
- Capture stderr to `logs/remote.log` for diagnosis.

## Tips

- Keep queries small; split large FASTA into many small files.
- Record the Entrez query, database name, and BLAST version in `SUMMARY.json`.
- If remote latency is high or throttling frequent, switch to local databases.
