There are 2 ways to get Twitter dataset, read below :
1. Get Twitter dataset using Trackmyhashtag
Fortunately, numerous third-party Twitter analytics tools can help you get access to it. One such tool is TrackMyHashtag. TrackMyHashtag is an AI-enabled paid Twitter analytics platform that provides access to historical Twitter data of any public Twitter account. You can request for a Twitter dataset related to any hashtag, keyword, or @mention.
Just go to Trackmyhashtag website
Click on Historical Data
Locate and fill the historical data request form.
Fill in your Twitter data requirements in the request form and the TrackMyHashtag team will get back to you with the pricing details.
2. Three kinds of API that you can leverage to pull data from Twitter.
Search API - Through search API you can download Twitter data related to any public Twitter account, hashtag, or keyword. Although the Search API has its own set of limitations. It only provides you access to the recent 3200 tweets including replies and retweets for each tweet posted by the user. As for hashtags and keywords the tweet limit is set to the recent 5000 tweets.
Streaming API - The Search API helps you extract historical Twitter data whereas with Streaming API you can extract real-time Twitter datasets. But similar to search API the Streaming API also has limitations. The Streaming API only provides you access to a sample of the required Twitter dataset. The sample size may vary from 1%-4% of total tweets for the hashtag or search term.
Firehose API - The Firehose API provides the same benefits as Streaming API but without its limitations. It is managed by third-party data providers and in no way suffers from any kind of infrastructure limitations that limits its functionality. It is managed by GNIP and DataSift, both reputed data providers that have close relations with Twitter. Firehose API can help you pull all tweets related to a hashtag or keyword in real-time.
Thank you!