Twitter Competitor Analysis in 2026: Method and Script
A Twitter competitor analysis you can rerun each month: compare rival brands' posting frequency, formats and engagement per view, with a tested script.
Tarun Khatri
Published · Updated · 7 min read
A Twitter competitor analysis compares rival brands' recent posts: how often they post, in which formats, and what engagement each post earns.
It's for brand and social media teams: a five-step method, the engagement formula, and a script we ran on GitHub and GitLab. We run Weir, the API it calls.
Paste this into X's search box, then open Latest to see two brands' posts side by side:
(from:github OR from:gitlab) -filter:replies -filter:nativeretweets
- Pick 3 to 5 brandsDirect rivals, in a private X List.
- Pull a week of postsSame 7 days for every brand.
- Compare frequency and formatPosts a day, and text, image, video or link.
- Score engagement per postEngagements divided by views.
- Read the top postsTopic, hook and format.
Step 1: Pick 3 to 5 accounts for your X competitor analysis
Choose brands that sell to your buyers, not just the biggest names around.
Use brand accounts only. A company's official account is fair game; a private person is not competitor research.
Put them in a private X List, so their posts share one timeline. X's Help Center says Lists are public by default, and the Private slider makes one "only accessible to you."
Step 2: Pull a week of each brand's recent posts
Use the same 7 days for every brand, and leave out two kinds of posts:
- Replies, which are conversations, not the content you want to compare.
- Reposts, because X search returns them by default, with someone else's counts.
Add since: and until: dates to the search above. Our X advanced search builder writes them for you.
Skip the last day, too. A post that's an hour old hasn't collected its likes yet.
Step 3: Compare posting frequency and formats
Count each brand's posts, then divide by 7 for posts a day. Sort every post into one format:
- Text, image or video, by what's attached.
- Link, when it points somewhere else, like a blog.
- Article, for an X Article, X's long-form post.
Frequency shows effort, and format shows each team's bet. Neither shows what works.
Step 4: Score engagement per post with one formula
The formula uses only public counts:
engagements = likes + reposts + replies + quotes + bookmarks
engagement rate = engagements / views × 100
Compare each brand's median post, not the average. One viral post can drag an average a long way.
Dividing by views stops a big account winning on size alone. Sociality.io's guide divides by followers, which also works.
X's own rate counts clicks, which only the author sees. So their team sees a higher rate than you can.
Step 5: Read the top posts to see what topics get traction
Sort each brand's posts by engagements and read the top three. Note the topic, the hook in the first line, and the format.
Check the mix of counts, too. Many bookmarks mean people saved the post to read later.
Our Twitter keyword research guide shows how to test the phrases those posts use.
What X's analytics shows you about competitors
X's analytics dashboard covers your own account. X's business help says it tracks impressions, engagements and engagement rate "for each post you send."
For a rival, you see only what any visitor sees:
| Metric | Your posts | A rival's posts |
|---|---|---|
| Views | Yes | Yes |
| Likes and reposts | Yes | Yes |
| Replies and quotes | Yes | Yes |
| Bookmarks | Yes | Yes |
| Link and profile clicks | Yes | No |
| X's engagement rate | Yes | No |
X's Help Center says "anyone on X can see view counts on posts." Our guide to Twitter analytics without Premium covers each public number.
Run the Twitter competitor analysis with a script
For more than two brands, a script saves the afternoon.
Part one saves 7 days of original posts, ending a day ago. It stops on a null cursor, with a 10-page cap:
import datetime as dt, json, os, sys, requests
end = dt.datetime.now(dt.timezone.utc).date() - dt.timedelta(days=1) # every post at least a day old
body = {"fromUsers": sys.argv[1:], "query": "-filter:nativeretweets", "onlyOriginal": True,
"since": f"{end - dt.timedelta(days=7)}T00:00:00Z", "until": f"{end}T00:00:00Z", "limit": 100}
head = {"Authorization": f"Bearer {os.environ['WEIR_API_KEY']}"}
posts = []
for _ in range(10): # page cap
r = requests.post("https://api.weirapp.io/v1/x/search", json=body, headers=head, timeout=60)
r.raise_for_status() # 402: out of credits
posts += r.json()["data"]
if not r.json()["meta"]["nextCursor"]:
break
body["cursor"] = r.json()["meta"]["nextCursor"]
json.dump({"data": posts}, open("brands.json", "w", encoding="utf-8"))
Part two reads that file, so reruns are free. First, the formula and the format check:
import json, statistics, sys
from collections import Counter, defaultdict
COUNTS = ["likeCount", "retweetCount", "replyCount", "quoteCount", "bookmarkCount"]
def engagements(p):
return sum(p[k] or 0 for k in COUNTS)
def post_format(p):
kinds = {m["type"] for m in p["media"]}
if p["article"]: return "article"
if kinds & {"video", "animated_gif"}: return "video"
if "photo" in kinds: return "image"
return "link" if p["entities"]["urls"] else "text"
The rest groups posts by brand and prints the comparison:
brands = defaultdict(list)
for p in json.load(open(sys.argv[1], encoding="utf-8"))["data"]:
brands[p["author"]["username"]].append(p)
for name, posts in brands.items():
rates = [100 * engagements(p) / p["viewCount"] for p in posts if p["viewCount"]]
top = max(posts, key=engagements)
print(f"@{name}: {len(posts)} posts, {dict(Counter(map(post_format, posts)))}")
print(f" median engagements per post: {statistics.median(map(engagements, posts))}")
print(f" median rate: {statistics.median(rates or [0]):.2f}% of views")
print(f" top post: {engagements(top)} engagements, {top['url']}")
Save part one as pull.py and the rest as compare.py. Run python pull.py github gitlab bitbucket, then python compare.py brands.json.
What we found comparing GitHub and GitLab
On 22 October 2026, one Weir search for the latest four original posts from @github and @gitlab returned two from each. It cost 5 credits.
We saved the response as brands.json and ran compare.py on it:
@gitlab: 2 posts, {'video': 2}
median engagements per post: 3.0
median rate: 0.18% of views
top post: 5 engagements, https://x.com/gitlab/status/2113021876301595039
@github: 2 posts, {'image': 1, 'article': 1}
median engagements per post: 359.5
median rate: 0.57% of views
top post: 604 engagements, https://x.com/github/status/2112979782652813783
Here is each post's rate:
Three things stand out, even in a tiny sample:
- GitHub's top post was an X Article on moving its Git repos to Azure. Of its 604 engagements, 129 were bookmarks.
- GitLab bet on video both times, each a vertical clip linking to its blog.
- One GitLab post was under an hour old, with 580 views. That's why the script skips the last day.
GitHub has about 16 times GitLab's followers, so compare rates, not raw counts.
Four posts is a demo, not a verdict. A full run costs 1 credit per page plus 1 per post. X serves about 20 posts a page, so the 10-page cap holds it to about 210 credits.
If your numbers look wrong
- A post shows 0 likes. It's probably a repost. Keep
-filter:nativeretweetsin the query. - A post has no rate. X shows no views on older posts, so the script leaves it out.
- One brand has far more posts. Check that replies are out, then trust the medians.
When not to use Weir
- You watch one or two rivals. A private X List and the search box cost nothing.
- You need their clicks or audience data. X shows clicks only to the author; Weir reads public data.
- You want reports without code. Social media suites sell competitor dashboards; Socialinsider's guide points to its own.
- Price per post at small volumes matters most. TwitterAPI.io lists $0.15 per 1,000 tweets as of October 2026, and it can post.
Weir is read-only and isn't licensed by X, so access can change. X's Terms of Service say you "cannot scrape the Services without X's express written permission," so check what applies to you. This isn't legal advice.
FAQ
How do I do a competitor analysis on Twitter?
Pick 3 to 5 rival brand accounts and pull a week of their original posts. Compare how often they post, their formats and their median engagement rate by views. Then read their top posts to see which topics worked.
How do I compare Twitter accounts?
Compare rates, not totals. Divide each post's likes, reposts, replies, quotes and bookmarks by its views, then take each account's median. Follower counts mislead, because big accounts get big numbers on weak posts too.
Can I see a competitor's Twitter analytics?
Only the public part: views, likes, reposts, replies, quotes and bookmarks on each post. Link clicks, profile clicks and X's own engagement rate go only to the account that posted.
How do I see competitor tweets in one place?
Make a private X List of their accounts and open its timeline. Or search (from:brand1 OR from:brand2) -filter:replies on the Latest tab. For many brands, the script above saves their posts to a file.
Sources
All checked on 22 October 2026. We read X's help pages through Wayback Machine copies, dated in brackets:
- X Help Center, How to use X Lists (10 October 2026): https://help.x.com/en/using-x/x-lists
- X Help Center, View counts (1 October 2026): https://help.x.com/en/using-x/view-counts
- X Business, Post activity dashboard (13 June 2026): https://business.x.com/en/help/campaign-measurement-and-analytics/tweet-activity-dashboard
- X Terms of Service, effective 9 October 2026 (17 October 2026): https://x.com/en/tos
- Sociality.io, Twitter competitor benchmarking (updated 2 October 2022): https://sociality.io/blog/competitor-analysis-benchmarking-on-twitter/
- Socialinsider, Twitter competitor analysis (updated 17 June 2026): https://www.socialinsider.io/blog/twitter-competitor-analysis/
- TwitterAPI.io pricing and its create tweet endpoint, read directly: https://twitterapi.io/pricing and https://docs.twitterapi.io/api-reference/endpoint/create_tweet_v2
- Weir searchX reference and billing: https://docs.weirapp.io/reference/x/searchX and https://docs.weirapp.io/billing
- Our Weir search for @github and @gitlab, 22 October 2026, 5 credits