Sheet SQL & Multi-Tab XLSX Engine API

Run real SQLite JOINs and window functions over messy CSV/JSON tables and export styled multi-tab .xlsx workbooks in milliseconds.

Ephemeral SQLite analytics sandbox for multi-table CSV/TSV and JSON datasets (JOINs, CTEs, window functions, automatic currency coercion) plus zero-dependency OpenXML multi-sheet .xlsx workbook generation.

data-analytics spreadsheets business-ops developer-tools

Why Agents Call This API Instead of DIY

Eliminates spinning up Python/pandas/openpyxl sandboxes, avoids LLM arithmetic hallucinations on large CSVs, strips '$1,250.50' currency strings automatically, and emits genuine frozen-header Excel formulas.

DimensionDIY Inside Agent Sandbox / PromptSheet SQL & Multi-Tab XLSX Engine API (sheet-sql)
Onboarding & AuthInstall packages, debug runtime errors, or manage API keysZero signup — instant HTTP 402 (x402 USDC) & remote MCP
Context & Token CostThousands of tokens spent in multi-turn code/parse loopsDeterministic compact JSON response (<1.5K tokens)
Schema ValidationSilent runtime failures on malformed inputsFree ?dry_run=true preflight ($0.00 on 4xx errors)

Tools & Payable Endpoints (2)

query_tabular_data — Query CSV & JSON Tables with SQLite

$0.002 base (up to $0.01 max $0.002 base + $0.001 per 1,000 total input rows (capped at $0.01), x402 variable settlement)

Ingests 1–10 named RFC 4180 CSV/TSV or JSON row-array datasets into an ephemeral zero-retention SQLite sandbox, coerces currency columns (e.g. '$1,250.50' -> 1250.5), runs read-only SQL (JOIN, GROUP BY, CTEs, window functions), and returns typed rows, Markdown preview, inferred schemas, and optional .xlsx export.

Why buy vs. DIY: Replaces fragile regex CSV parsers, LLM mental math errors, and heavy container sandboxes; runs real SQLite in <25ms with guaranteed ephemeral wipe.

build_xlsx_workbook — Build Styled Multi-Sheet XLSX Workbook

$0.003 USD per multi-sheet .xlsx workbook generation (x402 instant micropayment)

Compiles 1–20 structured JSON datasets into a genuine Office Open XML (.xlsx) workbook with bold shaded headers, frozen top rows, auto-sized columns, numeric formatting, formula-injection protection, and live Excel summary formulas (SUM, AVERAGE, MIN, MAX, COUNT).

Why buy vs. DIY: Generates compliant PKZIP/OpenXML spreadsheets at the edge in <15ms without Python, openpyxl, SheetJS bloat, or broken CSV exports.

Quickstart: MCP, x402 & Optional Bearer API Key

1. Streamable HTTP MCP Config (com.apikeg/sheet-sql)

{
  "mcpServers": {
    "sheet-sql": {
      "type": "streamable-http",
      "url": "https://sheet-sql.apikeg.com/mcp"
    }
  }
}

Using a Monthly Stripe Plan? Get your per-email ak_live_... key at https://apikeg.com/account ($5 / $20 / $50 monthly tiers) and pass header Authorization: Bearer ak_live_... on REST or MCP requests.

2. Free Schema Dry-Run ($0.00)

curl -X POST "https://sheet-sql.apikeg.com/v1/query-tabular-data?dry_run=true" \
  -H "Content-Type: application/json" \
  -d '{"coerceCurrencyNumbers":true,"maxRows":100,"markdownPreviewRows":10,"exportXlsx":true,"tables":{"orders":"order_id,customer_id,amount\n101,c1,\"$1,250.50\"\n102,c1,\"$749.50\"\n103,c2,\"$500.00\"","customers":"[{\"id\":\"c1\",\"name\":\"Acme Corp\",\"region\":\"US\"},{\"id\":\"c2\",\"name\":\"Globex\",\"region\":\"EU\"}]"},"sql":"SELECT c.name, c.region, SUM(o.amount) AS total_spend, ROW_NUMBER() OVER (ORDER BY SUM(o.amount) DESC) AS spend_rank FROM customers c LEFT JOIN orders o ON c.id = o.customer_id GROUP BY c.id, c.name, c.region ORDER BY total_spend DESC"}'

Common Agent & Automation Workflows

Frequently Asked Questions

Why should an AI agent call Sheet SQL & Multi-Tab XLSX Engine API instead of writing custom code?

Eliminates spinning up Python/pandas/openpyxl sandboxes, avoids LLM arithmetic hallucinations on large CSVs, strips '$1,250.50' currency strings automatically, and emits genuine frozen-header Excel formulas.

How do I connect Sheet SQL & Multi-Tab XLSX Engine API to Claude, Cursor, or an MCP client?

Connect directly to the stateless Streamable HTTP MCP endpoint at https://sheet-sql.apikeg.com/mcp (registry ID: com.apikeg/sheet-sql). No API keys or OAuth accounts are required; initialize and tools/list are 100% free.

How much does Sheet SQL & Multi-Tab XLSX Engine API cost per API or MCP call?

Pay per call with zero signup via HTTP 402 (x402 v2 USDC on Base): query_tabular_data ($0.002 base (up to $0.01 max $0.002 base + $0.001 per 1,000 total input rows (capped at $0.01), x402 variable settlement)); build_xlsx_workbook ($0.003 USD per multi-sheet .xlsx workbook generation (x402 instant micropayment)). Prefer traditional monthly billing? Get a verified-email Bearer API key at https://apikeg.com/account with $5/mo ($6 credit), $20/mo ($28 credit), or $50/mo ($80 credit) per-product plans. Invalid schemas (HTTP 400) and ?dry_run=true always cost $0.00.

Can I validate request payloads for free before paying?

Yes. Pass ?dry_run=true in the URL or send the header X-Dry-Run: true to validate your JSON input against the strict schema at $0.00 cost.