Getting Started with XAPI Free Services
You can think of XAPI as an out-of-the-box backend toolbox for developers.
It provides a suite of general-purpose backend API services, designed to let you quickly integrate features like dynamic content and data analytics into your application without writing a single line of backend code. You focus on your core business and frontend development; XAPI handles the stable, high-performance underlying support.
- Unified API Endpoint: All services are provided through
api.xabcstack.com
, managed with a unifiedXAPI KEY
. The API design follows RESTful principles, making it simple and easy to use. - High-Performance Architecture: Built-in multi-level caching (in-memory, Redis) ensures millisecond-level responses under high concurrency, providing a smooth experience for your application.
- Event-Driven Design: Services are decoupled via an event bus, ensuring high system cohesion and data consistency.
Core Services
XAPI currently offers two main services: Dynamic Card Service and Website Analytics Service.
1. X-CARD Dynamic Card Service

X-CARD is a lightweight, dynamic content delivery system, perfect for scenarios like in-app announcements, notifications, promotional cards, and dashboard information modules. The card on the right side of our current homepage is powered by X-CARD.
- Core Features:
- Dynamic Creation: Create cards with titles, content, images, and links at any time via the API.
- Priority Sorting: Set card priorities to intelligently control the display order on the frontend.
- Automatic Expiration: Set an expiration date for cards, which will be automatically taken offline without manual management.
- Display Control: Limit the maximum number of times each card is displayed for precise delivery.
2. X-STATS Website Analytics Service

X-STATS is a simple, cookie-less website analytics service for lightweight tracking of page or link visits. It's privacy-friendly. The data statistics at the bottom of this page are powered by X-STATS.
- Core Features:
- Visit Tracking: Track the visit count (PV) of any URL with a single line of code.
- Referrer Analysis: Automatically parse and count visit source domains (Referer).
- Data Dashboard: Provides leaderboards for popular URLs and referrers to quickly understand traffic distribution.
- Data Overview: Provides aggregated user-level data such as total visits and total number of referrers.
API Quick Start
After successful registration, you will receive two types of keys:
- Private Key (sk-...): Used for secure operations that require authentication, such as creating, modifying, or deleting resources.
- Public Key (pk-...): Used for operations that can be exposed on the frontend, such as data tracking and querying public data.
Example 1: Create an announcement card (using a private key)
Use your sk-
key to create an announcement card that is valid for 7 days.
export XAPI_KEY="your-xapi-key" # The key starting with sk-
curl -X POST https://api.xabcstack.com/x-card \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAPI_KEY" \
-d '{
"title": "đ New Feature Live!",
"content": "Our Website Analytics Service is now fully available. Come and try it out!",
"link": "https://xabcstack.com",
"priority": 10,
"days": 7
}'
Example 2: Fetch and display cards on the frontend (using a public key)
In your website or app, use your pk-
public key to fetch and display all active cards.
export XAPI_PUBLIC_KEY="your-public-key" # The key starting with pk-
curl -X GET "https://api.xabcstack.com/x-card/${XAPI_PUBLIC_KEY}"
Example 3: Track a page view on the frontend (using a public key)
Embed this request in your website's frontend code to track page views.
export XAPI_PUBLIC_KEY="your-public-key" # The key starting with pk-
curl -X POST "https://api.xabcstack.com/x-urls/${XAPI_PUBLIC_KEY}/track" \
-H "Content-Type: application/json" \
-H "Referer: https://www.google.com/" \
-d '{
"url": "https://yoursite.com/pricing"
}'
Example 4: Get an overview of statistics (using a public key)
Get a statistical overview for all URLs under your account, including total visits, top 10 popular URLs, etc.
export XAPI_PUBLIC_KEY="your-public-key" # The key starting with pk-
curl -X GET "https://api.xabcstack.com/x-urls/${XAPI_PUBLIC_KEY}/overview?limit=10"