API Documentation
Complete reference for the Twitter API proxy endpoints
Quick Start
Get started with the API in minutes
1. Get your API Key
Sign up and create an API key from your dashboard.
2. Make your first request
curl -X GET "https://xapis.dev/api/v1/twitter/user?username=elonmusk" \
-H "X-API-Key: sk_live_your_api_key"3. Authentication
Include your API key in the X-API-Key header or as a Bearer token in the Authorization header.
Credits & Rate Limits
Each API call consumes 1 credit. Credits are refreshed monthly based on your plan.
| Plan | Monthly Credits | Rate Limit |
|---|---|---|
| Free | 10 credits/month | 2 requests/second |
| Pro | 10,000 - 12,000 credits/month | 2 requests/second |
| Lifetime | 20,000 credits/month | 2 requests/second |
Need more credits? You can purchase additional credit packages from your dashboard.
Error Codes
Common error responses
| Code | Status | Description |
|---|---|---|
MISSING_API_KEY | 401 | API key not provided |
INVALID_API_KEY | 401 | Invalid or expired API key |
INSUFFICIENT_CREDITS | 429 | Insufficient credits balance |
RATE_LIMITED | 429 | Too many requests per second |
INVALID_PARAMS | 400 | Missing required parameters |
UNKNOWN_ENDPOINT | 404 | Endpoint does not exist |