Twitter to Discord

Twitter to Discord: Send Tweets to a Channel with Your Own Bot

Prices checked:

Quick Answer

If you only want a few X (Twitter) accounts mirrored into a Discord channel, a hosted bot is the least work: TweetShift listed its Premium plan at $2.99 a month for up to 100 feeds on December 1, 2026, with X feeds on its paid plans only. Build your own when you want something a feed bot is not built for: every post that matches a keyword, hashtag or cashtag search, your own filters and message format, or no third-party bot in your server. That takes a Discord webhook and a 50-line script that checks TwexAPI for new posts. Checking 20 accounts every minute costs under $2.50 a month, and every 5 minutes under $0.75.

Ways to get tweets into Discord

OptionCostWhat you getWhat you manage
TweetShift Premium (hosted bot)$2.99 a month, or $25 a yearUp to 100 feeds from X, Bluesky or RSS, posted in about 1 minute, with 20 keyword filtersNothing to run: invite the bot and add feeds
TweetShift Pro (hosted bot)$9.99 a monthUp to 400 feeds, posted in 5 to 10 secondsNothing to run
Your own script with TwexAPIUnder $2.50 a month per 20 accounts checked every minute; under $0.75 at every 5 minutesAny X search as a feed: accounts, keywords, hashtags or cashtags, with your own filters and formatA webhook URL and a script that keeps running
Your own script with the official X API$5.00 per 1,000 posts read: $30 a month for 200 posts a dayThe same feeds, on X’s own APIAn X developer account, prepaid credits and the script

TweetShift’s figures are from its Service Plans page as read on December 1, 2026. That page calls the posting speeds best-effort estimates, and it listed X feeds as available on the paid plans only, with a free plan marked for Q2 2027. X’s price is from its pricing page, read the same day.

Source: TweetShift service plans

When your own bot is worth it

For plain account feeds, use a hosted bot: it costs less and there is nothing to keep running. Your own bot is worth it when at least one of these is true:

  • You want a feed from a search, not only from chosen accounts: every post that mentions your project, a hashtag or a $ticker.
  • You want your own rules, such as no replies, no reposts or at least 50 likes.
  • You want the same posts somewhere else as well: Telegram, Slack, a database or a spreadsheet.
  • You do not want to add a third-party bot to your server. A webhook can only post to the one channel it belongs to.

Step 1: create a Discord webhook

  • Open Server Settings and go to the Integrations tab.
  • Select Create Webhook, then give it a name and choose the channel it should post to.
  • Select Copy Webhook URL. Treat the URL like a password: anyone who has it can post to that channel.

Source: Discord support: Intro to Webhooks

Step 2: run the script

Set TWEXAPI_KEY and DISCORD_WEBHOOK_URL, put your accounts in ACCOUNTS and start the script with python twitter_to_discord.py. The first run starts from the newest post and sends nothing old. After that it sends each new post once, and it remembers where it was in since_id.txt, so a restart does not repeat posts.

We ran it against the live API on December 1, 2026 with a local stand-in for the Discord webhook, not a real server: following a busy keyword, it delivered 17 new posts in 95 seconds, picked up after a restart without repeating any, and waited out a 429. The request it sends follows Discord’s webhook documentation.

twitter_to_discord.py
import os
import time

import requests

API_URL = "https://api.twexapi.io/twitter/advanced_search/page"
HEADERS = {"Authorization": f"Bearer {os.environ['TWEXAPI_KEY']}"}
WEBHOOK_URL = os.environ["DISCORD_WEBHOOK_URL"]
POLL_SECONDS = 60
STATE_FILE = "since_id.txt"

ACCOUNTS = ["nasa", "SpaceX", "esa"]  # up to 20 per query
QUERY = "(" + " OR ".join(f"from:{name}" for name in ACCOUNTS) + ") -filter:replies"
# To follow a search instead of accounts, set the query yourself, for example:
# QUERY = '("artemis" OR #artemis) -filter:retweets -filter:replies'


def new_posts(since_id):
    query = f"{QUERY} since_id:{since_id}" if since_id else QUERY
    res = requests.post(API_URL, headers=HEADERS, json={"searchTerms": [query], "sortBy": "Latest"}, timeout=30)
    res.raise_for_status()
    return [post for post in res.json().get("data") or [] if post]


def send_to_discord(post):
    name = (post.get("user") or {}).get("screen_name")
    body = (post.get("text") or "")[:1800]  # Discord allows 2,000 characters; keep room for the link
    text = f"**@{name}**\n{body}\nhttps://x.com/{name}/status/{post['tweet_id']}"
    payload = {"content": text, "allowed_mentions": {"parse": []}}  # never ping @everyone
    while True:
        res = requests.post(WEBHOOK_URL, json=payload, timeout=10)
        if res.status_code != 429:
            res.raise_for_status()
            return
        time.sleep(float(res.json().get("retry_after", 1)))  # Discord asked us to slow down


