Data Providers
DB Connector Agent
Install the apitree Connector Agent on your server to expose your database as a live API on the marketplace. Your data stays on your infrastructure — the agent responds to queries in real-time.
Quick Start
bashnpx @apitree/connector
# Install and run the interactive setup npx @apitree/connector init # Follow the prompts: ? Database type: postgresql ? Connection string: postgres://user:pass@host:5432/mydb ? apitree API key: nxs_live_... ✓ Connected to database ✓ 12 tables detected ✓ 3 tables selected for API ✓ PII auto-excluded (phone, email columns) ✓ OpenAPI spec generated ✓ Registered on apitree marketplace # Start the agent npx @apitree/connector start ✓ Agent running on port 9090 ✓ Exposing 3 tables: properties, transactions, listings ✓ Health: http://localhost:9090/health ✓ Proxy: https://apitree.ai/api/v1/proxy/your-data
How It Works
flowRequest path
Buyer calls apitree proxy
↓
apitree forwards to your agent (HMAC signed)
↓
Agent queries your DB (read-only, parameterized)
↓
Response returned through apitree proxy
↓
You earn 80% of API call revenueSupported Databases
- PostgreSQL — Full support (primary)
- MySQL / MariaDB — Full support
- More coming: MongoDB, MSSQL, Oracle
Security
- Read-only database connections enforced at adapter level
- Column/table whitelist — only selected fields are queryable
- PII auto-detection (Korean RRN, phone, email, credit card, SSN)
- HMAC-SHA256 request signing between apitree and agent
- Encrypted config file (~/.apitree/connector.json via AES-256-GCM)
- Parameterized queries — zero SQL injection risk
Query API
Once your agent is running, buyers can query your data through the apitree proxy:
bashcurl
# List records with filters curl "https://apitree.ai/api/v1/proxy/your-data?filter[city]=Seoul&sort=price&order=desc&limit=10" \ -H "Authorization: Bearer nxs_live_YOUR_KEY" # Response { "data": [ { "id": 1, "city": "Seoul", "price": 450000000, "area_sqm": 85 } ], "meta": { "total": 1523, "limit": 10, "offset": 0 } }
CLI Commands
bashapitree-connector
apitree-connector init # Interactive setup wizard apitree-connector start # Start the agent server apitree-connector status # Check agent health apitree-connector help # Show help
Revenue Model
You earn 80% of every API call made through your connector. Cache-miss calls generate provider revenue. Monthly payouts when accumulated earnings reach $100.