No credit cardStart free

API Endpoints

Complete reference for all API endpoints. All endpoints require authentication.

All endpoints are under https://api.rawquery.dev/api/v1. Authenticate with a Bearer token (JWT) or X-API-Key header depending on the endpoint.

POST /api/v1/execute

Execute a SQL query and return results. Auth: X-API-Key header. See the full Execute API docs for details.

Request Body

json
{
"sql": "SELECT * FROM my_stripe.customers LIMIT 10",
"format": "json"
}

Format options: json (columns + rows), objects (array of dicts), csv (file download).

Response

json
{
"columns": [
{ "name": "id", "type": "VARCHAR" },
{ "name": "email", "type": "VARCHAR" }
],
"rows": [
["cus_abc123", "alice@example.com"],
["cus_def456", "bob@example.com"]
],
"row_count": 2,
"execution_time_ms": 45.12,
"metadata": {
"bytes_scanned": 1024,
"cost_eur": 0.00001
}
}

Example

bash
curl -X POST https://api.rawquery.dev/api/v1/execute \
-H "X-API-Key: rq_your_api_key" \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT COUNT(*) FROM my_stripe.charges"}'

GET /api/v1/execute/tables

List all available tables. Auth: X-API-Key header.

Example

bash
curl https://api.rawquery.dev/api/v1/execute/tables \
-H "X-API-Key: rq_your_api_key"

POST /api/v1/workspaces/{workspace_id}/query

Execute a workspace-scoped query with usage tracking. Auth: Bearer token. Used internally by the dashboard query editor.

Connections

GET /api/v1/workspaces/{workspace_id}/connections

List all connections in a workspace. Auth: Bearer token.

text
POST /api/v1/workspaces/{workspace_id}/connections # Create connection
GET /api/v1/workspaces/{workspace_id}/connections # List connections
GET /api/v1/workspaces/{workspace_id}/connections/{connection_id} # Get connection
DELETE /api/v1/workspaces/{workspace_id}/connections/{connection_id} # Delete connection
POST /api/v1/workspaces/{workspace_id}/connections/{connection_id}/test # Test connection
GET /api/v1/workspaces/{workspace_id}/connections/{connection_id}/streams # Discover streams
POST /api/v1/workspaces/{workspace_id}/connections/{connection_id}/sync # Trigger sync
GET /api/v1/workspaces/{workspace_id}/connections/{connection_id}/sync-status # Sync status

Tables (Lakehouse)

GET /api/v1/query/tables

List all available Iceberg tables with metadata. Auth: Bearer token (JWT). For API key access, use /api/v1/execute/tables.

text
GET /api/v1/query/tables # List all tables
GET /api/v1/query/tables/{schema.table}/metadata # Table detail + columns

Transforms

SQL transforms with DAG execution. Auth: Bearer token. See the Transforms docs for details.

text
GET /api/v1/workspaces/{workspace_id}/transforms # List transforms
POST /api/v1/workspaces/{workspace_id}/transforms # Create transform
GET /api/v1/workspaces/{workspace_id}/transforms/dag # Get DAG
POST /api/v1/workspaces/{workspace_id}/transforms/run # Run all/selected
GET /api/v1/workspaces/{workspace_id}/transforms/{transform_id} # Get transform
PATCH /api/v1/workspaces/{workspace_id}/transforms/{transform_id} # Update transform
DELETE /api/v1/workspaces/{workspace_id}/transforms/{transform_id} # Delete transform
POST /api/v1/workspaces/{workspace_id}/transforms/{transform_id}/run # Run single
GET /api/v1/workspaces/{workspace_id}/transforms/{transform_id}/runs # Run history

API Keys

Manage API keys programmatically. Auth: Bearer token.

text
POST /api/v1/auth/api-keys # Create API key
GET /api/v1/auth/api-keys # List API keys
DELETE /api/v1/auth/api-keys/{key_id} # Revoke API key

Charts

Chart CRUD and publishing. Auth: Bearer token. See the Charts docs for details.

text
GET /api/v1/workspaces/{workspace_id}/charts # List charts
POST /api/v1/workspaces/{workspace_id}/charts # Create chart
GET /api/v1/workspaces/{workspace_id}/charts/{name} # Get chart
PATCH /api/v1/workspaces/{workspace_id}/charts/{name} # Update chart
DELETE /api/v1/workspaces/{workspace_id}/charts/{name} # Delete chart
POST /api/v1/workspaces/{workspace_id}/charts/{name}/publish # Publish chart
DELETE /api/v1/workspaces/{workspace_id}/charts/{name}/publish # Unpublish chart
GET /c/{token} # Public chart page
GET /c/{token}/data # Public chart data (JSON)

Pages

Page (dashboard) CRUD and publishing. Auth: Bearer token. See the Pages docs for details.

