API Reference
RESTful JSON API. All endpoints require authentication and count against your monthly API quota.
Authentication
Pass your API key via Bearer token or X-API-Key header.
Authorization: Bearer xflux_YOUR_API_KEY
# or
X-API-Key: xflux_YOUR_API_KEYBase URL
https://xfluxapi.com/api/v1Endpoints
GET
/api/v1/users/:username
Get user profile by username
GET
/api/v1/users/:username/tweets
Get user timeline tweets
GET
/api/v1/tweets/:id
Get tweet by ID
GET
/api/v1/search
Search tweets by query
Query: ?q=keyword&limit=20
POST
/api/v1/tweets
Post a new tweet (coming soon)
{ "text": "Hello from XFlux!" }Response format
Successful responses return JSON with a data field. Errors return error and HTTP 4xx/5xx.
{
"data": {
"id": "44196397",
"username": "elonmusk",
"name": "Elon Musk",
"followers_count": 000000,
"verified": true
}
}Examples
# User profile
curl "https://xfluxapi.com/api/v1/users/elonmusk" \
-H "Authorization: Bearer xflux_YOUR_KEY"
# User timeline
curl "https://xfluxapi.com/api/v1/users/elonmusk/tweets?limit=10" \
-H "Authorization: Bearer xflux_YOUR_KEY"
# Search
curl "https://xfluxapi.com/api/v1/search?q=bitcoin&limit=20" \
-H "Authorization: Bearer xflux_YOUR_KEY"Quota
Each successful API call consumes 1 unit from your monthly plan quota. Monitor polling does not use API quota. See Plans & Limits.