Documentation
One endpoint, one key.
ReSQLable exposes read-only, versioned datasets over HTTP. There is no SDK and no query language to learn: you send SQL, you get JSON back.
Base URL
https://api.resqlable.xyz
Authentication
Every metered request carries a bearer key:
Authorization: Bearer rq_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keys are generated by us, not by the payment provider. Only a SHA-256 digest is stored, so a lost key cannot be recovered — rotate it instead.
Quickstart
# 1. get a free key
curl -s https://api.resqlable.xyz/v1/keys/free \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
# 2. list datasets
curl -s https://api.resqlable.xyz/v1/datasets
# 3. inspect a schema
curl -s https://api.resqlable.xyz/v1/datasets/airports/schema
# 4. query
curl -s https://api.resqlable.xyz/v1/query \
-H "Authorization: Bearer $RESQLABLE_KEY" \
-H "Content-Type: application/json" \
-d '{"dataset":"airports","sql":"SELECT name, iso_country FROM airports LIMIT 3"}'
POST /v1/query
| Field | Type | Notes |
|---|---|---|
dataset | string | Dataset id from /v1/datasets. |
sql | string | Exactly one SELECT or WITH statement. |
format | string | objects (default) or arrays for compact payloads. |
{
"dataset": "airports",
"columns": ["name", "iso_country"],
"rows": [{"name": "Narita International Airport", "iso_country": "JP"}],
"row_count": 1,
"truncated": false,
"elapsed_ms": 2
}
Datasets
GET /v1/datasets returns every dataset with row counts and license. GET /v1/datasets/{id}/schema returns tables, columns and types.
SQL rules
- One statement, starting with
SELECTorWITH. - Read-only: the file is opened read-only, pragmas force query-only mode, and an authorizer denies writes.
ATTACH,PRAGMA,VACUUM,load_extension,readfileand similar are denied.- Each response is capped by rows and bytes;
truncatedtells you whether a cap was hit. - Slow queries are interrupted at the tier's time budget.
Limits
| Plan | req/min | req/day | req/month | rows |
|---|---|---|---|---|
| Free | 10 | 500 | 10,000 | 100 |
| Developer | 60 | 5,000 | 200,000 | 1,000 |
| Commercial | 300 | 50,000 | 2,000,000 | 5,000 |
| Enterprise | 1,000 | 200,000 | 20,000,000 | 20,000 |
Daily counters reset at 00:00 UTC. Monthly counters reset on the first of the month, UTC.
Rate limit headers
X-RateLimit-Limit-Requests: 60 X-RateLimit-Remaining-Requests: 59 X-RateLimit-Reset-Requests: 1795929985 X-RateLimit-Limit-Day: 5000 X-RateLimit-Remaining-Day: 4998 X-RateLimit-Limit-Month: 200000 X-RateLimit-Remaining-Month: 199998
Reset-Requests is Unix epoch seconds when the per-minute bucket next has capacity. A 429 also carries Retry-After.
Errors
{
"error": {
"type": "rate_limit_error",
"code": "daily_quota_exceeded",
"message": "Daily quota of 500 requests is exhausted. It resets at 00:00 UTC."
}
}
| Status | Codes |
|---|---|
| 400 | invalid_email, empty_query, multiple_statements, query_error, invalid_dataset |
| 401 | missing_api_key, invalid_authorization, invalid_api_key, api_key_revoked, api_key_expired |
| 403 | query_not_allowed |
| 404 | unknown_dataset, unknown_claim |
| 408 | query_timeout |
| 409 | free_key_exists, claim_not_ready |
| 410 | claim_expired |
| 429 | rate_limit_exceeded, daily_quota_exceeded, monthly_quota_exceeded, free_key_limit, claim_limit_reached |
| 503 | billing_disabled |
Usage and identity
GET /v1/usage— tier, limits, today and month counters, reset times, 30-day history.GET /v1/me— key prefix, tier, email, timestamps.POST /v1/keys/rotate— issues a new key; the old one keeps working for 24 hours.
Billing
Creem handles payment, tax and invoices. ReSQLable issues the key. A purchase produces a claim link; opening it exchanges the claim token for a key exactly once per visit, up to three times.
GET /billing/config— plans and whether billing is enabled.POST /billing/checkout— returns a hosted checkout URL.POST /billing/claim— exchanges a claim token for a key.
For AI agents
GET /tools.json returns OpenAI-compatible function definitions for schema lookup and querying. GET /llms.txt is a compact machine-readable summary of this page. GET /openapi.json is the full spec.
Data provenance
Every dataset records its source and license in /v1/datasets. The bundled airports dataset comes from OurAirports and is public domain. Facts are facts; we do not redistribute copyrighted descriptions or images.
Last updated 2026-11-29 · API version 0.1.0