π― Twitter (X) User Scraper (Pay Per Result)
Pay $0.30 for 1,000 users
π― Twitter (X) User Scraper (Pay Per Result)
Pay $0.30 for 1,000 users
Introducing Twitter (X) User Scraper, the ultimate solution for direct user extraction from Twitter (X). It offers blazing speed and comprehensiveness, delivering lightning-fast user extraction features.
You can access the π― Twitter (X) User Scraper (Pay Per Result) programmatically from your own Python applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, youβll need an Apify account and your API token, found in Integrations settings in Apify Console.
1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "startUrls": [
10 "https://twitter.com/apify",
11 "https://twitter.com/BillGates",
12 "https://twitter.com/SpaceX/status/1725852544587727145",
13 "https://twitter.com/search?q=elon&src=typed_query",
14 ],
15 "searchTerms": [
16 "elonmusk",
17 "taylorswift13",
18 ],
19 "maxItems": 1000,
20 "twitterHandles": [
21 "elonmusk",
22 "taylorswift13",
23 ],
24 "twitterUserIds": [
25 "44196397",
26 "17919972",
27 ],
28 "customMapFunction": "(object) => { return {...object} }",
29}
30
31# Run the Actor and wait for it to finish
32run = client.actor("apidojo/twitter-user-scraper").call(run_input=run_input)
33
34# Fetch and print Actor results from the run's dataset (if there are any)
35print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
36for item in client.dataset(run["defaultDatasetId"]).iterate_items():
37 print(item)
38
39# π Want to learn more π? Go to β https://docs.apify.com/api/client/python/docs/quick-start
π― Twitter (X) User Scraper (Pay Per Result) API in Python
The Apify API client for Python is the official library that allows you to use π― Twitter (X) User Scraper (Pay Per Result) API in Python, providing convenience functions and automatic retries on errors.
Install the apify-client
pip install apify-client
Other API clients include:
- 155 monthly users
- 23 stars
- 98.1% runs succeeded
- 3.1 hours response time
- Created in Nov 2023
- Modified about 15 hours ago