🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper avatar

🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper

Try for free

Pay $0.40 for 1,000 tweets

Go to Store
🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper

🏯 Tweet Scraper V2 (Pay Per Result) - X / Twitter Scraper

apidojo/tweet-scraper
Try for free

Pay $0.40 for 1,000 tweets

⚡️ Lightning-fast search, URL, list, and profile scraping, with customizable filters. At $0.40 per 1000 tweets, and 30-80 tweets per second, it is ideal for researchers, entrepreneurs, and businesses! Get comprehensive insights from Twitter (X) now!

SS

Date filter is not working properly

Closed

ssamiullah61 opened this issue
19 days ago

{ "customMapFunction": "(object) => { return {...object} }", "end": "2025-01-16", "includeSearchTerms": false, "onlyImage": false, "onlyQuote": false, "onlyTwitterBlue": false, "onlyVerifiedUsers": false, "onlyVideo": false, "sort": "Latest", "start": "2025-01-15", "twitterHandles": [ "@ImranRiazKhan", "@HamidMirPAK", "@_Mansoor_Ali", "@MoeedNj", "@soldierspeaks", "@SHaiderRMehdi", "@ShazadAkbar", "@HassanNisar", "@javeednusrat", "@najamsethi", "@OryaMaqboolJan", "@Kashifabbasiary", "@mubasherlucman", "@dawn_com", "@ARYSabirShakir", "@ARYNEWSOFFICIAL", "@geonews_english", "@geonews_urdu", "@SaleemKhanSafi", "@TalatHussain12", "@iqrarulhassan", "@ImranKhanPTI", "@OfficialDGISPR", "@siasatpk" ] }

These are my input parameters where i have given multiple twitter handles, to extract their tweets from given date range but in result i have received tweets out from the given range in the input. Please provide me the assistance thanks

apidojo avatar

Hello,

twitterHandles and date filters are not working together. If you want to fetch a profile's tweets by date, please refer to the documentation for an example https://apify.com/apidojo/tweet-scraper#fetching-the-tweets-of-a-profile

Also, max 5 items are allowed in a run, please check the terms before using the actor https://apify.com/apidojo/tweet-scraper#important-note

Cheers

SS

ssamiullah61

17 days ago

Hi, Thanks for your response. I need your help. Currently i am working form my phd project for that i need to extract tweet from multiple twitter handles from Pakistan. The man idea is to create model for fake news detection.

  1. I have around 50 to 70 twitter handles
  2. I am trying to retrieve at least3 to 5 years of data.

Can you tell me if their is issue with it according to your policy ?

apidojo avatar

Hello,

As mentioned, you can refer to the documentation to learn how you can fetch historical tweets for an account.

You need to lower the amount of items you are batching to a single run to 5 and fetch min 50 tweets per handle and I think you are good to go.

Cheers

SS

ssamiullah61

17 days ago

Hi, Thanks for your response. Just final question: if a user profile contains 1000 tweets on his profile so i have to collect it in multiple runs and each run needs to collect 50 tweets for each profile right ? but if thats the case if i dont know the total tweets, how to handle this kind of problem with batching.

Plus if i want a customized api can i directly reach you for it ?

apidojo avatar

Hello,

Unfortunately there is no way to use the actor besides Apify. For your question about the limits, you need to come up with your own logic to resolve this issue. You can give a bigger timeframes first and then slowly. The purpose of this actor is to use deterministic queries.

Cheers

SS

ssamiullah61

11 days ago

Hi, Thanks for your response. What is the max limit to fetch the tweets per handle since you mentioned min is 50 tweets per handle?

Regards

apidojo avatar

Hello,

There is no max limit, you can fetch all of the tweets of a handle.

Cheers

SS

ssamiullah61

4 days ago

Hi, I need to ask the way it works. According to Doc, I can use

  1. Max 5 twitter handles (which I suppose is items) that will go under "twitterHandles" parameter through an API.
  2. Min 50 tweets per handle, which will go to "maxItems" field.
  3. Use "start" and "end" field for all the twitter handles. Meaning, if I need a data for 1 year or more I can simply write "start":"2024-01-01", "end":"2025-01-01" and I will get the data from mentioned dates for all the tweeter handles
  4. If there is no max limit, so I can simply mention the start and end dates and get all the data from max 5 tweeter profiles in one call. Kindly, correct me if I am wrong.

My questions are:

  1. If I want all the data in one shot, what should be in "maxItems" field? Empty?
  2. If using start date and end date, I can get all the data in mentioned time period for 5 handles in one run? No need for logic?
  3. Whats the purpose of since and until in search terms? If no max limit, then why it says we need to divide it per ~800 and then create the query per request?
  4. What parameter to use to exclude retweets in return?

Thanks

apidojo avatar

Hello,

1- There is no query that can get you the data in one shot, please refer to the documentation to learn how you can fetch the tweets of a profile https://apify.com/apidojo/tweet-scraper#fetching-the-tweets-of-a-profile

2- date filters don't work together with twitterHandles, please refer to the doc.

3- As mentioned, date filters are not working with twitterHandles. If you want to fetch a handle's tweets by date, you need to use twitter queries.

4- There are no parameter for that, you need to do this yourself after you fetch the tweets.

Cheers

SS

ssamiullah61

4 days ago

Hi, Thanks for the sweep response.

So I need to use "searchTerms" field and add "since" and "until" for max 5 twitter handles ("from") for 1 year of tweets (breaking it down in 800 per list)? So kinda like below:

Input

{ "searchTerms": [ "from:NASA since:2023-01-01 until:2023-03-01", "from:NASA since:2023-03-01 until:2023-05-01", "from:NASA since:2023-05-01 until:2023-07-01", "from:NASA since:2023-07-01 until:2023-09-01", "from:NASA since:2023-09-01 until:2023-12-01", "from:umair since:2023-01-01 until:2023-03-01", "from:umair since:2023-03-01 until:2023-05-01", "from:umair since:2023-05-01 until:2023-07-01", "from:umair since:2023-07-01 until:2023-09-01", "from:umair since:2023-09-01 until:2023-12-01" ], "onlyImage": "false", "onlyQuote": "false", "onlyTwitterBlue": "false", "onlyVerifiedUsers": "false", "onlyVideo": "false", "tweetLanguage": "en", "sort": "Latest", "customMapFunction": "(object) => { return {...object} }", }

Adding 3 more profiles in search term as above same as above

Thanks.

apidojo avatar

Hello,

You need to create separate runs for each of them if you are planning to batch 5 queries like this. Each run should have max 5 queries.

Please refer to the documentation.

Cheers

Developer
Maintained by Community

Actor Metrics

  • 2.1k monthly users

  • 482 stars

  • 87% runs succeeded

  • 3.7 hours response time

  • Created in Nov 2023

  • Modified 6 hours ago