text
GET /api/v1/workspaces/{workspace_id}/pages # List pages
POST /api/v1/workspaces/{workspace_id}/pages # Create page
GET /api/v1/workspaces/{workspace_id}/pages/{name} # Get page
PATCH /api/v1/workspaces/{workspace_id}/pages/{name} # Update page
DELETE /api/v1/workspaces/{workspace_id}/pages/{name} # Delete page
POST /api/v1/workspaces/{workspace_id}/pages/{name}/publish # Publish page
DELETE /api/v1/workspaces/{workspace_id}/pages/{name}/publish # Unpublish page
GET /p/{token} # Public page

Saved Queries

Parameterized saved queries. Auth: Bearer token. See the Saved Queries docs for details.

text
GET /api/v1/workspaces/{workspace_id}/saved-queries # List saved queries
POST /api/v1/workspaces/{workspace_id}/saved-queries # Create saved query
GET /api/v1/workspaces/{workspace_id}/saved-queries/{name} # Get saved query
DELETE /api/v1/workspaces/{workspace_id}/saved-queries/{name} # Delete saved query
POST /api/v1/workspaces/{workspace_id}/saved-queries/{name}/run # Run saved query

Workspaces

Workspace CRUD. Auth: Bearer token.

text
POST /api/v1/workspaces # Create workspace
GET /api/v1/workspaces # List your workspaces
GET /api/v1/workspaces/{workspace_id} # Get workspace by ID

Create Workspace

json
{
"name": "My Company",
"slug": "my-company",
"region": "eu-west-gra"
}

Slug must be 3-63 characters, lowercase alphanumeric with hyphens. Region defaults to eu-west-gra.

Workspace Members

Manage workspace members and roles. Auth: Bearer token. Adding, updating, and removing members requires OWNER or ADMIN role.

text
GET /api/v1/workspaces/{workspace_id}/members # List members
POST /api/v1/workspaces/{workspace_id}/members # Add member by email
PATCH /api/v1/workspaces/{workspace_id}/members/{member_id} # Update member role
DELETE /api/v1/workspaces/{workspace_id}/members/{member_id} # Remove member

Add Member

json
{
"email": "alice@example.com",
"role": "MEMBER"
}

Roles: OWNER, ADMIN, MEMBER, VIEWER. OWNER cannot be assigned via invite.

Push Data

POST /api/v1/workspaces/{workspace_id}/push

Push JSON records into an Iceberg table. Creates the table if it does not exist. Schema is inferred from the records. Auth: Bearer token. See the Push Data docs for details and CLI usage.

Request Body

json
{
"table": "crm.contacts",
"records": [
{ "id": 1, "name": "Alice", "email": "alice@example.com" },
{ "id": 2, "name": "Bob", "email": "bob@example.com" }
],
"primary_key": ["id"],
"mode": "append"
}

Mode: append (default) or overwrite. Table format: namespace.table (e.g. crm.contacts).

Response

json
{
"records_written": 2,
"table": "crm.contacts"
}

Usage & Billing

Query usage tracking and billing information. Auth: Bearer token.

text
GET /api/v1/workspaces/{workspace_id}/usage # Usage summary (default: current month)
GET /api/v1/workspaces/{workspace_id}/usage/daily # Daily usage breakdown
GET /api/v1/workspaces/{workspace_id}/usage/current # Current billing period usage
GET /api/v1/workspaces/{workspace_id}/usage/dashboard # Usage dashboard with plan limits and cost
GET /api/v1/workspaces/{workspace_id}/usage/export # Export usage records (CSV or JSON)

Usage Summary

Query params: start_date, end_date (YYYY-MM-DD). Defaults to current month.

json
{
"query_count": 142,
"total_bytes_scanned": 1073741824,
"total_bytes_scanned_gb": 1.0,
"total_cpu_ms": 28400,
"total_rows_returned": 5280,
"period_start": "2026-02-01",
"period_end": "2026-02-18"
}

Usage Dashboard

json
{
"plan_tier": "team",
"plan_price": 29.0,
"queries_used": 142,
"queries_included": 50000,
"queries_remaining": 49858,
"overage_queries": 0,
"storage_used_gb": 1.2,
"storage_limit_gb": 10.0,
"storage_remaining_gb": 8.8,
"connectors_used": 3,
"connectors_limit": null,
"estimated_cost_mtd": 29.0,
"period_start": "2026-02-01",
"period_end": "2026-02-28"
}

Export

Query params: start_date, end_date, format (csv or json).

SDK Examples

Python

python
import requests
API_KEY = "rq_your_api_key"
BASE_URL = "https://api.rawquery.dev/api/v1"
def query(sql):
response = requests.post(
f"{BASE_URL}/execute",
headers={"X-API-Key": API_KEY},
json={"sql": sql},
)
return response.json()
result = query("SELECT * FROM my_stripe.customers LIMIT 5")
for row in result["rows"]:
print(row)

JavaScript

js
const API_KEY = "rq_your_api_key";
const BASE_URL = "https://api.rawquery.dev/api/v1";
async function query(sql) {
const response = await fetch(`${BASE_URL}/execute`, {
method: "POST",
headers: {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ sql }),
});
return response.json();
}
const result = await query("SELECT * FROM my_stripe.customers LIMIT 5");
console.log(result.columns.map(c => c.name));
console.log(result.rows);