Skip to main content
GET
/
extractions
/
{id}
Get extraction
curl --request GET \
  --url https://xquik.com/api/v1/extractions/{id} \
  --header 'x-api-key: <api-key>'

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.

Free - does not consume credits
curl -X GET "https://xquik.com/api/v1/extractions/a1b2c3d4-e5f6-7890-abcd-ef1234567890?limit=100" \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.

Path parameters

id
string
required
Extraction job ID returned from Create Extraction or List Extractions.

Query parameters

limit
number
Number of results to return per page. Default: 100. Maximum: 1000.
after
string
Result ID cursor for pagination. Use the nextCursor value from the previous response to fetch the next page.

Response

job
object
Extraction job metadata.
results
object[]
Array of extracted user/tweet records for the current page.
Only id and xUserId are guaranteed on every result. All other fields are omitted entirely when unavailable (never set to null). Always check for the presence of a field before accessing it.
Enrichment data is returned directly in the API response via the enrichmentData field and is also available through Export Extraction in CSV, XLSX, or Markdown format with flattened columns.
hasMore
boolean
Whether more results exist beyond this page.
nextCursor
string
Cursor to pass as the after parameter for the next page. Only present when hasMore is true.
{
  "job": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "toolType": "reply_extractor",
    "status": "completed",
    "totalResults": 150,
    "targetTweetId": "1893704267862470862",
    "createdAt": "2026-02-24T10:00:00.000Z",
    "completedAt": "2026-02-24T10:00:12.000Z"
  },
  "results": [
    {
      "id": "b2c3d4e5-f6a1-7890-abcd-ef2345678901",
      "xUserId": "44196397",
      "xUsername": "elonmusk",
      "xDisplayName": "Elon Musk",
      "xFollowersCount": 210500000,
      "xVerified": true,
      "xProfileImageUrl": "https://pbs.twimg.com/profile_images/el0n.jpg",
      "tweetId": "1893710452812718080",
      "tweetText": "This is a great thread, thanks for sharing.",
      "tweetCreatedAt": "2026-02-24T10:05:00.000Z",
      "createdAt": "2026-02-24T10:00:05.000Z"
    },
    {
      "id": "c3d4e5f6-a1b2-7890-abcd-ef3456789012",
      "xUserId": "1849726401547751424",
      "xUsername": "xquik_",
      "xDisplayName": "Xquik",
      "xFollowersCount": 2400,
      "xVerified": false,
      "xProfileImageUrl": "https://pbs.twimg.com/profile_images/xquik.jpg",
      "tweetId": "1893712000288563200",
      "tweetText": "Agreed, very useful tool.",
      "tweetCreatedAt": "2026-02-24T10:08:30.000Z",
      "createdAt": "2026-02-24T10:00:06.000Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "c3d4e5f6-a1b2-7890-abcd-ef3456789012"
}

Paginating results

Results are ordered by ID ascending. To iterate through all results for a large extraction:
  1. Make the initial request without the after parameter.
  2. Check hasMore in the response. If true, use nextCursor as the after value in the next request.
  3. Repeat until hasMore is false.
import { appendFile } from "node:fs/promises";

const extractionId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
let cursor = undefined;
let pageIndex = 0;

do {
  const params = new URLSearchParams({ limit: "1000" });
  if (cursor) params.set("after", cursor);
  const pageCursor = cursor ?? null;

  const response = await fetch(
    `https://xquik.com/api/v1/extractions/${extractionId}?${params}`,
    { headers: { "x-api-key": "xq_YOUR_KEY_HERE" } },
  );
  const data = await response.json();

  const rows = data.results.map((result) => ({
    extraction_id: extractionId,
    row_id: result.id,
    x_user_id: result.xUserId,
    x_username: result.xUsername,
    tweet_id: result.tweetId,
    tweet_text: result.tweetText,
    page_index: pageIndex,
    page_cursor: pageCursor,
    next_cursor: data.nextCursor ?? null,
    has_more: data.hasMore,
    handoff_format: "jsonl",
  }));

  if (rows.length > 0) {
    await appendFile(
      "xquik-extraction-results.jsonl",
      `${rows.map((row) => JSON.stringify(row)).join("\n")}\n`,
    );
  }

  cursor = data.hasMore ? data.nextCursor : undefined;
  pageIndex += 1;
} while (cursor);

Cursor handoff

Use GET /extractions/{id} when an integration needs structured JSON rows, incremental checkpoints, or more rows than a file export can return. Treat nextCursor as an opaque checkpoint and pass it back as after.

Page checkpoint

Store extraction_id, page_index, page_cursor, next_cursor, has_more, and result_count after each successful page.

Row shape

Persist selected fields such as row_id, x_user_id, x_username, tweet_id, and tweet_text. Do not dump raw result arrays into shared logs.

Large jobs

Stream pages to xquik-extraction-results.jsonl when you need replayable rows or results beyond the export row cap.

File handoff

Use Export Extraction when CSV, JSON, XLSX, Markdown, PDF, or TXT files are enough.
Store page checkpoints separately from row data:
{
  "extraction_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "page_index": 3,
  "page_cursor": "990100",
  "next_cursor": "990200",
  "has_more": true,
  "result_count": 1000,
  "handoff_format": "jsonl"
}
Next steps: Export Extraction to download all results as CSV, XLSX, or Markdown, or List Extractions to browse your job history.
Last modified on May 20, 2026