Skip to main content
This guide builds on the Kotlin SDK setup, which covers install and authentication.

Follower export workflow to CSV, JSON, or XLSX

Use this workflow when a Kotlin worker needs an owned follower list. It feeds CRMs, warehouses, account scoring, analyst CSVs, XLSX workbooks, or resumable JSON handoffs. client.extractions().estimateCost maps to POST /extractions/estimate, and client.extractions().run maps to POST /extractions. client.extractions().retrieve maps to GET /extractions/{id}, and client.extractions().exportResults maps to GET /extractions/{id}/export. For follower exports, follower_explorer requires targetUsername.
client.extractions().run returns the queued 202 Accepted receipt from POST /extractions. Kotlin exposes REST id, toolType, and status: "running" as job.id(), job.toolType(), and job._status(). Store job.id() immediately, then poll client.extractions().retrieve before reading pages or calling client.extractions().exportResults. Credit reservation happens after the job starts. Available credits can change after estimateCost. If they did, the run can fetch only the affordable count before export. In that case it can instead mark the job failed with insufficient_credits.
Store job.id(), targetUsername, estimate.estimatedResults(), and estimate.source() before polling so retries can resume the extraction. client.extractions().retrieve returns results(), hasMore(), and nextCursor(). Pass nextCursor() back as cursor to page large follower lists. Map exported User ID or row xUserId as the CRM unique key. Use xquik-followers.jsonl for queue replay or warehouse loads and xquik-followers.json for app ingestion. Use xquik-followers.csv for CRM import and xquik-followers.xlsx for analyst handoff. The cost is 1 credit per follower extracted or returned. Exports are free after the extraction job exists.

Next steps