since_id = open(STATE_FILE).read().strip() if os.path.exists(STATE_FILE) else None
if not since_id:  # first run: start from the newest post and send nothing old
    since_id = max((int(p["tweet_id"]) for p in new_posts(None)), default=None)

while True:
    posts = new_posts(since_id)
    for post in sorted(posts, key=lambda p: int(p["tweet_id"])):  # oldest first
        send_to_discord(post)
    if posts:
        since_id = max(int(p["tweet_id"]) for p in posts)
        with open(STATE_FILE, "w") as f:
            f.write(str(since_id))
    time.sleep(POLL_SECONDS)

How the script works

  • One search query covers up to 20 accounts: (from:a OR from:b) -filter:replies. Keep the parentheses, or the filter applies only to the last account.
  • since_id: asks only for posts newer than the last one sent, so you pay for new posts and not for the same page again.
  • allowed_mentions with an empty parse list stops a post that contains @everyone from pinging your server.
  • Discord allows 2,000 characters in a message, so the script trims long posts and keeps the link.
  • When Discord answers 429, the script waits and sends the same message again.
  • A page holds 20 posts. If more than 20 can arrive between checks, check more often or split the query.
  • To follow a search instead of accounts, replace QUERY. In our test ("artemis" OR #artemis) -filter:retweets -filter:replies returned no reposts and no replies, and $BTC min_faves:50 -filter:replies returned only posts with more than 50 likes.

Source: Discord developer docs: webhook resource

What a Twitter to Discord feed costs

FeedCredits a monthCost a month
20 accounts, one query checked every minute, about 200 posts a dayUp to 246,000Under $2.50
20 accounts, checked every 5 minutes, about 200 posts a dayUp to 73,200Under $0.75
100 accounts, five queries checked every minute, about 1,000 posts a dayUp to 1,230,000Under $12.50
One keyword or hashtag checked every minute, about 2,000 posts a dayUp to 516,000Under $5.20

TwexAPI bills 5 Credits per post returned, at 100,000 Credits per $1. A check that finds nothing new costs 5 Credits, and requests that fail with an error are free. The 20,000 free Credits on signup run the first row for about two days and the second for about eight.

At 100 accounts a hosted bot costs less: TweetShift Premium covers up to 100 feeds for $2.99 a month.

Limits to know

  • It checks on a schedule. TwexAPI does not push posts to a webhook, so a post arrives within your checking interval, not instantly.
  • In our test a new post for a busy keyword appeared in search 6 to 12 seconds after it was published.
  • Public accounts only. Posts from protected accounts are not available.
  • The script has to keep running, on a small server, a home machine or a scheduler.
  • Free Credits allow one request every 5 seconds, which is enough for one query a minute.
Start with 20,000 free CreditsBuild the search query

FAQ

Is there a free Twitter to Discord bot?

On December 1, 2026 TweetShift listed X feeds on its paid plans only, from $2.99 a month, with a free plan marked for Q2 2027. A script of your own is not free either: TwexAPI gives 20,000 free Credits, about eight days of 5-minute checks for 20 accounts, and the same feed costs under $0.75 a month after that.

How do I send tweets to a Discord webhook?

Create a webhook under Server Settings, Integrations, then send a POST request with a JSON content field to its URL. The script on this page does that for every new post it finds.

What is a TweetShift alternative?

It depends on what you need. For account feeds posted for you, another hosted Discord bot is the closest match. For feeds built from a search, or with your own filters and message format, run your own script with a Discord webhook, as shown on this page.

How fast do tweets reach Discord?

As fast as you check. In our test a new post for a busy keyword appeared in search 6 to 12 seconds after it was published, so with 1-minute checks a post arrives within about a minute.

Can I leave out replies and reposts, or only send popular posts?

Yes. Add search operators to the query: -filter:replies, -filter:retweets and min_faves:50 all worked in our test. Put accounts or keywords joined by OR inside parentheses first.

Can the same script post to Telegram or Slack?

Yes. Replace the send_to_discord function with a call to the other service. The part that finds new posts stays the same.

Do I need an X developer account?

No. The script uses a TwexAPI key, which you get by signing up with an email or Google account.

Is TwexAPI affiliated with X, Discord or TweetShift?

No. TwexAPI is an independent third-party provider of public social data and is not affiliated with or endorsed by X Corp., Discord or TweetShift.

Related Guides

Sources

Prices change. Confirm current rates on each provider’s pricing page before you buy. TwexAPI is an independent provider and is not affiliated with or endorsed by X Corp.