---
title: "POST /api/v1/extractions"
method: POST
path: "/api/v1/extractions"
tags: ["Extractions"]
---

# POST /api/v1/extractions

`POST /api/v1/extractions`

## Request

- Base URL: `https://xquik.com`
- URL: `https://xquik.com/api/v1/extractions`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Starts 1 single-target or multi-target extraction. Follow waitUrl, then page statusUrl once it completes.

## Query parameters

- `dry_run` boolean

## Headers

- `Idempotency-Key` string

## Request body

- ExtractionRequest: 1 estimate or extraction. Leave out filters you do not need.
  - `toolType` 'article_extractor' | 'community_extractor' | 'community_moderator_explorer' | 'community_post_extractor' | 'community_search' | 'favoriters' | 'follower_explorer' | 'following_explorer' | 'list_follower_explorer' | 'list_member_extractor' | 'list_post_extractor' | 'mention_extractor' | 'people_search' | 'post_extractor' | 'quote_extractor' | 'reply_extractor' | 'repost_extractor' | 'space_explorer' | 'thread_extractor' | 'tweet_search_extractor' | 'user_likes' | 'user_media' | 'verified_follower_explorer', required: Identifier for the extraction tool used to run a job.
  - `targetTweetId` string
  - `targetUsername` string
  - `targetCommunityId` string: Required for community_post_extractor & community_search.
  - `targetListId` string: Required for list_follower_explorer, list_member_extractor & list_post_extractor.
  - `targetSpaceId` string: Required for space_explorer. X names a Space's hosts & speakers without counts or bio, so Xquik reads each one's profile. Rows carry it, & profile filters such as minFollowers check it.
  - `targetTweetIds` string[]: Tweet IDs processed as 1 collection job.
  - `targetUsernames` string[]: Usernames processed concurrently in 1 job. With tweet_search_extractor, each username collects posts. Post & media jobs skip a protected profile & end with partial_failure.
  - `targetCommunityIds` string[]: Community IDs processed as 1 collection job.
  - `targetListIds` string[]: List IDs processed as 1 collection job.
  - `searchQueries` string[]: Search queries processed as 1 collection job. Each follows the rules of searchQuery, its structured fields & 512-character limit included.
  - `targets` ExtractionMixedTarget[]: Mixed targets auto-routed within 1 job. Use tweet, replies, quotes, thread, or profile_media kinds to collect attached media. The job skips protected profiles & ends with partial_failure.
    - union: 1 auto-routed target in a mixed Tweet collection.
      - string: X URL, numeric Tweet ID, @username, kind:value target, or search.
      - object
        - `kind` 'favoriters' | 'list' | 'profile' | 'profile_likes' | 'profile_media' | 'profile_replies' | 'quotes' | 'replies' | 'retweeters' | 'search' | 'thread' | 'tweet', required
        - `value` string, required
  - `relationTargets` ExtractionRelationTarget[]: Profile relations processed within 1 job. The job skips protected profiles & ends with partial_failure.
    - `relation` 'community_members' | 'followers' | 'following' | 'list_followers' | 'list_members' | 'verified_followers', required
    - `value` string, required
  - `queryType` 'Latest' | 'Top' | 'Both' | 'relevance': Use Top for engagement. The relevance alias maps to Top.
  - `maxItemsPerTarget` integer: Maximum results collected for each target.
  - `maxPagesPerTarget` integer: Reply pages collected for each target.
  - `startCursor` string: Resume 1 reply target from this cursor.
  - `dedupeAcrossTargets` boolean: Merge duplicate results across collection targets.
  - `dedupeMode` 'none' | 'first' | 'merge': Keep target duplicates, first rows, or merged overlap.
  - `overlapMode` boolean: Shortcut for dedupeMode=merge.
  - `includeSearchTerms` boolean: Add matching search terms to collection metadata.
  - `includeTargetMetadata` boolean: Add source target metadata to each result.
  - `enrichProfiles` boolean: Add each user's full profile to follower_explorer, following_explorer, verified_follower_explorer, people_search & repost_extractor rows. Jobs take longer.
  - `collectionStrategy` 'auto' | 'complete' | 'direct' | 'search' | 'thread': Reply collection strategy.
  - `scope` 'all' | 'direct' | 'nested': Reply depth scope.
  - `maxDepth` integer: Maximum nested reply depth.
  - `sort` 'relevance' | 'latest' | 'oldest' | 'likes': Reply result order.
  - `excludeOriginalAuthor` boolean: Exclude replies from the source author.
  - `includeOriginalPost` boolean: Include the source post in reply results.
  - `hasMediaOnly` boolean: Return only replies with media.
  - `sinceTime` union: Reply start time as ISO 8601 or Unix seconds.
    - string, date-time
    - integer: Whole number from 0.
  - `untilTime` union: Reply end time as ISO 8601 or Unix seconds.
    - string, date-time
    - integer: Whole number from 0.
  - `minViews` integer: Tweet or Community search minimum views.
  - `minBookmarks` integer: Minimum Tweet bookmark count.
  - `maxLikes` integer: Maximum Tweet like count.
  - `maxRetweets` integer: Maximum Tweet repost count.
  - `maxReplies` integer: Maximum Tweet reply count.
  - `maxQuotes` integer: Maximum Tweet quote count.
  - `blueVerifiedOnly` boolean: Return only Blue-verified Tweet authors. On a tool that returns users, return only profiles X marks as blue verified.
  - `cardName` string: Require Tweet cards whose name matches this value.
  - `source` string: X search no longer supports source. An extraction with it answers 424 `search_unavailable` & charges nothing.
  - `excludeSource` string: X search ignores excludeSource, so an extraction with it returns unfiltered rows. Its answers carry `Deprecation` & `Sunset` headers. From 2027-01-15 an extraction with it answers 424 `search_unavailable` & charges nothing.
  - `geocode` string: X search no longer supports geocode. An extraction with it answers 424 `search_unavailable` & charges nothing.
  - `sinceId` string: Require Tweet IDs above this ID.
  - `maxId` string: Require Tweet IDs at or below this ID.
  - `near` string: Restrict Tweet search to this place name. A country, such as Brazil, works like placeCountry. A city keeps Tweets about it.
  - `within` string: X search no longer supports within. An extraction with it answers 424 `search_unavailable` & charges nothing. Use near alone.
  - `withinTime` string: Restrict Tweets to this recent time window.
  - `nativeRetweets` boolean: Tweet or Community search native reposts.
  - `safe` boolean: Apply safe-search filtering to Tweet results.
  - `news` boolean: X search no longer supports filter:news. An extraction with news true answers 424 `search_unavailable` & charges nothing.
  - `minFollowers` integer: Minimum follower count for profile results.
  - `maxFollowers` integer: Maximum follower count for profile results.
  - `minFollowing` integer: Minimum following count for profile results.
  - `maxFollowing` integer: Maximum following count for profile results.
  - `minPosts` integer: Minimum post count for profile results.
  - `maxPosts` integer: Maximum post count for profile results.
  - `minAccountAgeDays` integer: Minimum profile age in days.
  - `verifiedType` string: Exact profile verification type.
  - `hasWebsite` boolean: Require a profile website.
  - `hasLocation` boolean: Require a profile location.
  - `hasEmail` boolean: Require an email the profile publishes.
  - `businessEmailOnly` boolean: Require an email the profile publishes outside free webmail, such as Gmail.
  - `emailDomains` string: Require an email at one of these domains. Separate domains with commas. Subdomains match.
  - `bioContains` string: Match any bio term, ignoring case. Separate terms with commas or lines.
  - `locationContains` string: Required profile location text.
  - `usernameContains` string: Required username text.
  - `resultsLimit` integer: Maximum unique results to emit. Xquik bills emitted results, not this upper bound.
  - `searchQuery` string: Required for tweet_search_extractor, people_search & community_search. tweet_search_extractor adds the structured search fields, such as fromUser & minFaves, to this query. X searches up to 512 characters. A longer tweet or people search answers 400, counted with the added fields.
  - `fromUser` string: Filter by author username (tweet_search_extractor)
  - `toUser` string: Replies to this username (tweet_search_extractor).
  - `mentioning` string: Mentions this username (tweet_search_extractor).
  - `language` string: Tweet or Community search language.
  - `sinceDate` string, date: Tweet or Community search start date.
  - `untilDate` string, date: Tweet or Community search end date.
  - `mediaType` 'images' | 'videos' | 'gifs' | 'media' | 'links' | 'none': Tweet or Community search media.
  - `minFaves` integer: Tweet or Community search minimum likes.
  - `minRetweets` integer: Tweet or Community search minimum reposts.
  - `minReplies` integer: Tweet or Community search minimum replies.
  - `minQuotes` integer: Minimum quote count threshold (tweet_search_extractor)
  - `verifiedOnly` boolean: Tweet or Community search verified authors.
  - `replies` 'include' | 'exclude' | 'only': Choose whether tweet search includes, excludes, or isolates replies.
  - `retweets` 'include' | 'exclude' | 'only': Choose whether tweet search includes, excludes, or isolates reposts.
  - `quotes` 'include' | 'exclude' | 'only': Choose whether tweet search includes, excludes, or isolates quotes.
  - `exactPhrase` string: Exact phrase to match (tweet_search_extractor)
  - `excludeWords` string: Excluded terms or phrases (tweet_search_extractor).
  - `anyWords` string: Any matching term or phrase (tweet_search_extractor).
  - `hashtags` string: Matching hashtags (tweet_search_extractor).
  - `cashtags` string: Matching cashtags (tweet_search_extractor).
  - `url` string: URL substring or domain filter (tweet_search_extractor)
  - `conversationId` string: Conversation ID filter (tweet_search_extractor)
  - `inReplyToTweetId` string: Only replies to this tweet ID (tweet_search_extractor)
  - `quotesOfTweetId` string: Only quotes of this tweet ID (tweet_search_extractor)
  - `retweetsOfTweetId` string: Only retweets of this tweet ID (tweet_search_extractor)
  - `listId` string: Search within a list ID (tweet_search_extractor)
  - `place` string: Search within a place ID (tweet_search_extractor)
  - `placeCountry` string: Search within a country code (tweet_search_extractor)
  - `pointRadius` string: Geo point radius, such as -73.99 40.73 25mi (tweet_search_extractor)
  - `boundingBox` string: Geo bounding box, such as -74.1 40.6 -73.9 40.8 (tweet_search_extractor)
  - `advancedQuery` string: Raw advanced search query appended as-is (tweet_search_extractor)

