Queryly API
AI-powered data analysis. Upload files, ask questions in plain English, get real code, charts, and insights. Multi-persona analyst swarm for deeper analysis.
Base URL: https://getqueryly.com
Quick Start
# 1. Upload a dataset
curl -X POST https://getqueryly.com/api/data-scientist/upload \
-F "session_id=my_session_1" \
-F "file=@sales_data.csv"
# 2. Ask a question
curl -X POST https://getqueryly.com/api/data-scientist/query \
-F "session_id=my_session_1" \
-F "query=Show average revenue by region"
# 3. Run a health check
curl https://getqueryly.com/api/data-scientist/health/my_session_1
Authentication
Queryly supports two authentication methods: API keys for server-to-server calls, and Firebase ID tokens for user sessions.
API Key Authentication
Generate an API key from the dashboard. Include it in the X-API-Key header.
curl -H "X-API-Key: dmk_your_key_here" \
https://getqueryly.com/api/makes/limits
Bearer Token Authentication
For user-specific endpoints, use the Firebase ID token from sign-in.
curl -H "Authorization: Bearer eyJhbGciOi..." \
https://getqueryly.com/api/auth/me
Rate Limits
Limits are per-day and reset at midnight UTC. Anonymous users get 5 uses/day.
| Tier | Daily Limit | Price |
|---|---|---|
| Anonymous | 5 uses/day | Free |
| Free (registered) | 10 uses/day | Free |
| Starter | 100 uses/day | GHS 29/mo |
| Developer | 500 uses/day | GHS 99/mo |
| Business | 1,000 uses/day | GHS 249/mo |
Pay-as-you-go credits are also available and never expire.
Upload File
Upload a CSV, Excel, JSON, PDF, or text file. Returns an overview of the data and a session ID for querying.
| Param | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Unique session identifier (e.g., ds_1234567890_abc) |
file | File | Yes | File to upload. Max 50MB. CSV, XLSX, XLS, JSON, PDF, TXT, MD, PARQUET. |
curl -X POST https://getqueryly.com/api/data-scientist/upload \
-F "session_id=ds_1720000000_abc12" \
-F "file=@sales_data.csv"
Response
{
"session_id": "ds_1720000000_abc12",
"load_info": {
"rows": 4520,
"columns": 12,
"column_names": ["date", "region", "product", "revenue", ...],
"dtypes": {"date": "object", "revenue": "float64", ...}
},
"overview": "📊 **Dataset Loaded**\n\nYour file has **4,520 rows** and **12 columns**.\n\nColumns: date, region, product, revenue, units_sold, ..."
}
Query Data
Ask a natural language question about your data. The AI writes and executes real Python code to produce results with charts.
| Param | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID from upload |
query | string | Yes | Natural language question |
curl -X POST https://getqueryly.com/api/data-scientist/query \
-F "session_id=ds_1720000000_abc12" \
-F "query=Show average salary by department as a bar chart"
Response
{
"text": "The average salary by department is:\n- Engineering: $95,400\n- Marketing: $72,300\n- Sales: $68,100\n\nA bar chart has been generated.",
"charts": ["/outputs/ds_1720000000_abc12/salary_bar_chart.png"],
"code_executed": true,
"session_id": "ds_1720000000_abc12"
}
Generate Code
Generate Python analysis code without executing it. Useful for previewing what the AI would do.
| Param | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID from upload |
query | string | Yes | What to generate code for |
Health Check
Run a data quality health check. Scores completeness, consistency, accuracy, and timeliness across all dimensions.
curl https://getqueryly.com/api/data-scientist/health/ds_1720000000_abc12
Response
{
"overall_score": 82,
"dimensions": {
"completeness": {"score": 85, "detail": "3.2% missing values"},
"consistency": {"score": 90, "detail": "No type mismatches"},
"accuracy": {"score": 78, "detail": "2 outlier regions detected"},
"timeliness": {"score": 75, "detail": "Data spans 2023-2025"}
},
"summary": "Your data is in good shape with minor issues.",
"fixes": ["Fill 145 missing email values", "Review 12 salary outliers"]
}
Insights
Mine actionable insights from your data. Finds correlations, trends, anomalies, and patterns automatically.
curl https://getqueryly.com/api/data-scientist/insights/ds_1720000000_abc12
Analyst Swarm
Deploy multiple AI analyst personas. Each analyzes independently, then findings are cross-validated and consolidated.
| Param | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID from upload |
query | string | Yes | Analysis question for the swarm |
depth | string | <>Noquick, standard, or deep (default: standard) |
curl -X POST https://getqueryly.com/api/data-scientist/swarm \
-F "session_id=ds_1720000000_abc12" \
-F "query=Analyze this data thoroughly and provide key insights" \
-F "depth=deep"
Response
{
"persona_names": ["Statistician", "BI Analyst", "Domain Expert"],
"persona_results": {
"statistician": {"name": "Statistician", "output": "Revenue follows a right-skewed distribution..."},
"bi_analyst": {"name": "BI Analyst", "output": "Q4 shows 23% growth over Q3..."},
"domain_expert": {"name": "Domain Expert", "output": "The engineering department drives 62%..."}
},
"consensus": {"text": "Key finding: Revenue is growing 15% QoQ driven by..."}
}
Available Personas
List all available analyst personas and their roles.
| Persona | Role |
|---|---|
statistician | Statistical analysis, distributions, significance tests |
bi_analyst | Business intelligence, KPIs, revenue drivers |
data_engineer | Data quality, missing values, schema validation |
domain_expert | Domain-specific insights and recommendations |
economist | Pricing, optimization, market dynamics |
List Sessions
List all active sessions for the current user.
Session History
Get query history for a session.
Delete Session
Delete a session and all its data.
User Info
Get current user info. Requires Bearer token.
curl -H "Authorization: Bearer eyJhbGciOi..." \
https://getqueryly.com/api/auth/me
Response
{
"uid": "abc123",
"email": "user@example.com",
"displayName": "John",
"provider": "password",
"tier": "free",
"dailyLimit": 10
}
API Keys
Generate a new API key. Requires Bearer token.
List all API keys for the current user.
Revoke an API key.
Rotate an API key (generates a new key, invalidates the old one).
Pricing
Get all pricing plans and pay-as-you-go options.
curl https://getqueryly.com/api/pricing
Usage Limits
Check current usage and remaining daily limit.
curl https://getqueryly.com/api/makes/limits
Response
{
"tier": "free",
"limit": 10,
"used": 3,
"remaining": 7,
"balance": 0,
"total_available": 7
}
Get detailed usage statistics.
Payments
Queryly uses Paystack for payments. All amounts are in GHS (Ghanaian Cedis).
Initialize a Paystack payment for subscription or pay-as-you-go credits.
Verify a completed Paystack payment and activate subscription/credits.
Chat
Send a message to the AI chat. Context-aware conversations about your data.
Get chat history for the current session.
Service Health
Check service health, uptime, and system status.
curl https://getqueryly.com/health
Response
{
"status": "ok",
"service": "Queryly",
"version": "2.0",
"firebase": "connected",
"queue": {"waiting": 0, "running": 0, "capacity": 3},
"disk_gb": 65.4,
"uptime": "active"
}