The Xquik REST API v1 provides programmatic access to X data and automation. Endpoints are organized into these categories:Documentation Index
Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
Use this file to discover all available pages before exploring further.
Monitors & Events
Create account and keyword monitors, retrieve events, manage webhooks
Draws & Extractions
Run giveaway draws, extract tweet data
X Data
User lookups, tweet search, trends, media downloads
X Write Actions
Post tweets, like, retweet, follow, DM, profile updates
Account & Billing
Account info, API keys, drafts, styles, subscriptions
Base URL
301 redirect to HTTPS. Always use the full base URL.
OpenAPI spec
The full API specification is available as an OpenAPI 3.1 document:Authentication
Pass your API key via thex-api-key header:
Machine Payments Protocol
31 X-API endpoints also accept anonymous MPP payments. The server returns a 402 challenge; your client pays via Tempo (USDC) and retries with a payment credential. No API key needed. See the MPP overview for eligible endpoints and pricing.First request
Copy-paste this to verify your API key works:xq_YOUR_KEY_HERE with your actual API key from the dashboard. If you get 401, double-check that the header name is x-api-key (lowercase) and the key starts with xq_.
Integration readiness checklist
Run this checklist before connecting a production client, workflow builder, or agent to the API.| Check | Verify | Failure mode to handle |
|---|---|---|
| Authentication | Send x-api-key on subscription endpoints or use the documented MPP flow on eligible X data endpoints. | 401 unauthenticated, 402 no_subscription, or an MPP 402 payment challenge. |
| Response contract | Default REST examples use the v1 shape. Send xquik-api-contract: 2026-04-29 only when your client expects snake_case, structured errors, has_more, and next_cursor. | Field-name drift between generated clients, MCP calls, and hand-written REST code. |
| Pagination | Use after with nextCursor on events, draws, extractions, and drafts. Use cursor with next_cursor on X data endpoints. | Missing pages, duplicate records, or clients that decode opaque cursors. |
| Billing | Handle 402 no_credits and 402 insufficient_credits. Estimate extraction cost before creating extraction jobs. | Partial paid result pages, failed draws, or jobs blocked by credit balance. |
| Rate limits | Respect Retry-After. Read calls are 10 per 1s, write calls are 30 per 60s, and delete calls are 15 per 60s. | Repeated 429 rate_limit_exceeded responses and avoidable retry storms. |
| Ambiguous writes | Treat 202 x_write_unconfirmed as pending confirmation. Store writeActionId, call GET /x/write-actions/{id}, and do not retry-send while status is pending_confirmation. | Duplicate tweets, repeated actions, or inconsistent operator handoff. |
Rate limits
| Tier | Methods | Limit |
|---|---|---|
| Read | GET, HEAD, OPTIONS | 10 per 1s |
| Write | POST, PUT, PATCH | 30 per 60s |
| Delete | DELETE | 15 per 60s |
429 Too Many Requests with a Retry-After header. See the Rate Limits guide for backoff implementations in multiple languages.
Conventions
IDs are strings
IDs are strings
All IDs are returned as strings representing bigint values. Always treat IDs as opaque strings - never parse them as numbers:
Timestamps are ISO 8601 UTC
Timestamps are ISO 8601 UTC
All timestamps use ISO 8601 format in UTC. Store and compare timestamps as strings or parse them into proper date objects:
Errors follow a consistent format
Errors follow a consistent format
All errors return a JSON body with an Common errors:
See Error Handling for the full error code list and handling strategies.
error field containing a machine-readable error code:| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_input | Request body failed validation |
| 401 | unauthenticated | Missing or invalid API key |
| 402 | no_subscription | No active subscription |
| 402 | no_credits | No credit balance |
| 402 | insufficient_credits | Insufficient credits for this operation |
| 404 | not_found | Resource does not exist |
| 429 | - | Rate limited - retry with backoff |
| 502 | x_api_unavailable | Read service temporarily unavailable - retry |
Cursor-based pagination
Cursor-based pagination
- Platform endpoints
- X endpoints
Events, draws, extractions, and drafts use cursor-based pagination. When more results exist, the response includes Pass
hasMore: true and a nextCursor value:nextCursor as the after query parameter to fetch the next page:Opt-in response contract
Opt-in response contract
v1 keeps the default response contract unchanged for existing clients. Send Opt-in responses use snake_case field names, Unix timestamps in seconds, structured error objects, Legacy dependency failures that return
xquik-api-contract: 2026-04-29 to opt in to the normalized v1 response contract.has_more and next_cursor pagination fields, an object field on recognized resources, and prefixed IDs where available.502 by default return 424 Failed Dependency in the opt-in contract:Event types
Monitor events
Used across monitors, webhooks, and events:| Type | Description |
|---|---|
tweet.new | Original tweet posted by the monitored account or matching query |
tweet.quote | Quote tweet posted by the monitored account or matching query |
tweet.reply | Reply posted by the monitored account or matching query |
tweet.retweet | Retweet posted by the monitored account or matching query |
Next steps
Error Handling
Handle errors gracefully with retries and fallbacks.
Rate Limits
Understand limits and implement backoff strategies.
Workflows
End-to-end examples: monitors, events, and webhooks.
X Data Endpoints
User lookups, tweet search, trends, and media downloads.
X Write Actions
Post tweets, like, retweet, follow, DM, and more.
Monitors
Track X accounts and receive real-time events.