X posts and replies skill for AI agents
Resolve X post links or IDs into text, author, media, polls, quoted/parent posts, engagement metrics and replies, or resolve a handle into that account's public profile.
What the skill does
It tells your agent when a request fits the X Post, Reply & Profile Lookup by Link or ID Actor, which input to send and which fields come back (text, author.username, created at, like count and 5 more). The agent runs it through the Apify API with your token and gets JSON rows.
Skill files updated 2026-11-14.Install by hand
Save the five files into a folder named x-post-reply-and-profile-lookup-by-link-or-id: ~/.claude/skills/x-post-reply-and-profile-lookup-by-link-or-id/ for Claude Code, ~/.agents/skills/x-post-reply-and-profile-lookup-by-link-or-id/ for Codex and most other agents.
- SKILL.mdWhen to use the skill, the input and the fields it returns, 5.4 KB
- scripts/run.mjsRuns the Actor with your token (Node 18 or later), 1.2 KB
- references/example-input.jsonA starter input that passes the Actor's schema, 96 bytes
- references/input-schema.jsonEvery input setting the Actor accepts, 3.9 KB
- references/output-fields.jsonEvery field the Actor declares, 871 bytes
The same five files as one download: x-post-reply-and-profile-lookup-by-link-or-id.zip (4.9 KB).
Run it
Ask your agent in plain words, for example "X post, reply", and it picks the skill from its description. Or run the script yourself:
export APIFY_TOKEN=your_apify_token
cd x-post-reply-and-profile-lookup-by-link-or-id # the skill folder
node scripts/run.mjs # the example input
node scripts/run.mjs my-input.json # your own input Without an argument the script uses references/example-input.json. It waits for the run and prints the rows as JSON; for long runs SKILL.md shows the async API calls.
What it returns
| Field | What it is |
|---|---|
| text | Text |
| author.username | Author.username |
| createdAt | Created At |
| likeCount | Like Count |
| retweetCount | Retweet Count |
| replyCount | Reply Count |
| viewCount | View Count |
| url | Url |
Read SKILL.md
Show the whole file (5.4 KB)
---
name: x-post-reply-and-profile-lookup-by-link-or-id
description: "Resolve X post links or IDs into text, author, media, polls, quoted/parent posts, engagement metrics and replies, or resolve a handle into that account's public profile. Output fields: text, author.username, createdAt, likeCount, viewCount and more, as JSON rows. Use it for requests like \"X post, reply\", or a CSV/JSON export of public Twitter data."
---
# X Post, Reply & Profile Lookup by Link or ID
Resolve X post links or IDs into text, author, media, polls, quoted/parent posts, engagement metrics and replies, or resolve a handle into that account's public profile.
- Actor: https://apify.com/vexaloom-labs/x-post-reply-and-profile-lookup-by-link-or-id (ID `vexaloom-labs~x-post-reply-and-profile-lookup-by-link-or-id`)
- n8n workflow for the same Actor: https://scraperfinder.com/n8n/x-post-reply-and-profile-lookup-by-link-or-id/
- Example input: `references/example-input.json`
- Input schema: `references/input-schema.json`
- Output fields: `references/output-fields.json`
Short video breakdown:
- [See client posts, metrics, and reply trails](https://www.youtube.com/shorts/KNhmHdh3ySA)
## When to use
Use this skill when the user wants:
- X post, reply
- a repeatable export of public Twitter data as CSV or JSON
Do not use it for private, login-protected or paywalled data.
## What it returns
One JSON row per result. Columns from the Actor's dataset schema:
- `text`: Text
- `author.username`: Author.username
- `createdAt`: Created At
- `likeCount`: Like Count
- `retweetCount`: Retweet Count
- `replyCount`: Reply Count
- `viewCount`: View Count
- `url`: Url
All 9 declared fields: `references/output-fields.json`.
## Inputs
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `tweetUrls` | array | yes | | Paste the posts you want to collect. You can also paste post IDs, x.com/i/web/status links, twitter.com links, profile links or bare handles (a profile input returns that… |
| `includeReplies` | boolean | no | true | Collect the replies X shows for each post, walked forward from the post's publication time. |
| `maxReplies` | integer | no | 20 | How many replies to collect for each post (0-500). Posts with very large threads may return fewer because X does not expose every reply to logged-out visitors. |
| `includeQuotes` | boolean | no | false | Collect the posts that quote each requested post, with their text, author and engagement counts. |
| `maxQuotes` | integer | no | 50 | How many quote posts to collect for each requested post (0-500). |
| `includeRetweeters` | boolean | no | false | Collect the handles of accounts that reposted each requested post. X only exposes a search-index sample of visible reposts, so this is an approximate, recent-biased list. |
| `maxRetweeters` | integer | no | 50 | How many retweeter handles to collect for each post (0-500). |
| `includeQuotedTweet` | boolean | no | true | When a collected post quotes another post, attach the quoted post's text, author and metrics. |
| `includeParentTweet` | boolean | no | true | When a collected post is a reply, attach the post it answers under parentTweet. |
| `includeThreadAncestors` | boolean | no | false | When a requested post is a reply, walk up to 10 posts back to the start of the thread and attach them under threadAncestors (root first). |
| `includeMedia` | boolean | no | true | Include image links, video links and video variants for each post. |
| `includeAuthorProfile` | boolean | no | true | Attach the author's public profile details (followers, bio, verification) to every post, reply and quote row under author and authorProfile. |
Example (`references/example-input.json`):
```json
{
"tweetUrls": [
"https://x.com/NASA/status/2107095768821576019"
],
"maxReplies": 3
}
```
The input passes the Actor's input schema (checked at every publish). The run size follows the number of inputs you pass.
## Run it
Set `APIFY_TOKEN`, then call the synchronous endpoint for small and medium runs (it waits up to 300 seconds):
```bash
curl -s -X POST "https://api.apify.com/v2/acts/vexaloom-labs~x-post-reply-and-profile-lookup-by-link-or-id/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d @references/example-input.json > output.json
```
Or with Node 18+: `node scripts/run.mjs [input.json]`.
For large runs, start an async run and read its dataset when it finishes:
```bash
RUN=$(curl -s -X POST "https://api.apify.com/v2/acts/vexaloom-labs~x-post-reply-and-profile-lookup-by-link-or-id/runs" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d @references/example-input.json)
RUN_ID=$(echo "$RUN" | jq -r '.data.id'); DATASET=$(echo "$RUN" | jq -r '.data.defaultDatasetId')
curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID?waitForFinish=60" -H "Authorization: Bearer $APIFY_TOKEN" | jq -r '.data.status'
curl -s "https://api.apify.com/v2/datasets/$DATASET/items?format=json" -H "Authorization: Bearer $APIFY_TOKEN" > output.json
```
## Cost and limits
- Apify bills the Actor's usage on your account; the Actor's Pricing tab shows the current price.
- Keep the limit in the input small for a first run.
## Guardrails
- Public data only. Do not pass cookies, sessions or private account data.
- Do not use the output for spam, harassment or unlawful discrimination.
- Check the target site's terms and local law before running at scale.
Same Actor, other ways
- The x posts and replies n8n workflow: the same job as a scheduled n8n workflow, imported from a URL.
- X Post, Reply & Profile Lookup by Link or ID: fields, inputs and price per plan.
- X Post, Reply & Profile Lookup by Link or ID in the Apify Store.
Questions people ask
Which agents can use this skill?
Any agent that reads Agent Skills folders: Claude Code, Codex, Cursor, Gemini CLI and the other agents the skills CLI installs into. The skill is a SKILL.md file plus a small Node script, so an agent without skill support can still follow the file by hand.
Does the skill cost anything?
The skill is free. Running it starts the X Post, Reply & Profile Lookup by Link or ID Actor on your own Apify account, which bills the run at the Actor's Store price; the Apify Free plan includes $5 of usage a month.
What does npx skills add install?
The whole folder: SKILL.md, scripts/run.mjs and the three reference files, downloaded from this site and checked against the SHA-256 digest in scraperfinder.com/.well-known/agent-skills/index.json. Add -g to install it for every project.