# Twitter (X) Auto Like Bot (`automationagents/twitter-auto-like`) Actor

Automatically like a Twitter/X post from an authenticated session. Part of a Twitter/X engagement automation toolkit.

- **URL**: https://apify.com/automationagents/twitter-auto-like.md
- **Developed by:** [Alex Jordan](https://apify.com/automationagents) (community)
- **Categories:** Automation, Social media
- **Stats:** 1 total users, 0 monthly users, 64.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0017 / successful api call

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Twitter Auto Like

Twitter Auto Like performs a like action on a Twitter/X post using an authenticated account session.

Built on the Apify platform, this Actor supports scheduling, webhooks, and dataset exports.

### What It Does

Twitter Auto Like performs a like action on a Twitter/X post using an authenticated account session.

### Why Use Twitter Auto Like?

- Engagement automation - Like posts as part of scheduled workflows
- Campaign setup - Standardize post interactions before downstream actions
- Operational visibility - Track like results in Apify datasets

### How to Use Twitter Auto Like

1. Open the Actor on Apify
2. Enter the required URL and authenticated session inputs
3. Start the run
4. Review the dataset output for success or error details

### Input

This Actor accepts the fields required to like a Twitter/X post through an authenticated session.

### Proxy Object

Use the proxy object to define how requests should be routed.
Common fields are:

- `ip` - Proxy host or endpoint URL
- `port` - Proxy port
- `username` - Proxy username
- `password` - Proxy password

### Example Input

```json
{
  "twPostUrl": "https://x.com/example/status/1234567890",
  "texAuVariables": {},
  "connectedAccountId": "example_connected_account_id",
  "auth_token": "example_auth_token",
  "ct0": "example_ct0_token",
  "kdt": "example_kdt_cookie",
  "twid": "u%3D1234567890",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36",
  "bearerToken": "Bearer exampleBearerToken",
  "guest_token": "example_guest_token",
  "sec-ch-ua-platform": "\"Linux\"",
  "authorization": "Bearer exampleBearerToken",
  "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36",
  "x-csrf-token": "example_ct0_token",
  "txSmSelfProfileUrl": "https://x.com/example_self_account",
  "proxy": {
    "ip": "http://proxy.example.com",
    "port": "1080",
    "username": "user_example|session_demo",
    "password": "example_proxy_password"
  }
}
```

### Output

The Actor writes the action result to the default dataset.

### Example Output

```json
{
  "success": true,
  "response": {
    "twPostUrl": "https://x.com/example/status/1234567890",
    "action": "like",
    "liked": true,
    "timestamp": "2026-06-22T10:15:00.000Z"
  }
}
```

### Pricing / Cost Estimation

$0.0017 per successful API call

### Support

If you need adjustments for your workflow, use the Actor Issues tab or your internal support channel.

# Actor input Schema

## `twPostUrl` (type: `string`):

Twitter/X post URL.

## `auth_token` (type: `string`):

Twitter/X auth token cookie.

## `ct0` (type: `string`):

Twitter/X CSRF cookie.

## `kdt` (type: `string`):

Twitter/X kdt cookie.

## `twid` (type: `string`):

Twitter/X twid cookie.

## `user-agent` (type: `string`):

Lowercase user-agent field if required by runtime mapping.

## `bearerToken` (type: `string`):

Twitter/X bearer token.

## `guest_token` (type: `string`):

Twitter/X guest token.

## `sec-ch-ua-platform` (type: `string`):

Browser platform client hint header.

## `authorization` (type: `string`):

Twitter/X authorization header value.

## `User-Agent` (type: `string`):

Browser user agent string.

## `x-csrf-token` (type: `string`):

Twitter/X CSRF token header.

## `txSmSelfProfileUrl` (type: `string`):

TexAu self profile URL.

## `proxy` (type: `object`):

Proxy object for browser session.

## Actor input object example

```json
{
  "twPostUrl": "https://x.com/example/status/1234567890",
  "twid": "1234567890",
  "user-agent": "Mozilla/5.0 ...",
  "bearerToken": "Bearer example",
  "guest_token": "1234567890",
  "sec-ch-ua-platform": "macOS",
  "authorization": "Bearer example",
  "User-Agent": "Mozilla/5.0 ...",
  "txSmSelfProfileUrl": "https://twitter.com/example_self",
  "proxy": {
    "ip": "http://proxy.example.com",
    "port": "1080",
    "username": "example_username",
    "password": "example_password"
  }
}
```

# 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 = {
    "twPostUrl": "https://x.com/example/status/1234567890",
    "twid": "1234567890",
    "user-agent": "Mozilla/5.0 ...",
    "bearerToken": "Bearer example",
    "guest_token": "1234567890",
    "sec-ch-ua-platform": "macOS",
    "authorization": "Bearer example",
    "User-Agent": "Mozilla/5.0 ...",
    "txSmSelfProfileUrl": "https://twitter.com/example_self",
    "proxy": {
        "ip": "http://proxy.example.com",
        "port": "1080",
        "username": "example_username",
        "password": "example_password"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automationagents/twitter-auto-like").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 = {
    "twPostUrl": "https://x.com/example/status/1234567890",
    "twid": "1234567890",
    "user-agent": "Mozilla/5.0 ...",
    "bearerToken": "Bearer example",
    "guest_token": "1234567890",
    "sec-ch-ua-platform": "macOS",
    "authorization": "Bearer example",
    "User-Agent": "Mozilla/5.0 ...",
    "txSmSelfProfileUrl": "https://twitter.com/example_self",
    "proxy": {
        "ip": "http://proxy.example.com",
        "port": "1080",
        "username": "example_username",
        "password": "example_password",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("automationagents/twitter-auto-like").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "twPostUrl": "https://x.com/example/status/1234567890",
  "twid": "1234567890",
  "user-agent": "Mozilla/5.0 ...",
  "bearerToken": "Bearer example",
  "guest_token": "1234567890",
  "sec-ch-ua-platform": "macOS",
  "authorization": "Bearer example",
  "User-Agent": "Mozilla/5.0 ...",
  "txSmSelfProfileUrl": "https://twitter.com/example_self",
  "proxy": {
    "ip": "http://proxy.example.com",
    "port": "1080",
    "username": "example_username",
    "password": "example_password"
  }
}' |
apify call automationagents/twitter-auto-like --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automationagents/twitter-auto-like",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/dbmFuFCnotPYzdhmQ/builds/dmyAs8NICA13qN6vA/openapi.json
