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

Follower export workflow to CSV, JSON, or XLSX

Use this workflow when PHP code needs an owned follower list. That code can be a worker, Laravel command, Symfony console command, or cron job. The list can feed CRM import, warehouse loading, or account scoring. It can also feed an analyst CSV, XLSX delivery, or a resumable JSON handoff. $client->extractions->estimateCost() maps to POST /extractions/estimate. $client->extractions->run() maps to POST /extractions. $client->extractions->retrieve() maps to GET /extractions/{id}. $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. PHP 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 may have changed since estimateCost. If so, the run can fetch only the affordable count before export. Or it can mark the job failed with insufficient_credits.
Store $job->id, $targetUsername, $estimate->estimatedResults, and $estimate->source before polling. With them, another queue worker can resume without rerunning the extraction. $client->extractions->retrieve() returns $page->results, $page->hasMore, and $page->nextCursor. Pass $page->nextCursor back as cursor to page through 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 cost no credits after the extraction job exists.

Next steps