Skip to main content

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.

Use Xquik in n8n when a workflow needs X (Twitter) search, account lookups, trends, publishing, extraction jobs, monitors, webhooks, or MCP tools without an X Developer app. Xquik uses one API key and the REST base URL https://xquik.com/api/v1.

Prerequisites

  • Xquik API key
  • n8n Cloud or self-hosted n8n
  • An HTTPS n8n webhook URL for monitor recipes
  • Optional Slack and Google Sheets credentials for the recipes below

API Key Credential

Create a reusable n8n credential for Xquik:

Authentication

Select Header Auth for the HTTP Request credential.

Header name

Set the header name to x-api-key.

Header value

Paste your Xquik API key as the credential value.
Use that credential in every HTTP Request node that calls https://xquik.com/api/v1.

Community Node Blueprint

If you package Xquik as a community node, keep the first release narrow and reliable.

Credential

Create an Xquik API Key credential and inject it as x-api-key.

Base URL

Point every REST action at https://xquik.com/api/v1.

Request helper

Support GET, POST, PATCH, DELETE, JSON bodies, structured errors, and Retry-After backoff.

Resources

Start with Tweet, User, Trends, Extraction, Monitor, and Webhook resources.

Actions

Ship Get Tweet, Search Tweets, Get User, Get Trends, Create Tweet, Create Extraction, Create Monitor, and Create Webhook first.

Sources

Add Monitor Event Webhook and Extraction Completed Polling sources.
Handle these response classes explicitly:

400 invalid input

Surface the Xquik error and message fields in the failed item.

401 authentication

Ask the user to check the Header Auth credential and x-api-key value.

402 billing state

Route to subscription or credit setup before retrying the node.

429 rate limit

Read Retry-After from response headers and wait before retrying.

5xx transient

Enable n8n Retry on Fail with exponential backoff, then fail the item.

Result Handoff

Use an Edit Fields node after each HTTP Request node when the next node only needs stable handoff fields. Keep raw responses out of Slack messages, Sheets rows, and retry queues.

Tweet search page

Store request q, each tweet id, text, author.username, createdAt, plus has_next_page and next_cursor for page loops.

User profile rows

Store source id as user_id, plus username, name, followers, verified, profilePicture, has_next_page, next_cursor, and the lookup or search input.

Trend rows

Store each trend name, rank, query, and description. Keep response count, woeid, and the requested region with the workflow run.

Tweet or reply write

Store tweetId, charged, and chargedCredits on 200 Success. For 202 x_write_unconfirmed, store writeActionId, status, charged, and chargedCredits, then poll GET /x/write-actions/{id} before retrying.

Public media upload

Store mediaId, mediaUrl, and success. Pass mediaUrl to POST /x/tweets in media; reserve uploaded media IDs for one-item DMs.

Monitor and webhook setup

Store monitor id, username, xUserId, eventTypes, isActive, and nextBillingAt; store webhook id, url, eventTypes, and one-time secret. For storage rows, map production deliveryId to delivery_id for receiver retry de-dupe and streamEventId to stream_event_id when one monitor event should process once across endpoint changes.

Webhook event de-dupe

Store deliveryId for receiver retry de-dupe and streamEventId when one monitor event should process once across endpoint changes.

Extraction job

Store id, toolType, and status; poll GET /extractions/{id} and carry hasMore plus nextCursor into batch loops.

Recipe 1: AI Agent X Research With MCP

Use this when an n8n AI Agent needs to research live X data, summarize trends, or compare account activity.
1

Add an AI Agent node

Create an AI Agent workflow with your preferred chat model.
2

Add an MCP Client Tool

Configure the MCP tool with URL https://xquik.com/mcp and header x-api-key: <your key>.
3

Prompt the agent

Tell the agent to use Xquik for X search, trends, account lookups, and extraction planning.
Suggested agent system prompt:
Use Xquik for every X research request. Search tweets, inspect accounts, fetch trends, and cite the returned post URLs. Prefer small, targeted searches before broad extraction jobs.
Example user prompt:
Find recent posts about AI agents in fintech, group them by theme, and list 5 accounts worth monitoring.
The MCP server exposes explore for endpoint discovery and xquik for authenticated calls, so the workflow can move from endpoint selection to live data in one agent loop.

Recipe 2: Monitor To Slack

Use this when a Slack channel should receive new tweets, replies, quotes, or retweets from monitored accounts.

