x-twitter
The deterministic read path for public X (Twitter) data through UnifAPI. This
is a Data Skill: it does not run a marketing job on its own — it names the
concrete x/... operations, response shapes, and gotchas so any X-first
workflow (KOL pricing, creator vetting, buying signals, competitor and listening
work) reads from one known recipe instead of rediscovering the surface each time.
Read-only — eyes, not hands. It researches public X data and returns cited
records; it never posts, replies, follows, or DMs, and UnifAPI never holds X
credentials.
Use the unifapi skill for live evidence
Connect once through the shared unifapi skill (OAuth MCP), then call the
operations below. The X integration is backed by RapidAPI SocialLab but the
public contract uses X-style /x/... paths — do not use legacy
/twitter/... paths. Keep any billing metadata so the output can state record
cost.
Response contract
Single-entity endpoints return the object in data:
{
"request_id": "unif_...",
"data": {},
"billing": { "records_charged": 1, "balance_remaining": 99 }
}
List endpoints return an array in data plus pagination:
{
"request_id": "unif_...",
"data": [],
"pagination": { "has_more": false, "next_cursor": null },
"billing": { "records_charged": 1 }
}
When pagination.has_more is true, pass pagination.next_cursor as the next
request's pagination_token (next_token is also accepted). Always preserve
billing when reporting cost.
Core operations
| Need |
Operation |
| Profile by handle |
x/users/by/username/{username} |
| Profiles by handles |
x/users/by (?usernames=a,b) |
| Profile by id |
x/users/{id} |
| Profiles by ids |
x/users (?ids=123,456) |
| Recent authored posts |
x/users/{id}/tweets (?max_results=10&exclude=replies) |
| Search recent posts |
x/tweets/search/recent (?query=...&max_results=10) |
| Autocomplete users/topics |
x/autocomplete (?query=...) |
| Post by id / posts by ids |
x/tweets/{id} · x/tweets (?ids=123,456) |
| Who amplified a post |
x/tweets/{id}/retweeted_by · x/tweets/{id}/quote_tweets |
| Who liked a post |
x/tweets/{id}/liking_users |
| What a user likes |
x/users/{id}/liked_tweets |
| Followers / following |
x/users/{id}/followers · x/users/{id}/following |
| Verified followers |
x/users/{id}/verified_followers |
| Regional trends |
x/trends/by/woeid/{woeid} |
Need a field not listed here? Use the unifapi skill's get_operation to read
the exact schema before calling — but pick the operation from this table, don't
discover blind.
Workflow
The deterministic recipes. Pick the one that matches the job; each names exactly
what to call.
- Resolve a handle to a profile. Strip the leading
@, then call
x/users/by/username/{username}. Read data.id (needed for every per-user
call below) and data.public_metrics.followers_count.
- Read recent engagement. With the id from step 1, call
x/users/{id}/tweets?max_results=10&exclude=replies. Compute engagement from
each tweet's public_metrics (like_count, retweet_count, reply_count,
quote_count, impression_count). Page with
x/users/{id}/tweets?pagination_token={next_cursor} when has_more.
- Trace who amplified a post. With a tweet id from step 2, call
x/tweets/{id}/retweeted_by, x/tweets/{id}/quote_tweets, or
x/tweets/{id}/liking_users to see who reposted, quoted, or liked it — the
amplification and intent signal behind buying-signal, listening, and
competitor work. Use x/users/{id}/liked_tweets for what a user engages with.
Page via next_cursor.
- Gauge audience quality. Call
x/users/{id}/verified_followers; it returns
the verified followers as a paginated list, not a ready figure. Measure its
size against data.public_metrics.followers_count from step 1 — that verified
share is the real-vs-inflated signal that feeds confidence and warnings in
downstream pricing/vetting skills. Page via next_cursor for a fuller count.
- Discover from a topic (no handles yet). Call
x/tweets/search/recent?query=... for recent matching posts, or
x/autocomplete?query=... for user/topic suggestions, then resolve the
surfaced handles with step 1.
- Map a network. Call
x/users/{id}/followers or x/users/{id}/following
for audience-overlap or reach work; page via next_cursor.
- Read regional trends. Call
x/trends/by/woeid/{woeid} for what's trending
in a location (WOEID), e.g. for listening or content-timing.
- Cite everything. Every figure ties back to the post or profile it came
from; report
billing.records_charged (or estimate when billing metadata is
absent).
Shape notes
XUser — metrics nested under public_metrics: followers_count,
following_count, tweet_count, listed_count. Profile flags at top level:
protected, verified, verified_type. Read public_metrics, not legacy
flat fields.
XTweet — metrics nested under public_metrics: like_count,
retweet_count, reply_count, quote_count, bookmark_count,
impression_count. May include author and media when available.
Gotchas
- Use
/x/... paths, never /twitter/... (legacy). Old /twitter/users/{screen_name}
→ x/users/by/username/{username}; old /twitter/search →
x/tweets/search/recent (use x/autocomplete for user/topic discovery).
- A protected, too-old, or too-thin timeline lowers confidence — surface it,
don't paper over it.
- Resolve the handle to
data.id before any x/users/{id}/... call.
- A low balance can silently truncate list pages: check
billing.truncated_due_to_balance — when true the page is partial, so top up
before trusting any count or share computed from it.
Output
Return the records the calling workflow needs, each cited to its post/profile,
plus a one-line cost note (records_charged). When this skill is used directly,
a compact profile + engagement summary per handle is the default:
**@handle** — followers {N}, verified {yes/no}. Recent 10 posts: avg engagement {x}% ({likes}/{reposts}/{replies}). Evidence: {post URLs}. Records: ~{N}.
Related skills
- kol-pricing, creator-shortlist, audience-fit-check (Influencer Marketing) — price and vet X creators on top of this read path.
- buying-signal-monitor (Social Selling), competitor-profiling (Competitive Intelligence), social-listening-brief (Social Listening) — X-first intent, competitor, and listening work.
- unifapi — the shared data skill: connect MCP and look up exact schemas with
get_operation.
1---2name: x-twitter3description: When a workflow needs public X/Twitter data through UnifAPI — profiles, posts, engagement, followers/following, recent search, autocomplete, or trends. Also use on "read this X handle," "pull tweets for," "X follower count," "search X for," "Twitter engagement," "X trends," or when another skill (KOL pricing, creator shortlist, buying signals, competitor/listening) needs the deterministic X read path. Connect via the `unifapi` skill first. Read-only research, never posts.4license: MIT5---6
7# x-twitter
8
9The deterministic read path for public **X (Twitter)** data through UnifAPI. This
10is a **Data Skill**: it does not run a marketing job on its own — it names the
11concrete `x/...` operations, response shapes, and gotchas so any X-first
12workflow (KOL pricing, creator vetting, buying signals, competitor and listening
13work) reads from one known recipe instead of rediscovering the surface each time.
14
15Read-only — **eyes, not hands**. It researches public X data and returns cited
16records; it never posts, replies, follows, or DMs, and UnifAPI never holds X
17credentials.
18
19## Use the `unifapi` skill for live evidence
20
21Connect once through the shared **`unifapi`** skill (OAuth MCP), then call the
22operations below. The X integration is backed by RapidAPI SocialLab but the
23public contract uses **X-style `/x/...` paths** — do **not** use legacy
24`/twitter/...` paths. Keep any `billing` metadata so the output can state record
25cost.
26
27## Response contract
28
29Single-entity endpoints return the object in `data`:
30
31```json
32{
33 "request_id": "unif_...",
34 "data": {},
35 "billing": { "records_charged": 1, "balance_remaining": 99 }
36}
37```
38
39List endpoints return an array in `data` plus `pagination`:
40
41```json
42{
43 "request_id": "unif_...",
44 "data": [],
45 "pagination": { "has_more": false, "next_cursor": null },
46 "billing": { "records_charged": 1 }
47}
48```
49
50When `pagination.has_more` is true, pass `pagination.next_cursor` as the next
51request's `pagination_token` (`next_token` is also accepted). Always preserve
52`billing` when reporting cost.
53
54## Core operations
55
56| Need | Operation |
57| ------------------------- | ----------------------------------------------------------- |
58| Profile by handle | `x/users/by/username/{username}` |
59| Profiles by handles | `x/users/by` (`?usernames=a,b`) |
60| Profile by id | `x/users/{id}` |
61| Profiles by ids | `x/users` (`?ids=123,456`) |
62| Recent authored posts | `x/users/{id}/tweets` (`?max_results=10&exclude=replies`) |
63| Search recent posts | `x/tweets/search/recent` (`?query=...&max_results=10`) |
64| Autocomplete users/topics | `x/autocomplete` (`?query=...`) |
65| Post by id / posts by ids | `x/tweets/{id}` · `x/tweets` (`?ids=123,456`) |
66| Who amplified a post | `x/tweets/{id}/retweeted_by` · `x/tweets/{id}/quote_tweets` |
67| Who liked a post | `x/tweets/{id}/liking_users` |
68| What a user likes | `x/users/{id}/liked_tweets` |
69| Followers / following | `x/users/{id}/followers` · `x/users/{id}/following` |
70| Verified followers | `x/users/{id}/verified_followers` |
71| Regional trends | `x/trends/by/woeid/{woeid}` |
72
73Need a field not listed here? Use the `unifapi` skill's `get_operation` to read
74the exact schema before calling — but pick the operation from this table, don't
75discover blind.
76
77## Workflow
78
79The deterministic recipes. Pick the one that matches the job; each names exactly
80what to call.
81
821. **Resolve a handle to a profile.** Strip the leading `@`, then call
83 `x/users/by/username/{username}`. Read `data.id` (needed for every per-user
84 call below) and `data.public_metrics.followers_count`.
852. **Read recent engagement.** With the id from step 1, call
86 `x/users/{id}/tweets?max_results=10&exclude=replies`. Compute engagement from
87 each tweet's `public_metrics` (`like_count`, `retweet_count`, `reply_count`,
88 `quote_count`, `impression_count`). Page with
89 `x/users/{id}/tweets?pagination_token={next_cursor}` when `has_more`.
903. **Trace who amplified a post.** With a tweet id from step 2, call
91 `x/tweets/{id}/retweeted_by`, `x/tweets/{id}/quote_tweets`, or
92 `x/tweets/{id}/liking_users` to see who reposted, quoted, or liked it — the
93 amplification and intent signal behind buying-signal, listening, and
94 competitor work. Use `x/users/{id}/liked_tweets` for what a user engages with.
95 Page via `next_cursor`.
964. **Gauge audience quality.** Call `x/users/{id}/verified_followers`; it returns
97 the verified followers as a paginated list, not a ready figure. Measure its
98 size against `data.public_metrics.followers_count` from step 1 — that verified
99 share is the real-vs-inflated signal that feeds confidence and warnings in
100 downstream pricing/vetting skills. Page via `next_cursor` for a fuller count.
1015. **Discover from a topic (no handles yet).** Call
102 `x/tweets/search/recent?query=...` for recent matching posts, or
103 `x/autocomplete?query=...` for user/topic suggestions, then resolve the
104 surfaced handles with step 1.
1056. **Map a network.** Call `x/users/{id}/followers` or `x/users/{id}/following`
106 for audience-overlap or reach work; page via `next_cursor`.
1077. **Read regional trends.** Call `x/trends/by/woeid/{woeid}` for what's trending
108 in a location (WOEID), e.g. for listening or content-timing.
1098. **Cite everything.** Every figure ties back to the post or profile it came
110 from; report `billing.records_charged` (or estimate when billing metadata is
111 absent).
112
113## Shape notes
114
115- **`XUser`** — metrics nested under `public_metrics`: `followers_count`,
116 `following_count`, `tweet_count`, `listed_count`. Profile flags at top level:
117 `protected`, `verified`, `verified_type`. Read `public_metrics`, not legacy
118 flat fields.
119- **`XTweet`** — metrics nested under `public_metrics`: `like_count`,
120 `retweet_count`, `reply_count`, `quote_count`, `bookmark_count`,
121 `impression_count`. May include `author` and `media` when available.
122
123## Gotchas
124
125- Use `/x/...` paths, never `/twitter/...` (legacy). Old `/twitter/users/{screen_name}`
126 → `x/users/by/username/{username}`; old `/twitter/search` →
127 `x/tweets/search/recent` (use `x/autocomplete` for user/topic discovery).
128- A protected, too-old, or too-thin timeline lowers confidence — surface it,
129 don't paper over it.
130- Resolve the handle to `data.id` **before** any `x/users/{id}/...` call.
131- A low balance can silently truncate list pages: check
132 `billing.truncated_due_to_balance` — when true the page is partial, so top up
133 before trusting any count or share computed from it.
134
135## Output
136
137Return the records the calling workflow needs, each cited to its post/profile,
138plus a one-line cost note (`records_charged`). When this skill is used directly,
139a compact profile + engagement summary per handle is the default:
140
141```markdown
142**@handle** — followers {N}, verified {yes/no}. Recent 10 posts: avg engagement {x}% ({likes}/{reposts}/{replies}). Evidence: {post URLs}. Records: ~{N}.
143```
144
145## Related skills
146
147- **kol-pricing**, **creator-shortlist**, **audience-fit-check** (Influencer Marketing) — price and vet X creators on top of this read path.
148- **buying-signal-monitor** (Social Selling), **competitor-profiling** (Competitive Intelligence), **social-listening-brief** (Social Listening) — X-first intent, competitor, and listening work.
149- **unifapi** — the shared data skill: connect MCP and look up exact schemas with `get_operation`.