ASIMOV X Module
ASIMOV module for importing data from X (Twitter) lists and converting it to JSON-LD format.
✨ Features
- 🐦 Import List Members: Fetch and convert X list members to JSON-LD
- 🔄 User Profiles: Complete user data including metrics and profile information
- 🔄 JSON-LD Output: Structured data compatible with KNOW ontology
- ⚡ Fast & Reliable: Built with Rust for performance and safety
- 📊 Rate Limit Aware: Respects X API limits and provides clear error handling
- 📊 Flexible Output: Support for both JSON and JSONL formats
- 🔢 Pagination Control: Limit results with
--limitoption
🛠️ Prerequisites
- Rust 1.85+ (2024 edition) if building from source code
- X (Twitter) developer account with API access
X_TOKENenvironment variable
⬇️ Installation
Installation from Package Managers
# From Cargo (Rust)
👉 Examples
Import List Members
# Import all list members (default JSONL output)
# Import first 100 members only
# Output in JSON format instead of JSONL
Other Commands
# Show version information
# Show license information
# Show help
⚙️ Configuration
API Token Setup
Set your X API token as an environment variable:
Or use a .env file:
X_TOKEN=your-x-api-token-here
Get your API token from: X Developer Portal
Rate Limiting
⚠️ IMPORTANT: X API has strict rate limits that vary by subscription plan.
Free Plan
- Maximum users per request: 100 users only
- Request frequency: 1 request every 15 minutes
- Error: Returns HTTP 429 if you try within 15-minute window
- Pagination: Limited to single page (100 users max)
Basic Plan
- Maximum users per request: 100 users
- Request frequency: 5 requests per 15 minutes (per user)
- App-wide limits: 25 requests per 15 minutes (per app)
- Pagination: Can handle multiple pages with delays
Pro Plan
- Maximum users per request: 100 users
- Request frequency: 900 requests per 15 minutes (per user)
- App-wide limits: 900 requests per 15 minutes (per app)
- Pagination: Can handle large lists efficiently
Free plan users: Use --limit=100 and wait 15 minutes between requests.
👨💻 Development
📊 Output Formats
JSONL (Default)
{"@type":"know:XUser","id":"123","name":"John Doe","username":"johndoe",...}
{"@type":"know:XUser","id":"456","name":"Jane Smith","username":"janesmith",...}
JSON (Structured)
📄 License
This project is licensed under the Unlicense - see the UNLICENSE file for details.