
Congress Stock Trades Scraper
scrape.ly/store/querystone/congress-trades-scraperNewsBusiness
3 monthly users

Scrape public posts from X (Twitter) profiles and tweet URLs: text, timestamps, likes, reposts, replies, views, media, and author details, straight from the logged-out page.
Public posts from X profiles, paginated to the size you ask for, with the author and the engagement counts that response actually includes.
Built for research, social listening, and anyone who needs a clean dataset of public posts without starting a browser.
NASA) or a profile URL walks the public timeline with the site’s own cursor until maxItems or the timeline ends.Top returns the most relevant posts. Latest returns recent posts via the search index, newest first: it looks at the past day, then widens to the past week and month. It is typically a few hours behind live X, so posts from the last hour or two may be missing. Location operators (near:, geocode:, place:) are not supported by this route. from:handle with language, image, video, verified, quote, Twitter Blue, and minimum-count filters is still read from that profile timeline.start and end keep posts on or after the start date and before the end date, in UTC.customMapFunction receives each post. The object it returns is the row that is stored.{
"maxItems": 20,
"sort": "Latest",
"tweetLanguage": "en",
"twitterHandles": [
"NASA"
]
}
One item from a real run of the example input, shortened. Long text is cut and lists show their first entries.
{
"type": "tweet",
"id": "2109435410850193473",
"url": "https://x.com/NASA/status/2109435410850193473",
"twitterUrl": "https://twitter.com/NASA/status/2109435410850193473",
"text": "RT @NASAJohnson: One. More. Day.\n\nFlight director applications close TOMORROW. Sharpen your pencils, steady your focus, and get ready to ma…",
"retweetCount": 76,
"replyCount": 0,
"likeCount": 0,
"quoteCount": 0,
"createdAt": "Mon Oct 12 00:06:08 +0000 2026",
"lang": "en",
"bookmarkCount": 0,
"author": {
"type": "user",
"userName": "NASA",
"url": "https://x.com/NASA",
"twitterUrl": "https://twitter.com/NASA",
"id": "11348282",
"name": "NASA",
"isBlueVerified": true,
"verifiedType": "Government",
"profilePicture": "https://pbs.twimg.com/…",
"followers": 92326677,
"following": 115
},
"mentions": [
{
"id": "50115087",
"userName": "NASAJohnson"
}
],
"isRetweet": true
}
You pay $0.0003 per tweet ($0.30 per 1,000 tweets) plus platform usage. Only saved posts are charged. Inputs that return nothing or fail never become dataset rows and cost nothing in event fees.
Worked example: 1,000 tweets ≈ $0.30 in event fees plus platform usage. On our test runs at the default 512 MB, usage was about $0.0017 for 100 tweets and about $0.0008 for the 20-tweet example input, so 1,000 tweets come to roughly $0.32 in total.
Set a maximum charge for the run if you want a hard cap. The run then stops cleanly once it is reached and keeps every post saved so far.
Use the same field names as the console form.
| Field | What it does |
|---|---|
twitterHandles | Profiles to read. @ is optional. |
startUrls | Profile URLs, tweet URLs, list URLs, search URLs, or profile tabs. |
searchTerms | Advanced-search text. from:handle with the supported filters is read from the profile timeline. |
conversationIds | Focal status ids. |
maxItems | Stop after this many posts. The default on the form is 20. |
sort | Latest, Top, or Latest + Top. For keyword search, Latest means recent posts via a search index (typically a few hours behind live X). A profile timeline is the order that timeline returns. Latest + Top does not fetch the same profile twice. |
tweetLanguage | lang: filter on a from:handle timeline. |
onlyVerifiedUsers | Keep verified or Twitter Blue authors on that timeline. |
onlyTwitterBlue | Keep Twitter Blue authors on that timeline. |
onlyImage / onlyVideo / onlyQuote | Keep posts with a photo, a video, or a quote. |
author, inReplyTo, mentioning | Kept when the post is from that account, a reply to that account, or mentions that account. |
minimumRetweets, minimumFavorites, minimumReplies | Minimum counts on a from:handle timeline. |
start / end | Date window on a from:handle timeline. |
includeSearchTerms | Adds searchTerm with the handle or query that found the post. |
customMapFunction | JavaScript function that receives each post. The object it returns is stored. If it throws, or returns nothing for a post, the run stores no rows. |
geotaggedNear, withinRadius, geocode, placeObjectId | Place-tagged posts for that place. A radius keeps places whose center falls inside it. |
A /highlights profile URL reads that account’s highlights timeline. /media keeps posts that have a photo or video. /with_replies keeps replies written by that account. A list URL keeps posts from that list. /articles reads that account’s articles timeline. An account with no articles stores no posts and no failed item.
Each post is one dataset item. Keys appear only when the response sent a value.
| Field | Meaning |
|---|---|
id, url, twitterUrl, text, createdAt, lang | The post. createdAt is the UTC timestamp from the response. |
fullText | The whole post text. For a long post this is the expanded note text, where text is cut short. |
conversationId, source | Thread id and posting client, when the response sends them (profile timelines do). |
retweetCount, replyCount, likeCount, quoteCount, bookmarkCount | Counts from the response, including zero. |
viewCount | Present when the response includes a view count. Profile timeline pages often omit it. |
possiblySensitive | Present when the response sends it, including false. |
author | userName, name, id, url, twitterUrl, isBlueVerified, verifiedType, profilePicture, followers, following, plus description, location, createdAt, statusesCount, mediaCount, favouritesCount, coverPicture, isProtected when sent. |
media | type, mediaUrl, expandedUrl, width, height, altText (when the author wrote one), and videoUrl / durationMillis for videos. |
mentions, hashtags, urls, card | Included when the post has them. |
isReply, inReplyToId, inReplyToUserName, inReplyToUserId | Set when the post is a reply. |
isRetweet, retweet | Set when the post is a retweet. retweet is the reposted post with the same fields. |
isQuote, quoteId, quote | Set when the post is a quote. quoteId only when an id was sent; quote is the quoted post when X embeds it. |
searchTerm | Set when includeSearchTerms is on. |
A failed input does not create a dataset row. It is listed in the run's OUTPUT key-value record as failedInputs: [{input, reason}] and summarised in the status message. reason is a short status such as HTTP 404 list_unavailable, HTTP 200 no_timeline, user_unavailable, or no public posts matched the search. It does not include the response body.
pip install -r requirements.txt
python -m src
On Scrapely the actor asks for a residential proxy session and 1024 MB.
Every field below can be set in the run form, passed through the API, or saved as a task. Unset fields fall back to the defaults shown.
startUrlsarrayOptionalStart URLs
Twitter (X) URLs. Tweet, profile, search, list, replies, media, highlights, and articles URLs are supported. A likes URL is rejected.
searchTermsarrayOptionalSearch Terms
Search terms you want to search from Twitter (X). You can refer to https://github.com/igorbrigadir/twitter-advanced-search.
twitterHandlesarrayOptionalTwitter handles
Twitter handles that you want to search on Twitter (X)
conversationIdsarrayOptionalConversation IDs
Conversation IDs that you want to search on Twitter (X)
maxItemsintegerOptionaldefault 20Maximum number of items on output
Maximum number of items that you want as output.
Narrow down which tweets are returned.
tweetLanguageenumOptionalTweet language
Restricts tweets to the given language, given by an ISO 639-1 code.
onlyVerifiedUsersbooleanOptionalOnly verified users
If selected, only returns tweets by users who are verified.
onlyTwitterBluebooleanOptionalOnly Twitter Blue
If selected, only returns tweets by users who are Twitter Blue subscribers.
onlyImagebooleanOptionalOnly image
If selected, only returns tweets that contain images.
onlyVideobooleanOptionalOnly video
If selected, only returns tweets that contain videos.
onlyQuotebooleanOptionalOnly quote
If selected, only returns tweets that are quotes.
minimumRetweetsintegerOptionalMinimum retweets
Returns tweets with at least the given number of retweets.
minimumFavoritesintegerOptionalMinimum favorites
Returns tweets with at least the given number of favorites.
minimumRepliesintegerOptionalMinimum replies
Returns tweets with at least the given number of replies.
startstringOptionalStart date
Returns tweets sent after the given date.
endstringOptionalEnd date
Returns tweets sent before the given date.
Sorting and extra search operators.
sortenumOptionaldefault "Latest"Sort By
Sorts keyword search results. Top: the most relevant public posts. Latest: recent posts via a search index, newest first, typically a few hours behind live X (past day first, widening to the past week and month). Latest + Top runs both and removes duplicates. Profile timelines are always newest first.
authorstringOptionalTweet author
Returns tweets sent by the given user. It should be a Twitter (X) Handle.
inReplyTostringOptionalIn reply to
Returns tweets that are replies to the given user. It should be a Twitter (X) Handle.
mentioningstringOptionalMentioning
Returns tweets mentioning the given user. It should be a Twitter (X) Handle.
geotaggedNearstringOptionalGeotagged near
Returns tweets sent near the given location.
withinRadiusstringOptionalWithin radius
Returns tweets sent within the given radius of the given location.
geocodestringOptionalGeocode
Returns tweets sent by users located within a given radius of the given latitude/longitude.
placeObjectIdstringOptionalPlace object ID
Returns tweets tagged with the given place.
includeSearchTermsbooleanOptionalInclude Search Terms
If selected, a field will be added to each tweets about the search term that was used to find it.
customMapFunctionstringOptionalCustom map function
JavaScript function that receives each post and returns the object to store. That return value replaces the post. If the function throws, the run fails and stores nothing. If it returns nothing, that post is omitted, and if any post is omitted the run fails and stores nothing.
Every run writes its results to a dataset. Preview it in the dashboard, then export it or read it through the API.
| Field | Type | Description |
|---|---|---|
| url | any | URL |
| twitterUrl | any | Twitter URL |
| id | any | ID |
| text | any | Text |
| retweetCount | any | Retweet Count |
| replyCount | any | Reply Count |
| likeCount | any | Like Count |
| quoteCount | any | Quote Count |
| createdAt | any | Created At |
| bookmarkCount | any | Bookmark Count |
| isRetweet | any | Is Retweet |
| isQuote | any | Is Quote |
You pay for the events the actor reports, such as each result or page it produces. Platform usage is included in the event prices.
| Event | Charged when | Price |
|---|---|---|
| Tweet | One post (tweet) saved to the dataset. | $0.0003 |
Run this actor from your own code. Swap in your API token and the examples work as-is.
import { ScrapelyClient } from 'scrapely-client'
const client = new ScrapelyClient({ token: process.env.SCRAPELY_TOKEN })
// Start the actor and wait for the run to finish.
const run = await client.actor('echofield/tweet-scraper').call({
"twitterHandles": [
"NASA"
],
"maxItems": 20,
"sort": "Latest",
"customMapFunction": "(object) => { return {...object} }"
})
// Read the dataset the run produced.
const { items } = await client.dataset(run.defaultDatasetId).listItems()
console.log(items)Tokens live in your account settings. Keep them server-side: a token carries the full permissions of your account.
Connect the Scrape.ly MCP server once and your agent can run this actor as a tool. Pick your tool:
Fetch scrape.ly/agents.md and run echofield/tweet-scraperPaste into Claude Code, Codex, Cursor or any AI agent. It signs you in once in the browser.
{
"mcpServers": {
"scrapely": {
"url": "https://api.scrape.ly/mcp?tools=actors,runs,storage,docs&actors=echofield/tweet-scraper"
}
}
}No key in the file: your client opens the browser to sign you in the first time it connects.
Inputs the developer prepared for common jobs. Open one to see its input, then copy it to your account to run it as-is or adjust it.
Recent English tweets from a handle.
Top tweets for a keyword search.
Tweets from a pasted X status link.
Only tweets that include an image.
Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes. The advantage lasts forever.