BLAST
Sequence similarity search and available BLAST databases (requires SequenceServer deployment).
BLAST endpoints are optional and depend on a deployed SequenceServer instance. When disabled, requests return 503 with BLAST_NOT_CONFIGURED.
Database IDs are SequenceServer hashes returned by GET /blast/databases (not folder names like COI_db).
GET /api/v1/blast/databases
List available BLAST databases.
curl https://api.ilepbase.com/api/v1/blast/databasesResponse (200)
{
"success": true,
"data": {
"databases": [
{
"id": "a8ec2c5af1fbcab6b092a01f7acf8936",
"title": "iLepBase COI BOLD nucleotide database",
"type": "nucleotide",
"sequenceCount": 2040921
},
{
"id": "6c35a7dfb3730d44121898615f99b43e",
"title": "iLepBase Lepidoptera protein database",
"type": "protein",
"sequenceCount": 42491179
}
]
},
"timestamp": "2026-05-21T08:45:24.243Z"
}POST /api/v1/blast/search
Submit a sequence for BLAST. Returns synchronously when the job completes within BLAST_SYNC_TIMEOUT (default 30s); otherwise returns 202 with a jobId for polling.
curl -X POST https://api.ilepbase.com/api/v1/blast/search \
-H "Content-Type: application/json" \
-d '{
"sequence": "AACATTATATTTTATTTTTGGTATTTGAGCTGGTATAATTGGAACTTCTTTAAGATTATTAATTCGGGCAGAATTAGGTAATCCAGGATCTTTAATTGGGGATGATCAAATTTATAATACAATTGTTACTGCACATGCTTTTATTATAATTTTTTTTATAGTTATACCTATTATAATTGGAGGATTTGGAAATTGACTAA",
"program": "blastn",
"database": "a8ec2c5af1fbcab6b092a01f7acf8936",
"evalue": "1e-5",
"maxHits": 2
}'Request Body
| Field | Type | Required | Description |
|---|---|---|---|
sequence | string | Yes | Query sequence (FASTA or raw). |
program | string | Yes | blastn, blastp, blastx, tblastn, tblastx. |
database | string | Yes | Database id from /blast/databases. |
evalue | string | No | E-value threshold (default 1e-5). |
maxHits | int | No | Max alignments (default 50). |
Response — sync (200)
{
"success": true,
"data": {
"mode": "sync",
"results": {
"program": "blastn",
"database": "",
"hits": [
{
"id": "GWOSX749-11|COI-5P|Australia|...",
"title": "lasiocamparia,None",
"length": 658,
"hsps": [
{
"bitScore": 370.45,
"score": 200,
"evalue": "6.67678e-101",
"identity": 200,
"queryFrom": 1,
"queryTo": 200,
"hitFrom": 1,
"hitTo": 200,
"alignLen": 200,
"gaps": 0,
"querySeq": "...",
"hitSeq": "...",
"midline": "|||||..."
}
]
}
],
"stats": {
"dbNum": 2040921,
"dbLen": 1323196554,
"queryLen": 200
}
}
},
"timestamp": "2026-05-21T08:45:24.623Z"
}Response — async (202)
{
"success": true,
"data": {
"mode": "async",
"jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "running",
"message": "Query is taking longer than expected. Poll for results."
},
"timestamp": "2026-05-21T08:45:30.000Z"
}GET /api/v1/blast/jobs/{jobId}
Poll BLAST job status (async searches). Only the submitter IP may access the job.
curl https://api.ilepbase.com/api/v1/blast/jobs/3fa85f64-5717-4562-b3fc-2c963f66afa6Response (200)
{
"success": true,
"data": {
"jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "succeeded",
"program": "blastn",
"database": "a8ec2c5af1fbcab6b092a01f7acf8936",
"results": { "program": "blastn", "hits": [], "stats": { "dbNum": 2040921, "dbLen": 1323196554, "queryLen": 200 } },
"createdAt": "2026-05-21T08:45:20.000Z",
"finishedAt": "2026-05-21T08:45:35.000Z"
},
"timestamp": "2026-05-21T08:45:36.000Z"
}Synced with Postman collection iLepBase API.