
Twitter Tweets and Profiles Scraper
6 hours trial then $30.00/month - No credit card required now

Twitter Tweets and Profiles Scraper
6 hours trial then $30.00/month - No credit card required now
Easily search and extract tweets from profiles or directly using a URL with our tool. Scrape tweets and replies effortlessly. Download data in formats like JSON, CSV, XML, RSS, or HTML Table, perfect for integration with various applications, databases, and social media analytics tools.
You can access the Twitter Tweets and Profiles Scraper programmatically from your own applications by using the Apify API. You can 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.
1{
2 "openapi": "3.0.1",
3 "info": {
4 "version": "0.1",
5 "x-build-id": "M6CQVqFtyZXMar4mx"
6 },
7 "servers": [
8 {
9 "url": "https://api.apify.com/v2"
10 }
11 ],
12 "paths": {
13 "/acts/web.harvester~twitter-scraper/run-sync-get-dataset-items": {
14 "post": {
15 "operationId": "run-sync-get-dataset-items-web.harvester-twitter-scraper",
16 "x-openai-isConsequential": false,
17 "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18 "tags": [
19 "Run Actor"
20 ],
21 "requestBody": {
22 "required": true,
23 "content": {
24 "application/json": {
25 "schema": {
26 "$ref": "#/components/schemas/inputSchema"
27 }
28 }
29 }
30 },
31 "parameters": [
32 {
33 "name": "token",
34 "in": "query",
35 "required": true,
36 "schema": {
37 "type": "string"
38 },
39 "description": "Enter your Apify token here"
40 }
41 ],
42 "responses": {
43 "200": {
44 "description": "OK"
45 }
46 }
47 }
48 },
49 "/acts/web.harvester~twitter-scraper/runs": {
50 "post": {
51 "operationId": "runs-sync-web.harvester-twitter-scraper",
52 "x-openai-isConsequential": false,
53 "summary": "Executes an Actor and returns information about the initiated run in response.",
54 "tags": [
55 "Run Actor"
56 ],
57 "requestBody": {
58 "required": true,
59 "content": {
60 "application/json": {
61 "schema": {
62 "$ref": "#/components/schemas/inputSchema"
63 }
64 }
65 }
66 },
67 "parameters": [
68 {
69 "name": "token",
70 "in": "query",
71 "required": true,
72 "schema": {
73 "type": "string"
74 },
75 "description": "Enter your Apify token here"
76 }
77 ],
78 "responses": {
79 "200": {
80 "description": "OK",
81 "content": {
82 "application/json": {
83 "schema": {
84 "$ref": "#/components/schemas/runsResponseSchema"
85 }
86 }
87 }
88 }
89 }
90 }
91 },
92 "/acts/web.harvester~twitter-scraper/run-sync": {
93 "post": {
94 "operationId": "run-sync-web.harvester-twitter-scraper",
95 "x-openai-isConsequential": false,
96 "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97 "tags": [
98 "Run Actor"
99 ],
100 "requestBody": {
101 "required": true,
102 "content": {
103 "application/json": {
104 "schema": {
105 "$ref": "#/components/schemas/inputSchema"
106 }
107 }
108 }
109 },
110 "parameters": [
111 {
112 "name": "token",
113 "in": "query",
114 "required": true,
115 "schema": {
116 "type": "string"
117 },
118 "description": "Enter your Apify token here"
119 }
120 ],
121 "responses": {
122 "200": {
123 "description": "OK"
124 }
125 }
126 }
127 }
128 },
129 "components": {
130 "schemas": {
131 "inputSchema": {
132 "type": "object",
133 "properties": {
134 "startUrls": {
135 "title": "Profiles or Tweets URLs.",
136 "type": "array",
137 "description": "",
138 "default": [],
139 "items": {
140 "type": "object",
141 "required": [
142 "url"
143 ],
144 "properties": {
145 "url": {
146 "type": "string",
147 "title": "URL of a web page",
148 "format": "uri"
149 }
150 }
151 }
152 },
153 "handles": {
154 "title": "Twitter usernames, e.g. elonmusk or @elonmusk.",
155 "type": "array",
156 "description": "",
157 "items": {
158 "type": "string"
159 }
160 },
161 "userQueries": {
162 "title": "Users search queries, e.g. elon musk.",
163 "type": "array",
164 "description": "A list of search queries for Twitter users. The scraper will scrape the tweets of the users returned by the search query.",
165 "items": {
166 "type": "string"
167 }
168 },
169 "tweetsDesired": {
170 "title": "Maximum number of tweets (per profile or url). Limited to ~800 per profile without replies and ~3200 with replies.",
171 "type": "integer",
172 "description": "By setting this to 0, it will scrape only the profile info (for profiles only)",
173 "default": 100
174 },
175 "repliesDepth": {
176 "title": "(New) Replies depth (Read the description!) (Keep empty for old behavior!)",
177 "minimum": 0,
178 "maximum": 20,
179 "type": "integer",
180 "description": "How many levels of replies should be scraped. 0 means no replies, 1 means the tweet and its replies, 2 means the tweet, its replies and the replies of the replies, etc."
181 },
182 "profilesDesired": {
183 "title": "Maximum number of profiles per (only for Users search queries)",
184 "type": "integer",
185 "description": "This value lets you set the maximum number of profiles to retrieve per search query (for \"Users search queries\")",
186 "default": 10
187 },
188 "withReplies": {
189 "title": "Tweets & Replies (for profiles only)",
190 "type": "boolean",
191 "description": "Scrape tweets and replies to tweets (enabling this increases the number of tweets per profile to ~3200), e.g. https://x.com/elonmusk/with_replies",
192 "default": true
193 },
194 "includeUserInfo": {
195 "title": "Include the profile user info in every tweet result (Now will get userId!)",
196 "type": "boolean",
197 "description": "This will add the profile user info to every tweet result. This is useful if you want to scrape tweets from multiple profiles and want to know which profile each tweet belongs to.",
198 "default": true
199 },
200 "since": {
201 "title": "Tweets newer than (since)",
202 "type": "string",
203 "description": "This lets you specify the oldest date of tweets to extract, format <code>YYYY-MM-DD</code>. You can also use relative dates such as '1 month' or '2 days' instead of absolute dates such as '2020-02-29'."
204 },
205 "proxyConfig": {
206 "title": "Proxy configuration (RESIDENTIAL recommended)",
207 "type": "object",
208 "description": "",
209 "default": {
210 "useApifyProxy": true,
211 "apifyProxyGroups": [
212 "RESIDENTIAL"
213 ]
214 }
215 }
216 }
217 },
218 "runsResponseSchema": {
219 "type": "object",
220 "properties": {
221 "data": {
222 "type": "object",
223 "properties": {
224 "id": {
225 "type": "string"
226 },
227 "actId": {
228 "type": "string"
229 },
230 "userId": {
231 "type": "string"
232 },
233 "startedAt": {
234 "type": "string",
235 "format": "date-time",
236 "example": "2025-01-08T00:00:00.000Z"
237 },
238 "finishedAt": {
239 "type": "string",
240 "format": "date-time",
241 "example": "2025-01-08T00:00:00.000Z"
242 },
243 "status": {
244 "type": "string",
245 "example": "READY"
246 },
247 "meta": {
248 "type": "object",
249 "properties": {
250 "origin": {
251 "type": "string",
252 "example": "API"
253 },
254 "userAgent": {
255 "type": "string"
256 }
257 }
258 },
259 "stats": {
260 "type": "object",
261 "properties": {
262 "inputBodyLen": {
263 "type": "integer",
264 "example": 2000
265 },
266 "rebootCount": {
267 "type": "integer",
268 "example": 0
269 },
270 "restartCount": {
271 "type": "integer",
272 "example": 0
273 },
274 "resurrectCount": {
275 "type": "integer",
276 "example": 0
277 },
278 "computeUnits": {
279 "type": "integer",
280 "example": 0
281 }
282 }
283 },
284 "options": {
285 "type": "object",
286 "properties": {
287 "build": {
288 "type": "string",
289 "example": "latest"
290 },
291 "timeoutSecs": {
292 "type": "integer",
293 "example": 300
294 },
295 "memoryMbytes": {
296 "type": "integer",
297 "example": 1024
298 },
299 "diskMbytes": {
300 "type": "integer",
301 "example": 2048
302 }
303 }
304 },
305 "buildId": {
306 "type": "string"
307 },
308 "defaultKeyValueStoreId": {
309 "type": "string"
310 },
311 "defaultDatasetId": {
312 "type": "string"
313 },
314 "defaultRequestQueueId": {
315 "type": "string"
316 },
317 "buildNumber": {
318 "type": "string",
319 "example": "1.0.0"
320 },
321 "containerUrl": {
322 "type": "string"
323 },
324 "usage": {
325 "type": "object",
326 "properties": {
327 "ACTOR_COMPUTE_UNITS": {
328 "type": "integer",
329 "example": 0
330 },
331 "DATASET_READS": {
332 "type": "integer",
333 "example": 0
334 },
335 "DATASET_WRITES": {
336 "type": "integer",
337 "example": 0
338 },
339 "KEY_VALUE_STORE_READS": {
340 "type": "integer",
341 "example": 0
342 },
343 "KEY_VALUE_STORE_WRITES": {
344 "type": "integer",
345 "example": 1
346 },
347 "KEY_VALUE_STORE_LISTS": {
348 "type": "integer",
349 "example": 0
350 },
351 "REQUEST_QUEUE_READS": {
352 "type": "integer",
353 "example": 0
354 },
355 "REQUEST_QUEUE_WRITES": {
356 "type": "integer",
357 "example": 0
358 },
359 "DATA_TRANSFER_INTERNAL_GBYTES": {
360 "type": "integer",
361 "example": 0
362 },
363 "DATA_TRANSFER_EXTERNAL_GBYTES": {
364 "type": "integer",
365 "example": 0
366 },
367 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
368 "type": "integer",
369 "example": 0
370 },
371 "PROXY_SERPS": {
372 "type": "integer",
373 "example": 0
374 }
375 }
376 },
377 "usageTotalUsd": {
378 "type": "number",
379 "example": 0.00005
380 },
381 "usageUsd": {
382 "type": "object",
383 "properties": {
384 "ACTOR_COMPUTE_UNITS": {
385 "type": "integer",
386 "example": 0
387 },
388 "DATASET_READS": {
389 "type": "integer",
390 "example": 0
391 },
392 "DATASET_WRITES": {
393 "type": "integer",
394 "example": 0
395 },
396 "KEY_VALUE_STORE_READS": {
397 "type": "integer",
398 "example": 0
399 },
400 "KEY_VALUE_STORE_WRITES": {
401 "type": "number",
402 "example": 0.00005
403 },
404 "KEY_VALUE_STORE_LISTS": {
405 "type": "integer",
406 "example": 0
407 },
408 "REQUEST_QUEUE_READS": {
409 "type": "integer",
410 "example": 0
411 },
412 "REQUEST_QUEUE_WRITES": {
413 "type": "integer",
414 "example": 0
415 },
416 "DATA_TRANSFER_INTERNAL_GBYTES": {
417 "type": "integer",
418 "example": 0
419 },
420 "DATA_TRANSFER_EXTERNAL_GBYTES": {
421 "type": "integer",
422 "example": 0
423 },
424 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
425 "type": "integer",
426 "example": 0
427 },
428 "PROXY_SERPS": {
429 "type": "integer",
430 "example": 0
431 }
432 }
433 }
434 }
435 }
436 }
437 }
438 }
439 }
440}
Twitter Tweets and Profiles Scraper OpenAPI definition
OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for Twitter Tweets and Profiles Scraper from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients:
Actor Metrics
291 monthly users
-
41 bookmarks
91% runs succeeded
18 days response time
Created in Jul 2023
Modified 22 days ago