How to Scrape Twitter Search Results without coding [2024 Edition]

Shehriar Awan
March 15, 2024

9 min read

Want to analyze Twitter trends without complex code? Twitter (now X) is a goldmine of opinions and real-time reactions, but accessing that data often feels out of reach for non-coders.

scrape twitter search results - image10.png

In this article, we’re going to learn how to scrape Twitter search results i.e. top and latest tweets from any search query, hashtag, or trend – without coding and absolutely for free.

But why would anyone want to scrape X trends data? Let’s explore some use cases.

Why scrape Twitter search results?

With over 420 million monthly active users, Twitter is one of the most engaging social media platforms. Extracting Twitter data can help:
twitter similarweb - image2.png
  1. Marketers: Track brand mentions, campaign performance, and analyze sentiment around your products or services.
  2. Researchers: Study public opinion, track social movements, and analyze language trends on Twitter.
  3. Businesses: Identify potential leads, collect customer feedback, and improve overall customer service.
  4. Competitive Analysis: Monitor what people are saying about your competitors' products, services, and overall brand image.
  5. Training Machine Learning Models: Train various ML models like sentiment analysis classifiers, topic modeling algorithms etc

But is it legal to scrape Twitter search data?

Web scraping is legal until you’re only scraping publicly available data and no personal information is being collected.

At least that’s what people believe:
is scraping legal - image22.png

But is it true? Well, we can’t decide based on a random reddit opinion. So upon further research, I found 2 most relevant and recent law-suites about legality of scraping.

  1. Meta vs BrandTotal
  2. LinkedIn vs HiQ Labs
In the Meta vs BrandTotal case, Meta alleged that Israeli ad firm BrandTotal was collecting user information without permission.
meta vs brandtotal - image1.png

A federal judge ruled that BrandTotal violated Facebook's terms of use and anti-hacking laws.

Later BrandTotal updated its product, limiting itself to only public data collection; in return, Facebook agreed to cease action against the new version.

In a similar case – the famous LinkedIn vs HiQ Labs lawsuit, Linkedin sued HiQ Labs for scraping public user profiles. But the court ruled in favor of HiQ Labs.
linkedin vs hiq - image20.png

After the LinkedIn vs HiQ Labs case verdict, it has been solidified that scraping publicly available data is fully legal.

Since X search results are public tweets, they don’t have any copyright, and they don’t disclose any personal identifiable information, it’s fully legal to scrape them.

For a detailed understanding, we have a dedicated list of articles about web scraping legality.
But in the same reddit post I mentioned above, Mr. TheElectricSlide2 suggests using the official X API. Is he right about the official API?
use twitter api reddit comment - image21.png

Why not use the official Twitter API?

X (formerly Twitter) does offer an API for collecting and analyzing data. Then why don’t we use it? There are plenty of reasons for not doing so.

  1. It’s too expensive
  2. It has limitations
  3. You need coding skills
I’ve already discussed all these reasons in detail in my how to scrape user tweets article. Do check it out for a better understanding.

For a step by step tutorial on how to extract data from Twitter using python, check out this article: How to scrape Tweets with Python and requests in 2023?

Now let’s address the elephant in the room – how to scrape Twitter search results without any API and without coding a custom scraper?

How to scrape Twitter search results without coding?

The best way to scrape Twitter data is using no-code tools. That’s what we’re going to do. We’ll be using Twitter Search Results Scraper – the best no-code Twitter scraper in the market.
twitter search results scraper - image13.png

Cool features

  1. Scrape all latest and top tweets
  2. 25 vital data attributes e.g. tweet data, user data
  3. 125+ tweets per minute speed
  4. Cloud-based, no install required
  5. Schedule to scrape repeatedly and monitor
  6. Export data directly to Google Sheets and Amazon S3
  7. Developer-friendly API access

Pricing

lobstr pricing - image19.png
  1. Free: 56000 tweets per month
  2. Premium: €0.07 per 1000 tweets
  3. Business: €0.05 per 1000 tweets
  4. Enterprise: €0.03 per 1000 tweets

Now let’s get started ✨

Step by step guide to scraping Twitter search results using Lobstr.io

We’re going to scrape tweets from a Twitter trend published during a certain date range. We’ll do this in 6 really simple steps.

  1. Get Twitter search URL
  2. Create squid and Sync account
  3. Add tasks
  4. Adjust behavior
  5. Launch
  6. Enjoy

Let’s go!!! 💨

Step 1 - Get Twitter search URL

First step is to get the search URL from Twitter.

With Lobstr, you can scrape both top and latest tweets from any trend or search query by simply copying and pasting the search URL.

We’re going to scrape all top tweets on #bitcoin posted between March 9 - March 13, 2024. Let’s use Twitter advanced search to add date range.

