Skip to main content
Xquik is a hosted SaaS platform for X (Twitter) data. All data processing happens server-side — there is no infrastructure to deploy, no workers to manage, and no X API credentials to configure. You interact with Xquik through the REST API, MCP server, or dashboard.

Architecture Overview

┌──────────────────────────────────────────────────┐
│                    Clients                        │
│  REST API  ·  MCP Server  ·  Dashboard  ·  CLI   │
└──────────────────────┬───────────────────────────┘
                       │ HTTPS
┌──────────────────────▼───────────────────────────┐
│                  Xquik Server                     │
│  Next.js App Router  ·  API Routes  ·  MCP Host  │
├───────────────────────────────────────────────────┤
│  Auth  ·  Rate Limiter  ·  Usage Tracking         │
├───────────────────────────────────────────────────┤
│  Extraction Engine  ·  Draw Engine  ·  Monitors   │
└──────────┬──────────────────────┬─────────────────┘
           │                      │
┌──────────▼──────────┐  ┌───────▼─────────────────┐
│   PostgreSQL 18     │  │   Xquik Stream Service   │
│  29 tables, Drizzle │  │  WebSocket + pg_notify   │
│  ORM                │  │  Webhook delivery        │
└─────────────────────┘  └───────┬─────────────────┘

                        ┌────────▼────────┐
                        │   X API Layer   │
                        │  TwitterAPI.io  │
                        └─────────────────┘

Components

ComponentRole
REST API30+ endpoints at https://xquik.com/api/v1/* for programmatic access
MCP Server21 tools at https://xquik.com/mcp for AI agent integration
DashboardWeb UI for managing monitors, running extractions, viewing results
Xquik StreamBackground service that maintains WebSocket connections to X and delivers webhook events
PostgreSQLPrimary datastore for all user data, extraction results, events, and job state
X API LayerProxied access to X data via TwitterAPI.io with automatic retry and rate management

Security Model

Authentication

Xquik uses API key authentication for all API and MCP access.
AspectDetail
Headerx-api-key (lowercase, required on every request)
Key formatPrefixed with xq_, 64 characters total
StorageKeys are hashed (SHA-256) at rest — Xquik never stores plaintext keys
RevocationInstant via dashboard or API. Revoked keys return 401 immediately
Last usedTracked per key for audit purposes
Session authDashboard uses HTTP-only session cookies (90-day expiry, magic link login)
API keys are shown once at creation. Store them securely. There is no way to retrieve a key after creation.

Data Isolation

Every API key is scoped to a single user account. There is no cross-user access.
ResourceIsolation
MonitorsEach user sees only their own monitors
EventsEvents are scoped to the user’s monitors
WebhooksWebhook endpoints and delivery logs are per-user
ExtractionsExtraction jobs and results belong to the creating user
DrawsGiveaway draws and winner lists are per-user
API KeysUsers manage only their own keys (session auth required)
Attempting to access another user’s resources returns 404 Not Found (not 403), preventing enumeration attacks.

Authorization

Xquik uses a flat permission model — no roles, no RBAC, no team workspaces.
  • One user, one account: Each account has full access to all its own resources
  • API key = full access: Any valid API key for an account can perform all operations that account is authorized for
  • Session-only endpoints: API key management (/api/v1/api-keys/*) requires session auth (dashboard login), not API key auth. You cannot create or revoke API keys using an API key.
  • Subscription gates: Metered endpoints (extractions, draws, X lookups) require an active subscription. Management endpoints (monitors, webhooks, events) work without a subscription.

Rate Limits

Rate limits are enforced per API key using a token bucket algorithm.
ScopeSustained RateBurst Allowance
API endpoints (/api/v1/*)10 req/s20 requests
General requests60 req/s100 requests
When the bucket is empty, requests return 429 Too Many Requests with a Retry-After header. See the Rate Limits guide for detailed explanations, backoff strategies, and client-side rate limiter code examples.

Usage & Billing

AspectDetail
Subscription$20/month base, includes 1 monitor
Additional monitors$10/month each
Usage cap$10/month metered usage per subscriber
Quota resetAutomatic at each billing period
OverageNo overage billing — metered calls are rejected at 100% usage

What Counts as Usage

Metered (consumes quota)Free (unlimited)
Tweet searchesMonitor management
User lookupsEvent retrieval
Follower checksWebhook management
ExtractionsAPI key management
DrawsAccount management
Trends
See Billing & Usage for operation limits and usage scenarios.

Monitoring Architecture

Xquik monitors X accounts in real time through a dedicated background service.
X WebSocket Stream


┌─────────────────┐     ┌──────────────────┐
│  Xquik Stream   │────▶│   PostgreSQL     │
│  (systemd svc)  │     │  events table    │
└────────┬────────┘     └──────────────────┘

         │ pg_notify

┌─────────────────┐
│ Webhook Delivery │
│ HMAC-signed POST │
│ 5 retries, exp.  │
│ backoff           │
└─────────────────┘
AspectDetail
Event typestweet.new, tweet.reply, tweet.quote, tweet.retweet, follower.gained, follower.lost
DeliveryHMAC-SHA256 signed HTTPS POST to registered webhook endpoints
Retries5 attempts with exponential backoff (1s, 2s, 4s, 8s, 16s)
TimeoutWebhook endpoints must respond with 2xx within 10 seconds
PropagationEvents appear within seconds to minutes depending on X API latency

Platform Limitations

LimitationDetail
Single regionAll data is processed and stored in a single datacenter (no multi-region replication)
No DMsDirect messages and private account data are not accessible
No write operationsCannot post tweets, like, retweet, or follow accounts
No liked/bookmarked tweetsCannot retrieve tweets a user liked or bookmarked
Export capFile exports (CSV/XLSX/Markdown) are capped at 50,000 rows per extraction
Webhook retries5 attempts maximum. After exhaustion, the delivery is marked as exhausted
Monitor default1 monitor included per subscription. Additional monitors cost $10/month each

Next Steps