Analyze Dataset
Upload a CSV, JSON, Parquet, or Excel file URL and receive an AI-generated summary, schema, and preview rows.
/v1/analyze
curl -X POST "https://analytics.toolkitapi.io/v1/analyze" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data_url": "https://example.com/sales.csv",
"prompt": "What are the top 5 products by revenue?",
"file_type": "csv",
"execution_mode": "sync"
}'
import httpx
resp = httpx.post(
"https://analytics.toolkitapi.io/v1/analyze",
json={
"data_url": "https://example.com/sales.csv",
"prompt": "What are the top 5 products by revenue?",
"file_type": "csv",
"execution_mode": "sync"
},
)
print(resp.json())
const resp = await fetch("https://analytics.toolkitapi.io/v1/analyze", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"data_url": "https://example.com/sales.csv",
"prompt": "What are the top 5 products by revenue?",
"file_type": "csv",
"execution_mode": "sync"
}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"dataset_id": "ds_a1b2c3d4",
"summary": "The dataset contains 1,200 rows of sales transactions. The top product by revenue is Widget A with $48,200.",
"result_preview": [
{"product": "Widget A", "total_revenue": 48200},
{"product": "Widget B", "total_revenue": 31500}
],
"schema_": [
{"name": "product", "dtype": "string", "nullable": false},
{"name": "total_revenue", "dtype": "float64", "nullable": false}
],
"meta": {
"request_id": "req_xyz789",
"runtime_ms": 1240.5,
"cache_hit": false,
"rows_scanned_estimate": 1200,
"schema_fingerprint": "fp_abc123"
}
}
Try It Live
Description
How to Use
1. Upload your data file to a publicly accessible URL (or use an existing one). 2. Send a `POST` request to `/v1/analyze` with the URL and a plain-English `prompt`. 3. Use the `dataset_id` from the response in subsequent `/visualize` or `/save` calls. 4. For large files, set `execution_mode` to `async` and poll `/v1/jobs/{job_id}` for the result.
About This Tool
The **Analyze** endpoint is the entry point for all analytics workflows. Provide a publicly accessible URL pointing to a CSV, JSON, Parquet, or Excel file along with a natural-language prompt, and the API returns an AI-generated summary, a result preview, and the inferred schema.
The returned `dataset_id` is an in-memory handle to the analysed data. Pass it to `/visualize`, `/validate-chart`, or `/save` to continue the workflow without re-uploading or re-parsing the source file.
Why Use This Tool
- Ad-hoc data exploration — ask a plain-English question and get an instant answer.
- Schema discovery — call with a minimal prompt to infer column names and types before building a chart.
- Pipeline automation — chain analyze → save → query to replay business logic against refreshed data.
- BI prototyping — feed the result preview into a front-end chart builder without a full database.
Start using Analyze Dataset now
Get your free API key and make your first request in under a minute.