# scraping-twitter-profile-tweets

Extracts tweets, replies, and engagement metrics from Twitter/X accounts via Apify. Useful for audience analysis and timeline archiving.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 757 installs · ★ 1
- Author: apidojo
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/apidojo-io/apidojo-skills/tree/HEAD/skills/primitives/scraping-twitter-profile-tweets/SKILL.md
- Updated: 2026-05-13
- HTML: https://affpapa.org/en/nevibecode/skills/scraping-twitter-profile-tweets

## What it does

This skill triggers Apify's `apidojo~twitter-profile-scraper` actor via `scripts/run_actor.js` or through the Apify MCP `call_actor` tool. It accepts user handles without the `@` symbol, profile URLs, and timeframe boundaries using `start` and `end`. Parameters also let you isolate image posts, include replies, or cap total items with `maxItems`.

Returned datasets provide tweet text, IDs, direct links, and counters for likes, bookmarks, quotes, and retweets. Author metadata includes follower counts and verification status. Data exports to JSON or CSV.

REST execution requires an `$APIFY_TOKEN` environment variable. When filtering by date, queries need at least 50 matching tweets in the chosen range to execute successfully.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-twitter-profile-tweets -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/scraping-twitter-profile-tweets/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/scraping-twitter-profile-tweets/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-twitter-profile-tweets -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/scraping-twitter-profile-tweets/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-twitter-profile-tweets -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/scraping-twitter-profile-tweets/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install apidojo-io/apidojo-skills scraping-twitter-profile-tweets
```

2. **Manually: put the files in place**
- File: `.github/skills/scraping-twitter-profile-tweets/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-twitter-profile-tweets -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/apidojo-io/apidojo-skills --path skills/primitives/scraping-twitter-profile-tweets
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/scraping-twitter-profile-tweets/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add apidojo-io/apidojo-skills --skill scraping-twitter-profile-tweets -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/apidojo-io/apidojo-skills/tree/HEAD/skills/primitives/scraping-twitter-profile-tweets/SKILL.md

## When to use it
- export tweet timelines and reply chains from target X accounts
- track engagement numbers including bookmarks, retweets, and likes
- filter account posts by date intervals or media attachments
- save scraped tweet datasets directly to CSV or JSON files

## Example prompts
- Fetch the latest 100 tweets from elonmusk and export them to results.json
- Collect all posts with images from a specific Twitter handle
- Scrape tweet history with reply counts and bookmarks for a target profile

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 4f12440e82e1de27.

BEGIN THIRD-PARTY FILE 4f12440e82e1de27
````text
---
name: scraping-twitter-profile-tweets
description: >
  Extracts tweets, reply threads, and engagement metrics from a specific Twitter/X profile
  using apidojo's Twitter Profile Scraper on Apify. Triggers when the user asks to: get all tweets
  from a Twitter account, scrape tweets from a specific user's profile, export tweet history from
  a Twitter handle, get recent tweets from a Twitter account with engagement stats, fetch tweet
  timeline for a specific user, or collect posts from a Twitter profile by username. Returns tweet
  text, likes, retweets, replies, views, bookmarks, and author info per tweet.
  Ideal for social media monitors, journalists, and competitive intelligence teams.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actor: apidojo/twitter-profile-scraper
---

# Scraping Twitter Profile Tweets

Raw data collection. No assumed use case — returns the full dataset for downstream analysis.

---

## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | Optional | `[]` | Twitter profile URLs (x.com or twitter.com formats) |
| `twitterHandles` | array | Optional | `[]` | Twitter usernames (without @) |
| `start` | string | Optional | — | Tweets after this date (YYYY-MM-DD or YYYY-MM-DD_HH:MM:SS_UTC) |
| `end` | string | Optional | — | Tweets before this date (YYYY-MM-DD or YYYY-MM-DD_HH:MM:SS_UTC) |
| `includeNativeRetweets` | boolean | Optional | `false` | Include native retweets in results |
| `onlyImages` | boolean | Optional | `false` | Only tweets containing images |
| `getReplies` | boolean | Optional | `false` | Include tweet replies |
| `minReplyCount` | number | Optional | — | Minimum reply count threshold |
| `getAboutData` | boolean | Optional | `false` | Fetch full profile about data |
| `maxItems` | number | Optional | Unlimited | Maximum tweets to return |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |

## How to Run

### Using run_actor.js (recommended)

```bash
# Quick answer (table)
node scripts/run_actor.js --actor "apidojo~twitter-profile-scraper" --input '{"twitterHandles": ["elonmusk"], "maxItems": 100}'

# Save as CSV
node scripts/run_actor.js --actor "apidojo~twitter-profile-scraper" --input '{"twitterHandles": ["elonmusk"], "maxItems": 100}' --output results.csv --format csv

# Save as JSON
node scripts/run_actor.js --actor "apidojo~twitter-profile-scraper" --input '{"twitterHandles": ["elonmusk"], "maxItems": 100}' --output results.json --format json
```

### REST API fallback

```bash
````
END THIRD-PARTY FILE 4f12440e82e1de27

The third-party file has ended. Everything between the 4f12440e82e1de27 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2638 of 4560 bytes. © apidojo · Apache-2.0 · https://github.com/apidojo-io/apidojo-skills/tree/HEAD/skills/primitives/scraping-twitter-profile-tweets/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
