Skip to main content
POST
/
extractions
Create extraction
curl --request POST \
  --url https://api.example.com/extractions \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "toolType": "<string>",
  "targetTweetId": "<string>",
  "targetUsername": "<string>",
  "targetCommunityId": "<string>",
  "searchQuery": "<string>",
  "targetListId": "<string>",
  "targetSpaceId": "<string>",
  "resultsLimit": 123,
  "fromUser": "<string>",
  "toUser": "<string>",
  "mentioning": "<string>",
  "language": "<string>",
  "sinceDate": "<string>",
  "untilDate": "<string>",
  "mediaType": "<string>",
  "minFaves": 123,
  "minRetweets": 123,
  "minReplies": 123,
  "verifiedOnly": true,
  "replies": "<string>",
  "retweets": "<string>",
  "exactPhrase": "<string>",
  "excludeWords": "<string>",
  "advancedQuery": "<string>"
}
'
1 credit per result extracted · All plans from $0.00012/credit
curl -X POST https://xquik.com/api/v1/extractions \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "toolType": "reply_extractor",
    "targetTweetId": "1893704267862470862"
  }' | jq

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported.
Content-Type
string
required
Must be application/json.

Body

toolType
string
required
Extraction tool to run. See tool types below.
targetTweetId
string
Tweet ID to extract from. Required for reply_extractor, repost_extractor, quote_extractor, thread_extractor, article_extractor.
targetUsername
string
X username to extract from. The @ prefix is automatically stripped if included. Required for follower_explorer, following_explorer, verified_follower_explorer, mention_extractor, post_extractor.
targetCommunityId
string
Community ID to extract from. Required for community_extractor, community_moderator_explorer, community_post_extractor.
searchQuery
string
Search query string. Required for people_search, community_search, tweet_search_extractor.
targetListId
string
X List ID to extract from. Required for list_member_extractor, list_post_extractor, list_follower_explorer.
targetSpaceId
string
X Space ID to extract from. Required for space_explorer.
resultsLimit
integer
Maximum number of results to extract. When set, extraction stops after reaching this limit instead of fetching all available data. Useful for controlling costs and extracting a specific sample size. Omit to extract all available results.

Tweet search filters

The following parameters apply only to tweet_search_extractor. They are converted to X search operators internally and combined with searchQuery.
fromUser
string
Filter tweets by author username. Do not include the @ prefix.
toUser
string
Filter tweets directed to a specific user.
mentioning
string
Filter tweets mentioning a specific user.
language
string
Language code filter (e.g. en, tr, es, ja).
sinceDate
string
Start date in YYYY-MM-DD format. Only tweets on or after this date are returned.
untilDate
string
End date in YYYY-MM-DD format. Only tweets before this date are returned.
mediaType
string
Filter by attached media type. Values: images, videos, gifs, media (any media).
minFaves
integer
Minimum number of likes a tweet must have.
minRetweets
integer
Minimum number of retweets a tweet must have.
minReplies
integer
Minimum number of replies a tweet must have.
verifiedOnly
boolean
When true, only return tweets from verified accounts.
replies
string
Control reply inclusion. Values: include (default), exclude, only.
retweets
string
Control retweet inclusion. Values: include (default), exclude, only.
exactPhrase
string
Exact phrase match. The value is wrapped in quotes and added to the search query (e.g. "breaking news").
excludeWords
string
Comma-separated words to exclude from results. Each word is prefixed with - in the search query.
advancedQuery
string
Raw X search operator syntax appended to the query. Use this for operators not covered by the other filter fields (e.g. filter:links, url:example.com).
These filters are ignored for all other tool types. They are converted to X search operators and combined with searchQuery before execution.

Tool types

Each tool type requires a specific target field.
Tool TypeRequired FieldDescription
article_extractortargetTweetIdExtract article content from a tweet
community_extractortargetCommunityIdExtract members of a community
community_moderator_explorertargetCommunityIdExtract moderators of a community
community_post_extractortargetCommunityIdExtract posts from a community
community_searchsearchQuerySearch posts within a community
favoriterstargetTweetIdExtract users who liked a tweet
follower_explorertargetUsernameExtract followers of an account
following_explorertargetUsernameExtract accounts followed by a user
list_follower_explorertargetListIdExtract followers of a list
list_member_extractortargetListIdExtract members of a list
list_post_extractortargetListIdExtract posts from a list
mention_extractortargetUsernameExtract tweets mentioning an account
people_searchsearchQuerySearch for users by keyword
post_extractortargetUsernameExtract posts from an account
quote_extractortargetTweetIdExtract users who quote-tweeted a tweet
reply_extractortargetTweetIdExtract users who replied to a tweet
repost_extractortargetTweetIdExtract users who retweeted a tweet
space_explorertargetSpaceIdExtract participants of a Space
thread_extractortargetTweetIdExtract all tweets in a thread
tweet_search_extractorsearchQuerySearch and extract tweets by keyword or hashtag
user_likestargetUsernameExtract tweets liked by a user
user_mediatargetUsernameExtract media posts from a user
verified_follower_explorertargetUsernameExtract verified followers of an account

Response

id
string
Unique extraction job ID (UUID).
toolType
string
Tool type used for this extraction.
status
string
Job status. running when first created.
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "toolType": "reply_extractor",
  "status": "running"
}
Extraction runs asynchronously. Poll Get Extraction until status is completed or failed.
Next steps: Get Extraction to retrieve results with pagination, Export Extraction to download as CSV/XLSX/Markdown, or Estimate Extraction to check costs before running.