Skip to main content

API Reference

BioContext7 provides a REST API for searching bioinformatics tools, fetching documentation snippets, and comparing tools programmatically.

Base URL

https://biocontext7.com

All endpoints are relative to this base URL. Responses are JSON unless otherwise noted.

Rate Limiting

Rate limits are per-IP using a token bucket algorithm. When rate limited, the API returns 429 Too Many Requests with a Retry-After header indicating seconds until the next request is allowed.

Authentication

Most public endpoints require no authentication. Endpoints marked Auth Required return 503 until authentication is enabled.

FastAPI Backend (Python)

When the Python FastAPI backend is deployed, interactive Swagger UI is available at /docs and ReDoc at /redoc with full OpenAPI schema at /openapi.json.

Search & Discovery

Endpoints for searching and ranking bioinformatics tools.

GET/api/search

Search tools

Search the registry of 2,000+ bioinformatics tools by name, keyword, domain, or registry.

Rate limit: 30 requests/minute per IPCache: 5 minutes (s-maxage=300)

Query Parameters

NameTypeRequiredDescription
qstringNoSearch query (case-insensitive)
pageintegerNoPage number (default: 1)
sortstringNoSort order: "relevance" (default)
domainstringNoFilter by domain (e.g., "Genomics")
registrystringNoFilter by registry (e.g., "biotools", "pypi")
organismstringNoFilter by organism
languagestringNoFilter by programming language
verifiedstringNoFilter verified tools ("true"/"false")

Response

FieldTypeDescription
resultsTool[]Array of matching tools
totalintegerTotal matching tools across all pages
pageintegerCurrent page number
pageSizeintegerResults per page (50)
GET /api/search?q=star+alignment&page=1
GET/api/rankings

Tool rankings

Get ranked bioinformatics tools sorted by usage score. Supports filtering by domain and custom sort fields.

Rate limit: 20 requests/minute per IPCache: 1 hour (s-maxage=3600)

Query Parameters

NameTypeRequiredDescription
domainstringNoFilter by domain (e.g., "Genomics")
sortBystringNo"rank" (default), "name", "usageCount", "growthPercent"
sortDirstringNo"desc" (default) or "asc"
pageintegerNoPage number (default: 1, 10 per page)

Response

FieldTypeDescription
resultsRankedTool[]Array of ranked tools
totalintegerTotal tools matching filter
pageintegerCurrent page number
totalPagesintegerTotal number of pages
GET /api/rankings?page=1&sortBy=rank
GET/api/compare

Compare tools

Compare 2-4 bioinformatics tools side by side. Tools are identified by registry/id format.

Query Parameters

NameTypeRequiredDescription
toolsstringYesComma-separated tool keys (e.g., "biotools/star,biotools/hisat2"). Min 2, max 4.

Response

FieldTypeDescription
toolsToolDetail[]Full details for each found tool
notFoundstring[]Tool keys that could not be resolved
GET /api/compare?tools=biotools%2Fstar%2Cbiotools%2Fsamtools

Documentation

Access tool documentation snippets and search across all indexed documentation.

GET/api/tools/[registry]/[id]/snippets

Tool documentation snippets

Fetch documentation snippets for a specific tool. Tries the backend API first, then falls back to pre-exported static snippet files.

Rate limit: 60 requests/minute per IPCache: 1 hour (s-maxage=3600)

Query Parameters

NameTypeRequiredDescription
registrystringYesTool registry (biotools, pypi, bioconda, bioconductor, dockstore)
idstringYesTool identifier (alphanumeric with dots, hyphens, underscores)

Response

FieldTypeDescription
tool_idstringFull tool identifier (registry/id)
tool_namestringTool display name
snippetsSnippet[]Documentation snippets with content and metadata
totalintegerTotal number of snippets
total_tokensintegerTotal token count across snippets
POST/api/snippets/search

Search documentation snippets

Search across all tool documentation snippets. Proxies to the backend API when configured.

