![Twitter Scraper avatar](https://images.apifyusercontent.com/thSdIYEaPYbSW8Hb66-ZMlEFk9UFEQusUxDPW9uifao/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vaGVMTDZmVW9mZFBnUlhaaWUvNElYdG1jaWQ4MmY5b2dKVUctdHdpdHRlci5wbmc.webp)
Twitter Scraper
Try for free
Pay $1.50 for 1,000 tweets
View all Actors![Twitter Scraper](https://images.apifyusercontent.com/thSdIYEaPYbSW8Hb66-ZMlEFk9UFEQusUxDPW9uifao/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vaGVMTDZmVW9mZFBnUlhaaWUvNElYdG1jaWQ4MmY5b2dKVUctdHdpdHRlci5wbmc.webp)
![Twitter Scraper](https://images.apifyusercontent.com/thSdIYEaPYbSW8Hb66-ZMlEFk9UFEQusUxDPW9uifao/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMudXMtZWFzdC0xLmFtYXpvbmF3cy5jb20vaGVMTDZmVW9mZFBnUlhaaWUvNElYdG1jaWQ4MmY5b2dKVUctdHdpdHRlci5wbmc.webp)
Twitter Scraper
microworlds/twitter-scraper
Try for free
Pay $1.50 for 1,000 tweets
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.
The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more
1# Set API token
2API_TOKEN=<YOUR_API_TOKEN>
3
4# Prepare Actor input
5cat > input.json <<'EOF'
6{
7 "searchTerms": [
8 "apify"
9 ],
10 "searchMode": "live",
11 "maxTweets": 1000,
12 "maxTweetsPerQuery": 1000,
13 "maxRequestRetries": 6,
14 "handle": [
15 "@cnn"
16 ],
17 "urls": [
18 "https://twitter.com/search?q=gpt&src=typed_query&f=live"
19 ]
20}
21EOF
22
23# Run the Actor using an HTTP API
24# See the full API reference at https://docs.apify.com/api/v2
25curl "https://api.apify.com/v2/acts/microworlds~twitter-scraper/runs?token=$API_TOKEN" \
26 -X POST \
27 -d @input.json \
28 -H 'Content-Type: application/json'
Developer
Maintained by Community
Actor metrics
- 708 monthly users
- 57 stars
- 99.4% runs succeeded
- 3.9 days response time
- Created in Jul 2023
- Modified 19 days ago
Categories