scraping-twitter-profile-tweets

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 t…

API Dojo

@apidojo-io

Install

$ openclaw skills install @apidojo-io/scraping-twitter-profile-tweets

Scraping Twitter Profile Tweets

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


Inputs

ParameterTypeRequiredDefaultNotes
startUrlsarrayOptional[]Twitter profile URLs (x.com or twitter.com formats)
twitterHandlesarrayOptional[]Twitter usernames (without @)
startstringOptionalTweets after this date (YYYY-MM-DD or YYYY-MM-DD_HH:MM:SS_UTC)
endstringOptionalTweets before this date (YYYY-MM-DD or YYYY-MM-DD_HH:MM:SS_UTC)
includeNativeRetweetsbooleanOptionalfalseInclude native retweets in results
onlyImagesbooleanOptionalfalseOnly tweets containing images
getRepliesbooleanOptionalfalseInclude tweet replies
minReplyCountnumberOptionalMinimum reply count threshold
getAboutDatabooleanOptionalfalseFetch full profile about data
maxItemsnumberOptionalUnlimitedMaximum tweets to return
customMapFunctionstringOptionalJavaScript function to transform each output object

How to Run

Using run_actor.js (recommended)

# 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

curl -X POST "https://api.apify.com/v2/acts/apidojo~twitter-profile-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"twitterHandles": ["elonmusk"], "maxItems": 100}'

If Apify MCP is available: Use the Apify MCP call_actor tool with actor apidojo~twitter-profile-scraper and the input above.


Output Fields

FieldTypeDescription
typestringAlways tweet
idstringTweet ID
urlstringTweet URL (x.com)
twitterUrlstringTweet URL (twitter.com)
textstringTweet text content
retweetCountnumberRetweet count
replyCountnumberReply count
likeCountnumberLike count
quoteCountnumberQuote tweet count
bookmarkCountnumberBookmark count
createdAtstringCreation timestamp
langstringDetected language
isReplybooleanWhether this is a reply
isRetweetbooleanWhether this is a retweet
isQuotebooleanWhether this is a quote tweet
sourcestringTwitter client used
author.userNamestringAuthor @username
author.namestringAuthor display name
author.isVerifiedbooleanLegacy verification
author.isBlueVerifiedbooleanTwitter Blue verification
author.profilePicturestringAuthor profile picture URL
author.followersnumberAuthor follower count

Edge Cases

  • Private account: Returns 0 tweets. Tell user the account is private.
  • Account suspended: Returns error. Handle may be banned.
  • Very active account: Use maxItems to cap and control cost ($0.0004 per extra tweet).
  • Date range: Minimum 50 results needed for the query to run. If few tweets in range, widen date range.
  • Retweets in results: Actor returns all public tweets including retweets.

Top skills in this category