> ## 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](/api/protein/atlas/similarity-search) for all filters, limits, and response fields.

<Steps>
  <Step title="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()
    ```
  </Step>

  <Step title="Inspect every returned protein">
    ```python theme={null}
    for protein in result["similar_proteins"]:
        print(
            protein["protein_accession"],
            protein["similarity_score"],
            protein.get("cluster_size"),
        )
    ```

    Results are ordered by descending similarity score.
    Preserve each returned `protein_hash` when you need to retrieve the complete protein record.
  </Step>

  <Step title="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.
  </Step>
</Steps>

A successful request returns zero or more feature-similar proteins plus aggregate feature evidence.
An empty result is a valid outcome and should not be broadened automatically without reviewing the query and filters.

## Next step

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