apidojo-io/apidojo-skills

scraping-tweets-from-account

Scrapes all tweets, replies, and media from any Twitter/X account using apidojo's Tweet scraper on Apify.

소스 보기
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Scraping Tweets from an Account

Exports the full tweet history of any public Twitter/X account. Returns the raw timeline dataset including replies and media.

Prerequisites

  • APIFY_TOKEN environment variable set
  • Optional: Apify MCP server installed

Inputs

ParameterTypeRequiredDefaultNotes
searchTermsarray[]Twitter advanced search queries (e.g. ["#AI lang:en", "from:NASA"])
sortstringOptionalTopSort order: Latest, Top, or Latest+Top
tweetLanguagestringOptionalISO 639-1 language code (e.g. en)
maxItemsnumberOptionalUnlimitedMaximum tweets to return
onlyVerifiedUsersbooleanOptionalfalseOnly tweets from verified users
onlyTwitterBluebooleanOptionalfalseOnly Twitter Blue subscribers
onlyImagebooleanOptionalfalseOnly tweets with images
onlyVideobooleanOptionalfalseOnly tweets with videos
onlyQuotebooleanOptionalfalseOnly quote tweets
authorstringOptionalFilter to a specific author handle
inReplyTostringOptionalTweets replying to a specific handle
mentioningstringOptionalTweets mentioning a specific handle
geotaggedNearstringOptionalTweets near a location
withinRadiusstringOptionalRadius around geotaggedNear
geocodestringOptionalLat/lng + radius string
placeObjectIdstringOptionalTweets tagged with a place
minimumRetweetsnumberOptionalMinimum retweet count
minimumFavoritesnumberOptionalMinimum like count
minimumRepliesnumberOptionalMinimum reply count
startstringOptionalTweets after this date (YYYY-MM-DD)
endstringOptionalTweets before this date (YYYY-MM-DD)
includeSearchTermsbooleanOptionalfalseAdd the matched search term to each tweet
customMapFunctionstringOptionalJavaScript function to transform each output object

Workflow

Progress:
- [ ] Step 1: Confirm account is public
- [ ] Step 2: Run tweet-scraper
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Fetch and deliver dataset

Step 1: Validate Input

Strip @ from username if present. Do not attempt to scrape private accounts — the actor will return 0 results.

Step 2: Run the Actor

Recommended — run_actor.js (handles waiting, output, and file saving automatically):

bash
# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~tweet-scraper" \
  --input '{"param": "value"}'

# Save as CSV
node scripts/run_actor.js \
  --actor "apidojo~tweet-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.csv --format csv

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~tweet-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.json --format json
APIFY_TOKEN must be set in environment or .env file.

If Apify MCP is available:

Tool: apify:run-actor
Actor: "apidojo~tweet-scraper"
Input:
{
  "twitterHandles": ["<handle>"],
  "maxItems": 200,
  "sort": "Latest"
}

REST API fallback:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"twitterHandles": ["<handle>"], "maxItems": 200, "sort": "Latest"}'

Save id as RUN_ID. Poll until status = SUCCEEDED:

bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'

Fetch results:

bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"

Step 3: Handle Edge Cases

  • 0 results: Account may be private, suspended, or handle misspelled. Report to user.
  • Fewer results than expected: Account may have fewer public tweets than requested. Return what is available.
  • Protected account: Actor returns empty — inform user the account is private.

Output Format

# Tweet Timeline: @<username>
Tweets collected: N | Includes replies: YES/NO | Includes retweets: YES/NO

| Tweet ID | Text (truncated) | Likes | Retweets | Replies | Media | Timestamp |
|----------|-----------------|-------|----------|---------|-------|-----------|
| ...      | ...             | ...   | ...      | ...     | ...   | ...       |

Full dataset: N rows × 12 fields
Available fields: id, text, likeCount, retweetCount, replyCount, quoteCount,
isReply, isRetweet, media, tweetUrl, lang, createdAt

Troubleshooting

0 results for a known public account: Try again — Twitter may rate-limit intermittently. Missing older tweets: Twitter API limits historical access; very old tweets may not be available. Timeout: Reduce maxItems to 500 max per run.

같은 저장소의 Skills

더 많은 Skills

모든 Skills
apidojo-io
커뮤니티

finding-tiktok-creators-using-trending-sounds

Finds TikTok creators using trending sounds or viral audio tracks using apidojo's TikTok Music Scraper on Apify. Triggers when the user asks to: find creators using a specific TikTok sound, discover influencers using a trending audio clip, identify creators participating in a sound-based trend, find TikTok accounts using a viral music track, build a list of creators who made content with a specific sound, or find early adopters of a trending TikTok audio for brand placement. Returns creator username, follower count, views, likes, hashtags, and song metadata per post. Ideal for music labels, brand trend spotters, and influencer marketing teams.

설치 수
2
GitHub Stars
0
업데이트
5월 13일
apidojo-io
커뮤니티

scraping-google-search-results

Scrapes Google search results for any query using apidojo's Google Search scraper on Apify. Triggers when the user asks to: get Google search results for a keyword, scrape SERP data for a query, export Google results to a dataset, fetch URLs and snippets from Google for a search term, get all results from a Google search, or collect Google SERP data for multiple keywords. Returns URL, title, snippet, position, and SERP feature type per result. Ideal for SEO analysts, researchers, journalists, and competitive intelligence teams.

설치 수
2
GitHub Stars
0
업데이트
5월 13일
apidojo-io
커뮤니티

building-journalist-outreach-list-from-twitter

Builds targeted journalist and media contact lists from Twitter/X using apidojo's Twitter scrapers on Apify. Triggers when the user asks to: find journalists covering a specific beat or topic on Twitter, build a media outreach list from Twitter, identify reporters writing about an industry, find editors or writers at specific publications on X, create a PR contact list from Twitter, discover freelance journalists in a niche, or compile a list of media contacts for a press release or story pitch. Returns name, handle, publication affiliation from bio, follower count, and recent article topics. Ideal for PR agencies, startup communications teams, and founders doing press outreach.

설치 수
2
GitHub Stars
0
업데이트
5월 13일
apidojo-io
커뮤니티

discovering-pre-launch-startups-on-twitter

Discovers pre-launch startups and products on Twitter using apidojo's Twitter Search scraper. Triggers when the user asks to: find pre-launch startups on Twitter, discover companies building in stealth mode on X, find products in beta or waitlist mode on Twitter, identify early-stage startups before they launch publicly, find founders building in public before launch, discover startup waitlists or beta invites on Twitter, or research what new companies are building in a space. Returns startup handle, product description, waitlist/launch signals, stage, and niche. Ideal for VCs scouting early deals, accelerator scouts, and competitive intelligence teams.

설치 수
1
GitHub Stars
0
업데이트
5월 13일