Request Body (JSON)

NameTypeRequiredDescription
querystringYesSearch query
pageintegerNoPage number (default: 1)
per_pageintegerNoResults per page (default: 25)

Response

FieldTypeDescription
resultsSnippetResult[]Matching documentation snippets
totalintegerTotal matching snippets
total_tokensintegerTotal token count
querystringEchoed search query

Chat

Conversational interface for tool discovery with workflow generation.

POST/api/chat

Chat with tool search

Send natural language queries about bioinformatics tools. Returns tool references and workflow examples for common queries.

Rate limit: 5 queries per session

Request Body (JSON)

NameTypeRequiredDescription
messagestringYesChat message (1-2000 characters)
sessionIdstringYesSession identifier (alphanumeric, 1-128 chars)

Response

FieldTypeDescription
reply.idstringUnique reply ID
reply.role"assistant"Always "assistant"
reply.contentstringMarkdown-formatted response
reply.toolsToolReference[]?Referenced tools with metadata
reply.workflowsWorkflowStub[]?Generated workflow code (Nextflow/Snakemake)
remainingintegerRemaining queries in this session

System

Operational endpoints for health monitoring and repository metadata.

GET/api/health

Health check

Check connectivity status of upstream services (backend API, bio.tools). Always returns 200 — status field indicates "ok" or "degraded".

Response

FieldTypeDescription
status"ok" | "degraded"Overall system health
services.backend_apiServiceStatusBackend API connectivity (status, latency_ms, error)
services.biotoolsServiceStatusbio.tools API connectivity (status, latency_ms, error)
config.backend_url_configuredbooleanWhether BIOCONTEXT7_API_URL is set
GET /api/health
GET/api/github/stats

GitHub repository stats

Get GitHub repository statistics (stars, forks, watchers). Cached for 1 hour.

Cache: 1 hour (s-maxage=3600)

Response

FieldTypeDescription
starsintegerStar count
forksintegerFork count
watchersintegerWatcher count
GET /api/github/stats

Tools

Endpoints for tool redirects and citation exports.

GET/api/tools/[registry]/[id]/redirect

Tool redirect lookup

Check if a tool ID has been renamed or moved. Returns the canonical tool location if a redirect exists.

Rate limit: 60 requests/minute per IPCache: 1 hour (s-maxage=3600)

Query Parameters

NameTypeRequiredDescription
registrystringYesTool registry
idstringYesTool identifier

Response

FieldTypeDescription
old_idstringOriginal tool identifier (registry:id)
canonical_idstringCanonical tool identifier
canonical_urlstringURL path to the canonical tool page
redirect_typestringRedirect reason (rename, merge, etc.)
hopsintegerNumber of redirect hops resolved
GET/api/collections/[id]/export

Export collection citations

Export all citations from a tool collection in BibTeX, RIS, or CSL-JSON format. Returns a downloadable file.

Query Parameters

NameTypeRequiredDescription
idstringYesCollection identifier
formatstringNo"bibtex" (default), "ris", or "csl-json"

Response

FieldTypeDescription
(file)text/plainDownloadable citation file with Content-Disposition header

Authenticated Endpoints

These endpoints require authentication and currently return 503 Service Unavailable. They will be enabled when the authentication system is deployed.

MethodPathDescription
POST/api/submit-toolSubmit a new tool URL for indexing
GET/POST/DELETE/api/keysAPI key management
GET/api/tasksList processing tasks
POST/api/tasks/submitSubmit a documentation URL for processing
GET/api/dashboard/usageUsage statistics
GET/api/dashboard/profileUser profile
GET/api/dashboard/collectionsUser collections
GET/api/dashboard/keysAPI key listing
POST/GET/PUT/api/tools/[registry]/[id]/claimClaim tool ownership
POST/GET/PUT/api/tools/[registry]/[id]/adminTool administration
POST/api/tools/[registry]/[id]/disputeDispute tool information