# Twitter (X.com) Scraper Unlimited: No Limits (`getdataforu/twitter-scraper-lite`) Actor

Introducing Twitter Scraper Unlimited, the most comprehensive Twitter data extraction solution available. Our enterprise-grade scraper offers unmatched capabilities with a transparent event-based pricing model, making it perfect for both small-scale and large-scale data extraction needs.

- **URL**: https://apify.com/getdataforu/twitter-scraper-lite.md
- **Developed by:** [EMT Crawler](https://apify.com/getdataforu) (community)
- **Categories:** Social media, Other, E-commerce
- **Stats:** 13 total users, 3 monthly users, 83.9% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.00001 / actor start

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Actor mẫu — Free token pool + actor Store

Gọi **bất kỳ actor free** trên Apify Store; **token** lấy từ Google Doc (xoay khi hết quota). Form **Input** clone từ actor gốc — **không sửa code** khi đổi actor.

Chi tiết nhân bản: **[CLONE.md](./CLONE.md)**

### Nhân bản nhanh

```bash
## 1 lần
apify secrets add GOOGLE_SERVICE_ACCOUNT '{"type":"service_account",...}'
apify login

## Mỗi actor Store mới — chỉ 1 lệnh (+ apify push)
npm run setup -- clockworks~tiktok-comments-scraper
apify push
```

Sửa tay tối thiểu: `template.config.json` → `targetActorId`.

### Cách hoạt động

```
Input (form clone từ Store) → Actor proxy → API + token từ Google Doc → Actor Store → Dataset
```

- Token: Google Doc `KEY`, mỗi dòng `apify_api_...`
- Hết free: thử dòng tiếp theo
- Config: `template.config.json` + secret `GOOGLE_SERVICE_ACCOUNT`

### File quan trọng

| File | Khi clone |
|------|-----------|
| `template.config.json` | Đổi `targetActorId` |
| `npm run setup -- user~actor` | Tự cập nhật input schema + actor.json |
| `src/*` | **Không sửa** |
| Google Doc | Thêm/bớt token (không push) |

### Test local

`input.json` — field theo actor vừa `setup` (xem `.actor/input_schema.json`).

```bash
set GOOGLE_SERVICE_ACCOUNT={"type":"service_account",...}
npm start
```

# Actor input Schema

## `searchTerms` (type: `array`):

If you add search terms, the scraper will find and extract tweets that mention those terms. Alternatively, see further down to scrape by Twitter URL.

## `sort` (type: `string`):

Sorts search results. If you are getting low results, try Top instead of Latest. Latest + Top runs both simultaneously to maximize results but may return some duplicate tweets.

## `maxItems` (type: `integer`):

This value lets you set the maximum number of tweets to retrieve. Twitter has a default limit of around 800 tweets per query. Check the README for workarounds.

## `start` (type: `string`):

Scrape tweets starting from this date

## `end` (type: `string`):

Scrape tweets until this date

## `twitterHandles` (type: `array`):

You can add the twitter handles of specific profiles you want to scrape. This is a shortcut so that you don't have to add full username URLs like https://twitter.com/apify

## `startUrls` (type: `array`):

This lets you tell the scraper where to start. You can enter Twitter URLs one by one. You can also link to or upload a text file with a list of URLs

## `includeSearchTerms` (type: `boolean`):

If selected, a field will be added to each tweets about the search term that was used to find it.

## Actor input object example

```json
{}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforu/twitter-scraper-lite").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("getdataforu/twitter-scraper-lite").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call getdataforu/twitter-scraper-lite --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,getdataforu/twitter-scraper-lite"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/IkEKaZICLu57sXdZi/builds/uifkwC5iNKT1WyY6r/openapi.json
