API Reference
REST API for search, organisms, and protein contact-network data. All endpoints are prefixed with /api and return JSON unless noted otherwise.
Base URL: https://lahuta.dev
Interactive docs: Swagger UI · OpenAPI JSON
Quick start
Copy-paste into a terminal to get started.
# Search for proteins
curl -s "$https://lahuta.dev/api/search?q=kinase&limit=3"
# Look up a UniProt ID
curl -s "$https://lahuta.dev/api/search?q=P04637&kind=uniprot&limit=1"
# List human proteins
curl -s "$https://lahuta.dev/api/organisms?name=Homo+sapiens&limit=5"
# Get metadata for a protein
curl -s `$https://lahuta.dev/api/uniprot/P00533`/api/search
Full-text search across organisms and proteins. Supports filtering by kind, organism, and data source with cursor-based pagination.
Parameters
| Param | Type | Req | Default | Description |
|---|---|---|---|---|
| q | string | yes | - | Search query (1–500 chars) |
| limit | int | no | 10 | Results per page (1–100) |
| offset | int | no | 0 | Pagination offset (0–10 000) |
| kind | string | no | - | "organism", "uniprot", or "protein" |
| organism | string | no | - | Restrict to proteins from this organism |
| include_organism | bool | no | false | Include organism name in each UniProt result |
| source | string | no | alphafold | "alphafold" or "swissprot" |
Examples
Simple keyword search
curl -s "https://lahuta.dev/api/search?q=kinase&limit=3"Response
{
"query": "kinase",
"results": [
{ "kind": "uniprot", "id": "A0A2T0WTK7", "label": "Guanylate kinase",
"sublabel": "A0A2T0WTK7 · gmk", "gene_name": "gmk", "seq_length": 217, "score": 40 },
...
],
"has_more": true, "limit": 3, "offset": 0
}Search organisms only
curl -s "https://lahuta.dev/api/search?q=escherichia&kind=organism&limit=3"Response
{
"query": "escherichia",
"results": [
{ "kind": "organism", "id": "Escherichia alba", "label": "Escherichia alba",
"sublabel": null, "score": 50 },
{ "kind": "organism", "id": "Escherichia coli", "label": "Escherichia coli",
"sublabel": null, "score": 50 },
...
],
"has_more": true, "limit": 3, "offset": 0
}Look up a UniProt ID directly
curl -s "https://lahuta.dev/api/search?q=P04637&kind=uniprot&limit=1"Response
{
"query": "P04637",
"results": [
{ "kind": "uniprot", "id": "P04637", "label": "Cellular tumor antigen p53",
"sublabel": "P04637 · TP53", "gene_name": "TP53", "seq_length": 393, "score": 100 }
],
"has_more": true, "limit": 1, "offset": 0
}Human kinases in SwissProt (page 2, with organism)
curl -s "https://lahuta.dev/api/search?q=kinase&kind=protein&organism=Homo+sapiens&source=swissprot&include_organism=true&limit=3&offset=3"Response
{
"query": "kinase",
"results": [
{ "kind": "uniprot", "id": "Q01974",
"label": "Tyrosine-protein kinase transmembrane receptor ROR2",
"sublabel": "Q01974 · ROR2", "gene_name": "ROR2", "seq_length": 943,
"score": 40, "organism": "Homo sapiens" },
...
],
"has_more": true, "limit": 3, "offset": 3
}Hemoglobin across all organisms
curl -s "https://lahuta.dev/api/search?q=hemoglobin&include_organism=true&limit=3"Response
{
"query": "hemoglobin",
"results": [
{ "kind": "uniprot", "id": "A0A3D1J4W8", "label": "Group 1 truncated hemoglobin",
"sublabel": "A0A3D1J4W8 · DEQ40_20070", "gene_name": "DEQ40_20070",
"seq_length": 148, "score": 40, "organism": "Oxalobacteraceae bacterium" },
...
],
"has_more": true, "limit": 3, "offset": 0
}/api/organisms
List proteins belonging to an organism. Returns paginated entries with protein name, gene name, and sequence length.
Parameters
| Param | Type | Req | Default | Description |
|---|---|---|---|---|
| name | string | yes | - | Organism name (1–200 chars, exact match) |
| limit | int | no | 100 | Entries per page (1–500) |
| offset | int | no | 0 | Pagination offset (0–100 000) |
| source | string | no | alphafold | "alphafold" or "swissprot" |
Examples
Human proteins (first page)
curl -s "https://lahuta.dev/api/organisms?name=Homo+sapiens&limit=3"Response
{
"organism": "Homo sapiens",
"entries": [
{ "uniprot_id": "A0A023HJ61", "protein_name": "HRES-1/RAB4 variant",
"gene_name": "RAB4A", "seq_length": 121 },
{ "uniprot_id": "A0A023HN28", "protein_name": "SRSF3/USP6 fusion protein",
"gene_name": null, "seq_length": 16 },
...
],
"has_more": true, "limit": 3, "offset": 0
}E. coli K12 from SwissProt
curl -s "https://lahuta.dev/api/organisms?name=Escherichia+coli+(strain+K12)&source=swissprot&limit=3"Response
{
"organism": "Escherichia coli (strain K12)",
"entries": [
{ "uniprot_id": "A0A385XJ53", "protein_name": "Insertion element IS1 9 protein InsA",
"gene_name": "insA9", "seq_length": 91 },
...
],
"has_more": true, "limit": 3, "offset": 0
}Paginate through results
curl -s "https://lahuta.dev/api/organisms?name=Homo+sapiens&limit=3&offset=3"Response
{
"organism": "Homo sapiens",
"entries": [
{ "uniprot_id": "A0A023I7H2",
"protein_name": "NADH-ubiquinone oxidoreductase chain 5",
"gene_name": "ND5", "seq_length": 603 },
...
],
"has_more": true, "limit": 3, "offset": 3
}/api/uniprot/{uniprot_id}
Retrieve metadata for a single UniProt entry.
Parameters
| Param | Type | Req | Default | Description |
|---|---|---|---|---|
| uniprot_id | path | yes | - | UniProt accession (alphanumeric, 1–20 chars) |
Examples
EGFR metadata
curl -s "https://lahuta.dev/api/uniprot/P00533"Response
{ "uniprot_id": "P00533", "organism": "Homo sapiens" }Human insulin
curl -s "https://lahuta.dev/api/uniprot/P01308"Response
{ "uniprot_id": "P01308", "organism": "Homo sapiens" }/api/health
Health check. Returns 200 when the server is ready.
Example
Health check
curl -s "https://lahuta.dev/api/health"Response
{ "status": "ok" }/api/db/status
Approximate counts of organisms and UniProt entries in the unified index.
Example
Check index size
curl -s "https://lahuta.dev/api/db/status"Response
{
"unified_index": {
"organism_approx": 1047019,
"uniprot_approx": 241070489
}
}/api/bug-reports
Submit a bug report or feature suggestion.
Request body (JSON)
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| kind | string | yes | - | "bug" or "suggestion" |
| description | string | yes | - | Report body (1–5 000 chars) |
| severity | string | no | medium | "low", "medium", "high", or "critical" |
| page_url | string | no | "" | URL where the issue occurred (max 2 000 chars) |
| user_agent | string | no | "" | Browser user-agent (max 1 000 chars) |
Example
Submit a bug report
curl -s -X POST "https://lahuta.dev/api/bug-reports" \
-H "Content-Type: application/json" \
-d '{
"kind": "bug",
"description": "Chart tooltip clips off-screen on narrow viewports",
"severity": "low"
}'Response
{ "id": 42, "created_at": "2026-03-06T12:34:56.789000" }Notes
- Source routing. The
sourceparameter on/api/searchand/api/organismsswitches between the AlphaFold index (default) and the SwissProt index. - UniProt ID format. Path parameters accepting a UniProt ID must match
^[A-Z0-9](?:[A-Z0-9-]{0,18}[A-Z0-9])?$. Input is normalized to uppercase. - Pagination. Use
limitandoffsetfor paging. Thehas_morefield indicates whether more results exist beyond the current page.