Throughput expectations
TwexAPI is built for production workloads. Marketing benchmarks cite up to 100 requests per second per client under normal conditions, but your effective limit depends on endpoint type, account tier, and current platform load. Treat published throughput as an upper bound—not a target for every integration.When you hit a limit
Exceeded limits return HTTP429 Too Many Requests. Some responses include a Retry-After header (seconds until retry is reasonable). When present, wait at least that many seconds before the next call.
Typical response shape:
twexapi_request surfaces the same status inside the tool result. Preserve cursors and completed rows before backing off.
Recovery checklist
1
Stop burst traffic
Pause loops, Prefect flows, n8n batches, or agent tool chains that fired many requests in a short window.
2
Read Retry-After when present
Sleep for the header value. If absent, start with 5–15 seconds and increase on repeated
429s.3
Resume from the last cursor
Retry the same page, not the next one, so you do not skip or duplicate rows.
4
Lower steady-state QPS
Add inter-request delay or reduce worker concurrency before restarting the job.
Backoff example
Python with optionalRetry-After:
retry_delay_seconds—see Prefect guide.
Design patterns that avoid 429
Paginate instead of parallelizing identical reads
Fetching page 1 twenty times in parallel does not speed up a single export. Walk cursors sequentially unless endpoints explicitly support independent shards.Separate read and write schedules
Writes often have stricter practical limits than reads. Run posting, likes, and follows on a slower queue than search and profile lookups.Cache stable lookups
Storeuser_id, profile fields, and tweet metadata when downstream steps reuse them. Fewer duplicate lookups means fewer counted requests.
Use MCP explore sparingly
Discovery calls still count toward usage. Cache the chosen method and path for the duration of a job.
No-code and agent platforms
Platform webhooks (Catch Hook, Custom Webhook) receive agent handoffs—they are not TwexAPI-native event streams. Schedule REST follow-up calls with backoff after webhook ingestion.
MCP vs REST
Both paths share the same account limits and credit model. An agent that loopstwexapi_request without delay can trigger 429 as quickly as a tight SDK loop.
For long-running production exports, prefer direct REST or an SDK with explicit retry policy over an autonomous agent loop.
Monitoring rate-limit health
Log these fields per request:- HTTP status
- Endpoint path
- Cursor or page index
- Retry attempt number
Retry-Afterwhen present
429 rate exceeds a threshold for a single API key or workflow.