Create an X crawl task
create_crawl_taskCreate a crawl task for one or more X (Twitter) usernames. Side effects: creates a new task AND consumes points.
If points are insufficient, upstream returns HTTP 402 with PAYMENT-REQUIRED (quote). This tool surfaces it as error.code=PAYMENT_REQUIRED with payment_required payload so agents can request spending approval, top up, then retry safely.
Modes:
normal: Fast latest-post snapshot at scale (fresh-feed monitoring). Optimized for high-throughput batch retrieval.
deep: Deeper per-user collection/enrichment (typically slower; higher resource usage). Use when you need more than a quick latest-post snapshot.
Performance note: Normal mode is optimized for a small latest-post snapshot per handle. Actual completeness and latency depend on X availability, upstream limits, and network conditions. Batching: For very large sets, split users into batches. Suggested upper bound per task: 500 users (configurable via MAX_USERS_PER_TASK).
Reliability:
Use idempotency_key to make retries safe (avoid duplicate charges).
After creation, poll get_task_status every 5–10s until has_result=true.
Then call get_result_download_url (download still requires the same Bearer token).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | normal = fast latest-post snapshot at scale; deep = deeper per-user collection (slower). | normal |
| users | Yes | Array of X usernames (handles). You may include a leading '@'. | |
| idempotency_key | No | Optional idempotency key for safe retries (recommended for agents). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |