
Twitter Scraper
Deprecated
Pricing
$1.50 / 1,000 tweets

Twitter Scraper
Deprecated
Twitter Scraper searches and extracts data from Twitter (with historic data from 2006) - parses and converts the data to structured formats: HTML table, JSON, CSV, Excel and XML.
5.0 (1)
Pricing
$1.50 / 1,000 tweets
61
Total users
13K
Monthly users
41
Runs succeeded
>99%
Last modified
9 months ago
the time range function doesn't work
Closed
I want to scrape a user's tweets of last month and I set the sinceDate and untilDate values, but the items got in result is still the latest date.

The date filters only apply when you are using the searchTerms
option.
metal_jar
thanks for reply. is there any way for me to scrape a user's all tweets in last week?
qback_au
@Caleb; even when using the searchTerms option the date filters aren't respected.
e.g. querying for tweets since yesterday and receiving tweets from months ago

Hi metal_jar, here's an example of scraping all tweets within 7 days from the user handle @apify
.
{"addUserInfo": true,"maxRequestRetries": 6,"maxTweets": 5,"scrapeTweetReplies": true,"searchMode": "live","searchTerms": ["(from:apify) until:2024-03-22 since:2024-03-14"]}See the example run: https://console.apify.com/view/runs/PUjYxInivC241swYhHope that helps

Hi qback_au, can you please share with me a sample run?
qback_au
@Caleb - See this run - date filters not working

That is because there were no results for your provided search query (see image below). Since you provided the handle
, the actor proceeded to pull data from that handle, this time without date filters. Please double-check Twitter UI to see if your queries yield any results before using it on the actor 🙂
qback_au
Please double-check Twitter UI to see if your queries yield any results before using it on the actor 🙂
That defeats the point of scraping programmatically doesn't it?
Since you provided the handle, the actor proceeded to pull data from that handle, this time without date filters.
Can this unexpected behaviour be prevented through a different input? Just not providing the handle attribute?

That defeats the point of scraping programmatically doesn't it?
I mean that you should do a few tests search on the UI and ensure that it yields results before running the scrape. E.g., ensure that all the search filters used COULD potentially yield results before running it at scale/automatically on the actor
Can this unexpected behavior be prevented through a different input? Just not providing the handle attribute?
Yes, leaving that input blank will do the trick.
I hope that helps! 😅
metal_jar
@Caleb thanks a lot for your example config, I will try it out.
metal_jar
@Caleb I tried it and indeed can collect 20 pieces of data, that is to say, after I enabled the service, I can obtain all the posts within the specified time range ? There is also a question that needs to be consulted. I have set "scrapeTweetReplies": True here, but the returned result does not have the reply content. May I ask how to obtain the reply content?

Hi metal_jar,
I can obtain all the posts within the specified time range ?
Yes, that is correct.
May I ask how to obtain the reply content?
The scrapeTweetReplies
option only works when you're scraping a tweet URL e.g., https://twitter.com/Tesla/status/177523894550621000, not on searches or tweet handles