Twitter Scraper avatar
Twitter Scraper
Try for free

Pay $1.50 for 1,000 tweets

View all Actors
Twitter Scraper

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 mode

Node.js

Python

curl

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": 200,
12  "maxRequestRetries": 6,
13  "handle": [
14    "@cnn"
15  ],
16  "urls": [
17    "https://twitter.com/search?q=gpt&src=typed_query&f=live"
18  ]
19}
20EOF
21
22# Run the Actor using an HTTP API
23# See the full API reference at https://docs.apify.com/api/v2
24curl "https://api.apify.com/v2/acts/microworlds~twitter-scraper/runs?token=$API_TOKEN" \
25  -X POST \
26  -d @input.json \
27  -H 'Content-Type: application/json'
Developer
Maintained by Community
Actor metrics
  • 4.4k monthly users
  • 97.1% runs succeeded
  • 0.4 days response time
  • Created in Jul 2023
  • Modified 21 days ago
Categories