> ## Documentation Index
> Fetch the complete documentation index at: https://docs.biohub.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search for similar proteins

> Find Atlas proteins with SAE feature profiles similar to a query amino-acid sequence.

Use sequence similarity search when you have an amino-acid sequence and want Atlas proteins with related SAE feature profiles.
This is feature similarity, not a sequence-alignment or homology search.

## Before you begin

Prepare a valid protein sequence of at most 2,048 residues.
Review the [similarity-search endpoint](https://docs.biohub.ai/api/protein/atlas/similarity-search.md) for all filters, limits, and response fields.

**1. Submit the sequence**

This example requests five results and includes cluster summaries.

```python theme={null}
import httpx

sequence = "FVNQHLCGSHLVEALYLVCGERGFFYTPKT"
response = httpx.get(
    "https://biohub.ai/esm/protein/api/v1alpha1/similarity-search",
    params={
        "sequence": sequence,
        "topk_results": 5,
        "topk_features": 20,
        "include_cluster_info": True,
    },
    timeout=60,
)
response.raise_for_status()
result = response.json()
```

**2. Inspect every returned protein**

```python theme={null}
for protein in result["similar_proteins"]:
    print(
        protein["protein_accession"],
        protein["similarity_score"],
        protein.get("cluster_size"),
    )
```

The API orders results by descending similarity score.
Preserve each returned `protein_hash` when you need to retrieve the complete protein record.

**3. Check withheld-result metadata**

```python theme={null}
print("Restricted results:", result["restricted_count"])
print("Shared top features:", result["top_features_across_results"])
```

`restricted_count` reports results withheld by the Atlas biosecurity filter.
Do not infer the identity or content of withheld proteins.

A successful request returns zero or more feature-similar proteins plus aggregate feature evidence.
An empty result is a valid outcome.
Review the query and filters before you broaden the search.

## Next step

Pass a returned `protein_hash` to [Retrieve protein and cluster context](https://docs.biohub.ai/learn/tutorials/atlas/retrieve-protein-cluster.md), or inspect the exact [protein endpoint contract](https://docs.biohub.ai/api/protein/atlas/proteins/get.md).


## Related topics

- [Search for similar proteins using SAE feature vectors](https://docs.biohub.ai/api/protein/atlas/similarity-search.md)
- [Biohub MCP ESM Atlas tools](https://docs.biohub.ai/biohub-mcp/esm-atlas-tools.md)
- [ESM Atlas](https://docs.biohub.ai/learn/guides/esm-atlas.md)
- [Biohub MCP server](https://docs.biohub.ai/biohub-mcp/overview.md)
- [Atlas API guides](https://docs.biohub.ai/learn/tutorials/atlas/overview.md)