Workflow Shape

Webhook Trigger

Receive Xquik monitor events on the production Webhook URL.

Create webhook

Use HTTP Request to call POST /webhooks with the Webhook Trigger URL.

Create monitor

Use HTTP Request to call POST /monitors for the username and event types.

Format alert

Use Set to build Slack text from data, with username as fallback.

Post alert

Send the formatted message to Slack after the webhook and monitor exist.

Create Webhook

Call this once during setup, using the production URL from your n8n Webhook Trigger.
{
  "method": "POST",
  "url": "https://xquik.com/api/v1/webhooks",
  "headers": {
    "x-api-key": "={{$credentials.xquikApi.apiKey}}"
  },
  "body": {
    "url": "={{$node['Webhook Trigger'].webhookUrl}}",
    "eventTypes": ["tweet.new", "tweet.reply", "tweet.quote", "tweet.retweet"]
  }
}

Create Monitor

{
  "method": "POST",
  "url": "https://xquik.com/api/v1/monitors",
  "headers": {
    "x-api-key": "={{$credentials.xquikApi.apiKey}}"
  },
  "body": {
    "username": "xquikcom",
    "eventTypes": ["tweet.new", "tweet.reply", "tweet.quote", "tweet.retweet"]
  }
}

Slack Message

Use a Set node before Slack:
{{$json.eventType}} from @{{$json.data.author?.userName || $json.username}}
{{$json.data.text}}
https://x.com/{{$json.data.author?.userName || $json.username}}/status/{{$json.data.id}}
Webhook tweet fields live under data. Use data.author.userName when present; username is the monitored-account fallback. Keep the webhook secret returned by Xquik. If your n8n plan supports custom verification code before routing, verify the x-xquik-signature header with that secret before sending Slack messages.

Recipe 3: Extraction To Google Sheets

Use this when a team needs bulk follower, reply, quote, media, list, community, or search results in a spreadsheet.

Workflow Shape

Schedule Trigger

Run daily or hourly exports; execute manually while testing.

Create extraction

Use HTTP Request to call POST /extractions and store the returned id.

Wait before polling

Pause before the first status check so the extraction can start.

Fetch results

Use HTTP Request to call GET /extractions/{id} and read job.status.

Gate completed jobs

Use IF to continue only when job.status is completed.

Append rows

Use Google Sheets Append Row with the mapped result fields below.

Create Extraction

{
  "method": "POST",
  "url": "https://xquik.com/api/v1/extractions",
  "headers": {
    "x-api-key": "={{$credentials.xquikApi.apiKey}}"
  },
  "body": {
    "toolType": "tweet_search_extractor",
    "searchQuery": "AI agents lang:en",
    "resultsLimit": 500
  }
}
Store the returned id for the polling step.

Poll Results

{
  "method": "GET",
  "url": "https://xquik.com/api/v1/extractions/{{$json.id}}",
  "headers": {
    "x-api-key": "={{$credentials.xquikApi.apiKey}}"
  },
  "query": {
    "limit": "1000"
  }
}
Map these fields into Google Sheets:

Tweet ID

Map to id.

Author

Map to author.username.

Text

Map to text.

Created At

Map to createdAt.

Likes

Map to likeCount.

Reposts

Map to retweetCount.

URL

Build from https://x.com/{author.username}/status/{id}.
For jobs larger than 1,000 rows, loop while hasMore is true and pass after with the nextCursor value.

Useful REST Actions

Get tweet

Read one or more posts with GET /x/tweets?ids=<id>.

Search tweets

Run X query searches with GET /x/tweets/search?q=<query>.

Get user

Fetch an X profile with GET /x/users/{id}.

Get trends

Read regional X trends with GET /x/trends.

Create tweet

Publish text or media posts with POST /x/tweets.

Create extraction

Start bulk export jobs with POST /extractions.

Create monitor

Watch accounts or keywords with POST /monitors.

Create webhook

Register signed delivery URLs with POST /webhooks.

Testing Checklist

  • Use the n8n Test Step action on each HTTP Request node.
  • Confirm every request includes x-api-key.
  • Confirm monitor webhooks use the production webhook URL, not the test URL.
  • Send a test event from Test Webhook.
  • For extraction jobs, poll until completed before writing to Sheets.
  • On 429, wait for the Retry-After header before retrying.

Next Steps

Last modified on May 18, 2026