twitter advanced search - image18.png
Now simply copy the URL. If you want to scrape the latest tweets, move to the Latest tab and then copy the URL. It’ll have a f=live parameter.
get twitter search url - image4.png

Now let’s move to the next step.

Step 2 - Create Squid and sync Twitter account

Next, go to your lobstr.io dashboard. Don’t have an account yet? It’s free! Go create one first. Once you’re in, click the new squid button and search ‘Twitter’.

create squid - image6.png

Select Twitter Search Results Scraper and you’ll see a new pop-up window asking you to sync a Twitter account.

sync twitter account - image17.png
Last year, X decided to hide tweets behind login to prevent AI data scraping. You can access tweets data only if you’re logged in. That’s why we need you to sync your account.
To sync your Twitter account, all you have to do is install the Lobstr account sync Chrome extension. No login credentials needed, totally safe.
lobstr account sync addon - image15.png

Once the Chrome Addon is installed, click Yes I want to sync, and you’re good to go.

Step 3 - Add tasks

This step is easy peasy. Just paste the Twitter search URL you copied in step 1 and click Add+. That’s it. But what if I’ve hundreds of URLs?

add url to tasks - image11.png
You can add as many tasks as you please, but doing it manually is time consuming. For that, you can use the upload file option and upload all tasks in bulk in a single click.

After adding tasks, click Save and you’ll see the settings menu.

Step 4 - Adjust behavior

In basic settings, you can choose the number of tweets to scrape per task. Want to scrape all tweets? Just leave it blank. I need 250 tweets only, so let’s set Max Results to 250.

set max results - image5.png

When to end run option will help you configure the freshness and quantity of data. If you want to collect fresh tweets every time the scraper runs, select the first option.

If you need all tweets available on a search query/trend, select the second option. It’s best for scraping tweets posted in specific date ranges.

set concurrency - image7.png

In advanced settings, you can give your crawler super speed. Use concurrency to increase the number of bots deployed per job.

more concurrency (more no. of bots) = more speed

You can remove duplicate results by toggling Unique Results, and for a better output in Excel, remove the line breaks from text using the No Line Breaks option.

After adjusting the crawler's behavior, click Save to move to notifications.

set notifications - image14.png

You can opt to receive email notifications when a run completes successfully or stops due to any issue.

Now we’re ready to launch 🚀

Step 5 - Launch

For instant data collection, you can launch the scraper manually. Just click the Save & Extract button and your data collection will begin.

launch manually - image9.png

But what if I want to monitor a trend continuously and collect fresh tweets every week or every day? That’s where the schedule feature comes into play.

You can schedule the Twitter search results scraper to run automatically and repeatedly on time and date of your choice. Whether it’s hourly, daily, weekly, or monthly.

schedule launch - image16.png

For example, I can schedule this crawler to collect the latest tweets every 2 hours, starting at 10 AM.

After setting your launch preferences, click Save and your launch sequence is complete. ✨

crawler console - image12.png

Step 6 - Enjoy

And here we go, in less than 2 minutes, we’ve collected 250 top tweets with 25 data attributes, from #bitcoin, filtered by date range.

download results - image8.png
You can view the results in the dashboard or download them as a csv file. Comfortable with Excel? Here’s how to convert csv to Excel.
results csv file - image3.png

But what if I want to export them directly to Google Sheet?

You can use the Delivery button to configure your crawler to directly send the collected data to a Google Sheet or Amazon S3.

That’s it. We just extracted 250 tweets from a Twitter trend in less than 2 minutes. Now let me answer some frequently asked questions for you.

FAQs

Does Twitter Search Results Scraper also offer data in JSON format?

No, you can only download data as csv or export it to any of the delivery options available. But you can easily convert CSV to JSON using this tool.

How many tweets can you scrape?

There’s no rate limit at crawler level. You can scrape all tweets available on a Twitter trend or search query using this automation.

How to collect all tweets from a Twitter profile?

You can use Twitter User Tweets Scraper to scrape all tweets from any public Twitter account.

How to scrape Twitter profile data?

Use our no-code Twitter Profile Scraper for collecting all vital data about public Twitter profiles.

How can I scrape data from Twitter using Python?

You can use python libraries like tweepy for web scraping Twitter that utilizes X API, or try scraping tools like snscrape and twint. But they’re complex, and have limitations.
For collecting twitter data at scale, you can also use Lobstr’s API with python or any other language of your choice.

Conclusion

That’s a wrap on scraping Twitter search results without coding. Try the Twitter Search Results Scraper – it’s free forever.

Check out Lobstr’s store for more amazing web scraping tools. Didn’t find what you were looking for? Submit your idea here.
Shehriar Awan - Content Writer at Lobstr.ioShehriar Awan

Self-proclaimed Head of Content @ lobstr.io. I write all those awesome how-tos, listicles, and (they deserve) troll our competitors.

Related Articles

Related Squids