## Response `200`

Dry-run estimate

- ExtractionEstimate: Free conservative cost estimate. Post estimates use the supported cap & refuse a protected profile. It never creates a job or charges.
  - `allowed` boolean, required: Whether the balance covers the full estimate.
  - `creditsAvailable` string, required
  - `creditsRequired` string, required
  - `estimatedResults` integer, required: The row count the credit estimate uses. It does not say how many rows exist.
  - `resolvedXUserId` string: Resolved X user ID from count-based profile estimates.
  - `source` 'followers' | 'following' | 'collection' | 'likeCount' | 'paginationCap' | 'quoteCount' | 'replyCount' | 'resultsLimit' | 'retweetCount' | 'unknown', required

## Other responses

- `202`: Extraction started. The Location header holds its result URL.
- `400`: Invalid input. A value past its maxLength gets this answer, & the message names the field & its limit.
- `401`: Unauthenticated
- `402`: Payment required. MPP reads include `WWW-Authenticate`. Authenticated reads include balances, plus checkout when the key can open it. A key that reads only gets the account page instead. A failed request never creates checkout. A caller on a plan gets top-up only, plus `credits_renew_at` when the plan renews. Guest keys offer top-up.
- `403`: The target account is protected. Choose a public one. Xquik creates no job & charges nothing. Follower tools name the private list.
- `404`: Not found
- `409`: Idempotency-Key was reused with another request.
- `424`: Dependency unavailable, unauthorized, or limited. Default v1 uses 502. Best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself, or when its filters matched none of the last 3,000 posts read. The message says how far back the search read.
- `429`: Too many requests right now. Each user gets 500 reads a second. Each minute allows 120 writes & 60 deletes. `x_api_rate_limited` means X limits this read for now. Neither answer costs anything. Wait for the seconds in `Retry-After`, then retry.
- `500`: Unexpected error.
- `502`: Dependency unavailable, unauthorized, or limited. Default v1 uses 502. Best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself, or when its filters matched none of the last 3,000 posts read. The message says how far back the search read.
- `default`: Unexpected error.

## Changes

- **2026-10-20** `45942c75fdc2`: 22 warning
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `topup_in_progress` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …18 more

[Operation history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/api/v1/extractions/post.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xquik-dev/apis/xquik-api/revisions/45942c75fdc2?raw)
