
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
13.2k
Monthly users
41
Runs succeeded
>99%
Last modified
7 months ago
How to limit my search query for particular region e.g. India
Closed
How to limit my search query for particular region e.g. India instead of extracting data from all over world for keyword/hashtag.

You can use the lang
operator on searches. See example:
1{ 2 "addUserInfo": true, 3 "maxRequestRetries": 5, 4 "maxTweets": 100, 5 "maxTweetsPerQuery": 100, 6 "scrapeTweetReplies": true, 7 "searchMode": "live", 8 "searchTerms": [ 9 "#gpt (lang:hi)" 10 ] 11}
Sample run - https://console.apify.com/view/runs/VkyOa6E6mwT60v0Sb
kishore.paluri
If i have the lang operator in search, tweets will be filtered written in that language but not the users in that language. My question is how can i filter the tweets only from Indian users irrespective of writing in English or Hindi or any other language

Oh, I get. You can use the near
, place
, geocode
, place
, within
operators. Please look up this documentation - https://github.com/igorbrigadir/twitter-advanced-search and check the "Geo" section. Please note that pulling tweets for the exact location might not always be 100% accurate.
kishore.paluri
I'm trying to extract data with country code ("country_code":"in"), but it is extracting all locations data. Here is the documentation i followed to restrict data with country code https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/geo#place

Sorry, the documentation is not similar to the one I provided. Unfortunately, the actor only works with docs I shared 😢
kishore.paluri
Hi David, Document I have provided is extension to the one you have provided only. With in the document you have provided, if you can go to Geo -> Place -> Search tweets by Place Object ID eg: USA Place ID. There you have link to know, how we can provide place object ID. Could you please check and let me know how i can filter only India region tweets. Thanks in advance. Regards, Kishore
kishore.paluri
I have also tried extracting the data using geocode, but it still give results from other regions. Below is the piece of code i have used. latitude = 20.5937 longitude = 78.9629 max_range = 1000 # this is the maximum range in kilometers geocode = "%f,%f,%dkm" % (latitude, longitude, max_range)

Sorry, location filters are inherently unstable. The actor only tries to pull results at best efforts. The accuracy is not guaranteed, sadly 😢