CA
sunny-green
I'm very new to Apify and APIs in general, how do I get the latest tweet with a scraper?
I'll be using JS to get all the info.
13 Replies
absent-sapphire•2y ago
Hi @Basel_Dev
absent-sapphire•2y ago
You can use this Twitter scraper for that purpose - https://apify.com/microworlds/twitter-scraper
Apify
Twitter Scraper · Apify
Twitter Scraper searches and extracts data from Twitter - parses and converts the data to structured formats: HTML table, JSON, CSV, Excel and XML.
absent-sapphire•2y ago
You can specify the search mode. To get latest results, set the search mode to
Live
sunny-greenOP•2y ago
Ah, I'm looking to do that on a specific profile though
absent-sapphire•2y ago

absent-sapphire•2y ago
Yes, you can provide a search URL.
E.g., to get the latest tweets from the twitter account
elonmusk
, you can pass in the URL:
https://twitter.com/search?q=(from%3Aelonmusk)&src=typed_query&f=livesunny-greenOP•2y ago
Thank you so much!
How do I automate this with Nodejs though?
absent-sapphire•2y ago
I am running a sample for you, will soon complete 👍
sunny-greenOP•2y ago
Is there any tutorial on how to export these results automatically, so that my code can use them?
absent-sapphire•2y ago
absent-sapphire•2y ago
I think you can simply use Apify's APIs for this
absent-sapphire•2y ago
As per running the scraper and getting the results in Node js, here's the API docs:
https://docs.apify.com/api/v2#/reference/actors/run-actor-synchronously-and-get-dataset-items/run-actor-synchronously-with-input-and-get-dataset-items
sunny-greenOP•2y ago
Thank you!