📘
English |
简体中文 |
繁體中文 |
日本語 |
한국어 |
Deutsch |
Français |
Italiano |
Português |
Español |
Русский
apiSQL
API development = One SQL
Rapidly turn your database into a REST API and MCP Server, proxy any API, and achieve enterprise-grade security protection.
apiSQL is a powerful platform for API development and management. With its built-in API Gateway supporting secure tunneling, you can easily proxy any internal or external API, or connect to databases and expose them as APIs or MCP Servers (Model Context Protocol) with enterprise-grade security—faster, simpler, and safer than building from scratch.
💡 The Origin of apiSQL
apiSQL started as a simple internal tool to quickly expose MySQL's SELECT, INSERT, UPDATE, DELETE as APIs.
For example: to develop a query API:
SELECT * FROM area
This generates an API supporting both GET and POST methods. Demo URL (public, no auth):
https://open.apisql.cn/api/demo-area/all
Paginate the result (page 2, 10 rows per page, 30s timeout):
https://open.apisql.cn/api/demo-area/all?meta[pageNum]=2&meta[pageSize]=10&meta[timeout]=30
You can also: sort fields, export to Excel/CSV, define environments, and debug in a built-in Postman-style interface—parameters auto-generated, no switching tools.
Example of an upsert API with MySQL:
INSERT INTO `user_upsert` (id, name, age)
VALUES
(:id, :name, :age)
ON DUPLICATE KEY UPDATE
id = VALUES(id),
name = VALUES(name),
age = VALUES(age);
Custom function API to calculate city distance:
SELECT calc_city_distance(:name1, :name2) AS distance_desc;
Call a stored procedure to create a transfer transaction API:
CALL transfer_funds(:from_account_id, :to_account_id, :amount)
Simple. Elegant. Efficient.
With continued use, we realized: the database is the ultimate backend.
Why reinvent the wheel? Leverage the battle-tested performance, stability, and power of databases by exposing them securely and directly as APIs.
apiSQL has evolved from a lightweight internal tool to a full-featured API platform:
- Multi-database support: from MySQL to Oracle, PostgreSQL, SQLServer, and modern big data platforms.
- From basic to complex logic: supports stored procedures, user-defined functions, transactional SQL, and even JavaScript scripts for cloud-function-level logic.
- Enterprise-grade security: built-in support for API Keys, IP whitelisting, JWT, and more.
- From tool to platform: multi-tenant, multi-project, team collaboration, auto-docs, private deployment, K8s support, and multiple editions (Free, Pro, Enterprise, SaaS).
- AI integration: proxy existing APIs, generate APIs from SQL, and expose databases as MCP Servers for integration with AI agents like Coze and Dify.
✨ Key Features
🗄️ Multi-Database Support
- Relational Databases: SQLite、MySQL, PostgreSQL, Oracle, SQLServer
- Analytical/NewSQL: Doris, SelectDB, StarRocks, TiDB, Huawei DWS (GaussDB)
- Full Object Support: tables, views, stored procedures, UDFs → APIs
⚙️ Rapid API Generation
- SQL-first API: Write
SELECT/INSERT/UPDATE/DELETE, get a REST API—no backend code needed
- Transactional Support: Multi-step SQL with full transaction control
- Power Features: paging, sorting, nested calls, Excel/CSV export, custom parameters
- Auto Docs: Auto-generated RESTful docs with required fields, enums, regex validation
- Built-in Debugger: Postman-style tool with cURL, JS, Go snippets
🧩 Script Extensibility
- Pre/Post Hooks: Attach JavaScript before or after API execution (reuse with global scripts)
- Cloud-function Power: Use npm packages to validate, transform, fetch external services
- Reusable Logic: Shared scripts for faster dev and consistency
🛡️ Enterprise-Grade Gateway & Security
- Multi-auth Support: API Key, IP whitelist, JWT, more
- API Proxy & Enhancements: Centralize auth, logging, throttling across your APIs
- Tunneling & Exposure: Safely expose internal data sources over the internet
🤖 AI-Ready Integration
- AI Gateway: Proxy OpenAI or local LLMs (e.g. Ollama), route requests, support clusters
- MCP Server: Convert DB to MCP (Model Context Protocol), enabling SSE and streaming for AI agents like Dify, Coze
🚀 Get Started
- Try Now: Visit apisql.cn and register for a free trial
- Read the Docs: Follow the Quick Start Guide
- Choose Your Deployment:
- SaaS: Zero setup, instantly usable, scalable cloud version
- Free Private Version: Download here and deploy on your server
📦 Editions
| Edition |
For |
Deployment |
Key Features |
| Free |
Individuals, Small Teams |
Self-hosted |
Core API functionality |
| Pro |
Pro Devs, Mid-size Teams |
Self-hosted |
Advanced features |
| Enterprise |
Large Organizations |
Self-hosted |
Multi-project, multi-user, full-stack |
| SaaS |
Everyone |
Cloud-hosted |
Hassle-free, ready-to-use, pay-as-you-go |
👉 View full comparison
⚠️ Please Note
apiSQL provides a fully functional free version for self-hosted and commercial use, but the project is not open-source.
🛣️ Roadmap
- ✅ [Released] DB as MCP Server: Full support for SSE & Streamable HTTP—publish any database as a standard MCP Server in one click. Ships with the open-source apisql-mcp: one MCP connects to many databases, with runtime data-source switching.
- ✅ [Released] apiSQL Skill: SUDB (Super Database API) packaged as an open-source AI Skill—paste one prompt and let Claude, Cursor and other AI run your database in natural language. Zero config, zero signup.
- 🛠️ [In Dev] VS Code Plugin: Develop/debug apiSQL right inside VS Code
🔗 Links