Build an affiliate deals bot for X
price drops, coupons, restocks, with your link
A deals account is a price watcher, an affiliate tag, and a posting key. Your script finds the deal, and one POST to OpenTweet tweets it with your link and the product photo. Link posts are included in the plan instead of costing $0.20 each on the X API.
7-day trial. Card required, cancel any time.
The short answer
To auto-post affiliate deals to X: poll your deal source on a schedule, remember the last price you posted for each product, and when a price drops past your threshold, send the product, price, disclosure (#ad) and affiliate link to POST https://opentweet.io/api/v1/posts with the product photo in media_urls. Advanced includes 10 link posts a day and Agency 20, so you do not pay X's $0.20 per link post.
Six post types deal accounts run on
Speed wins on price drops and lightning deals. Scheduled roundups bring back followers who only check once a day.
Price drops
Event-drivenA product falls below a threshold or hits its lowest price in 30 or 90 days. The core format of every deal account.
Lightning deals
Event-drivenTime-boxed offers that expire in hours. Post them the moment you see them, with the end time in the text.
Coupon codes
Event-drivenCode, discount, expiry, link. Short and easy to scan, and followers save them.
Restocks
Event-drivenSold-out items coming back, often the most shared posts in collectibles and gaming. See the alert bot guide for the watcher.
Daily top 5
ScheduledA thread of the five best deals of the day, one product per tweet with its photo. Good for followers who check once a day.
Event roundups
ScheduledPrime Day, Black Friday, Singles Day, back to school. Pre-schedule the roundup posts and fill in links when the deals go live.
Tweet a deal the moment the price drops
Posting is one call. Finding the deal, and deciding what is worth posting, lives in your script.
The curl call
The photo goes in media_urls. OpenTweet downloads it and attaches it, so the deal shows a product image even though the link card is the retailer's.
# A price just dropped. Tweet the deal. (example payload)
curl -X POST https://opentweet.io/api/v1/posts \
-H "Authorization: Bearer ot_your_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Price drop: Sony WH-1000XM5 now $279 (was $399, -30%)\nLowest price in 90 days.\nhttps://example-shop.com/deal?tag=yourtag-20\n#ad",
"media_urls": ["https://your-cdn.example.com/products/wh1000xm5.jpg"],
"publish_now": true
}'A price-drop bot in Python
Replace fetch_products() with your feed. The seen file stores the last price tweeted per product, so a deal only posts again when the price drops further. Run it every 10 to 30 minutes with cron.
import json, pathlib, requests
KEY = "ot_your_key"
SEEN = pathlib.Path("seen.json") # product id -> last price we tweeted
seen = json.loads(SEEN.read_text()) if SEEN.exists() else {}
for p in fetch_products(): # your affiliate feed, retailer API or tracker
last = seen.get(p["id"])
if p["price"] > p["list_price"] * 0.8: # only 20%+ off
continue
if last is not None and p["price"] >= last: # already tweeted this price
continue
pct = round(100 - p["price"] / p["list_price"] * 100)
text = (f"{p['title']} is ${p['price']:.2f} (-{pct}%)\n"
f"{p['affiliate_url']}\n#ad")
r = requests.post(
"https://opentweet.io/api/v1/posts",
headers={"Authorization": f"Bearer {KEY}"},
json={"text": text, "media_urls": [p["image_url"]], "publish_now": True},
)
if r.ok:
seen[p["id"]] = p["price"]
SEEN.write_text(json.dumps(seen))Deal in the post, link in the first reply
Some deal accounts keep the main post clean and put the link right under it. Send it as a two-tweet thread. It still counts as one link post.
{
"text": "LEGO Technic Ferrari down to $319 (-20%). Lowest price this year.",
"is_thread": true,
"thread_tweets": [
"Deal link (I earn a commission): https://example-shop.com/deal?tag=yourtag-20"
],
"media_urls": ["https://your-cdn.example.com/products/lego-ferrari.jpg"],
"publish_now": true
}Spread deals across the day and across accounts
Send up to 50 scheduled posts per request. Add x_account_id to route each deal to the right niche or country account.
{
"posts": [
{ "text": "Morning deal: ... https://example-shop.com/a?tag=yourtag-20 #ad", "scheduled_date": "2026-10-22T13:00:00Z", "x_account_id": "acct_tech" },
{ "text": "Bon plan : ... https://example-shop.fr/b?tag=tontag-21 #pub", "scheduled_date": "2026-10-22T07:00:00Z", "x_account_id": "acct_fr" },
{ "text": "Restock: ... https://example-shop.com/c?tag=yourtag-20 #ad", "scheduled_date": "2026-10-22T17:30:00Z", "x_account_id": "acct_toys" }
]
}Prefer no code? Many deal sites publish an RSS feed. Add it to the RSS connector with a template that includes {url}, and OpenTweet posts each new item. Full field list in the API reference.
What deal posts cost
Every deal post carries a link, and the X API charges $0.20 for each one. That makes link volume the number that decides your plan.
| Deals a day | X API, links only | OpenTweet |
|---|---|---|
| Up to 10 | up to $60/mo | Advanced, $29/mo (10 link posts a day, 3 X accounts) |
| Up to 20 | up to $120/mo | Agency, $49/mo (20 link posts a day, 10 X accounts) |
| More than 20 | $6/mo per extra daily deal | Agency plus link credits: $10 for 30, $25 for 100, $50 for 200 |
Pro ($19.99/mo) includes 1 link post a day, which suits a weekly roundup, not a deal account. Daily post caps: Advanced 100, Agency 300. The 7-day trial includes 15 link posts in total for automation accounts. Want full limits from day one? Pay now and skip the trial. Full numbers on X API pricing and our pricing.
Disclose every link. Put #ad or "I earn a commission" in the template so no deal goes out without it. Follow each affiliate program's own rules on social sharing.
Post each deal once. Repeating the same link is the fastest way to get an automated account limited. Store what you posted, and turn on the "Automated" label in your X settings.
Stay on your own timeline. No auto-replies with links under other people's posts, no mass mentions, no unrelated trending hashtags. More in X automation rules.
Frequently asked questions
How do I make an affiliate deals bot for X?
Write a script that watches your deal sources (an affiliate network product feed, a retailer API, or a price tracker), keeps the last price it saw for each product, and when a price drops below your threshold, sends the product name, the new price and your affiliate link to https://opentweet.io/api/v1/posts. Put the product photo in media_urls. OpenTweet posts it to your X account, so you skip the X developer account and OAuth.
How much does it cost to post affiliate links to X automatically?
On the official X API, every post that contains a link costs $0.20, so 10 deal posts a day is about $60 a month before any other call. On OpenTweet, Advanced ($29/month) includes 10 link posts a day and Agency ($49/month) includes 20. For busy days above that, link credit packs start at $10 for 30 link posts.
Does a link in a reply or thread count as a link post?
Yes. OpenTweet counts every tweet that carries a link, including links in thread_tweets and bare domains like shop.example.com. A thread with the link in the second tweet costs one link post, the same as a single tweet with the link. Product images passed in media_urls are not links.
Do I have to disclose affiliate links on X?
Yes. In the US the FTC expects a clear disclosure such as #ad or "I earn a commission" in the post itself, and most affiliate programs, Amazon Associates included, require one in their terms. Put it in your post template so every deal carries it. Check the rules of each program you join: some limit how and where links can be shared.
Does X reduce the reach of posts with links?
X says it does not penalize links, and our own look at 60 accounts found link posts got about the same impressions as posts without links. Outside estimates disagree. Deal accounts live on the click either way, so test both formats: link in the main post, or deal in the main post and link in the first reply.
Can one script run deal accounts for several niches or countries?
Yes. Connect each X account to OpenTweet and pass x_account_id on each post to pick the account. Advanced covers 3 X accounts and Agency 10, so a tech deals account, a toys account and a French "bons plans" account can all run from one key.
Will X suspend an automated deals account?
X allows automated accounts that post to their own timeline. What gets deal accounts limited is spam behavior: the same link posted over and over, auto-replying with links under other people's posts, mass mentions, and trending hashtags that have nothing to do with the deal. Post each deal once, turn on the "Automated" label, and spread posts through the day.
Building a different kind of automated account? See the restock alert bot, the crypto news bot, or the news account in any language.
Everything you can build on X with OpenTweet
Post to X from your code, a watcher, or an AI agent. Start anywhere in the cluster.
OpenTweet vs the X API
Post, schedule, and automate X without a developer account or the $200/mo minimum.
X DM outreach, human-approved
Find and qualify leads, AI-draft DMs, approve each one, and drip-send from your own account via API or MCP.
Post to X without an API
The clean, account-safe way to post to X from your code or an AI agent.
Twitter MCP Server
Give Claude, Cursor, and OpenClaw the ability to post to X. 43 tools included.
Developer docs
Quickstart, API keys, MCP setup, and the REST reference for posting to X from code or an agent.
Cross-posting reference
One call posts to X, Bluesky and LinkedIn. The platforms field, per-network results, and why a network gets skipped.
Social media API for AI agents
Three ways an agent can post to X, Bluesky and LinkedIn, and the trade-offs of each.
LinkedIn MCP server
Post and schedule to a LinkedIn profile from Claude or Cursor through the official LinkedIn API.
XMCP vs OpenTweet
X's official MCP server bills per API call and cannot schedule. Compare it with the flat-fee hosted MCP.
MCP for AI agents
Connect your AI client to X in under two minutes, no X developer account.
Developer API and keys
REST endpoints, one bearer key, and usage tracking. Build on OpenTweet.
OpenTweet for AI agents
The posting layer for autonomous agents and automations that live on X.
Build an AI Twitter persona
Give your AI agent its own X account. Setup, cadence, and the rules that keep it safe.
Best MCP servers for social media
The 2026 ranked list. How the hosted OpenTweet MCP compares with the official X MCP and others.
Cheapest way to post to X via code
Flat fee vs pay-per-use. Why the $0.20 per-link fee flips the math past ~145 link posts a month.
X API pricing 2026
Every pay-per-use X API endpoint price from docs.x.com in one searchable table.
Bluesky posting API
Post and schedule to Bluesky with one REST call and OAuth, and cross-post to X and LinkedIn in the same request.
Automate LinkedIn posts
Post to LinkedIn from an AI agent, n8n or a script through the official Posts API, with one REST or MCP call.
Post today's deals automatically
Connect X, create a key, and point your price watcher at it. The next price drop goes out with your link.