API Overview
The BioQuery API allows you to run queries programmatically and integrate cancer genomics analysis into your workflows.
The API is currently in beta and available only to users with Researcher access. Contact us to request access.
Base URL
https://api.bioquery.io/v1Quick Start
1. Get an API Key
- Sign in to bioquery.ioÂ
- Go to Settings → API Keys
- Click Generate New Key
- Copy and store your key securely
2. Make Your First Request
curl -X POST https://api.bioquery.io/v1/query \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Is DDR1 higher in KIRP vs KIRC?"}'3. Get Your Results
{
"id": "card_abc123",
"status": "completed",
"query": {
"original": "Is DDR1 higher in KIRP vs KIRC?",
"parsed": {
"gene": "DDR1",
"cancer_types": ["KIRP", "KIRC"],
"analysis_type": "differential_expression"
}
},
"results": {
"answer": "DDR1 expression is significantly higher in papillary RCC (KIRP) compared to clear cell RCC (KIRC)...",
"statistics": {
"p_value": 0.00032,
"fold_change": 2.3
}
}
}Key Concepts
Query Cards
The API returns Query Card objects containing:
- Natural language answer
- Statistical results
- Figure data (Plotly JSON)
- Methods text
- SQL query
Synchronous vs Asynchronous
- Simple queries: Return results immediately (~5-10 seconds)
- Complex queries: Return a
card_idfor polling
Rate Limits
| Tier | Requests/Day | Concurrent |
|---|---|---|
| Free | 2 | 1 |
| Researcher | 100 | 5 |
| Enterprise | Custom | Custom |
SDKs
Python
pip install bioqueryfrom bioquery import BioQuery
client = BioQuery(api_key="YOUR_API_KEY")
result = client.query("Is DDR1 higher in KIRP vs KIRC?")
print(result.answer)
print(result.statistics)R (Coming Soon)
An R package is in development. Sign up to be notified when it’s available.
Next Steps
- Authentication - API key management
- Endpoints - Complete endpoint reference
- Error Handling - Error codes and troubleshooting