# Twitter Like Checker (`dead00/twitter-like-checker`) Actor

A Twitter Like Checker that checks if a specific user has liked your particular tweet. This tool is perfect for social media analytics, engagement tracking, and verification purposes.

- **URL**: https://apify.com/dead00/twitter-like-checker.md
- **Developed by:** [Dead](https://apify.com/dead00) (community)
- **Categories:** Social media, Developer tools, Lead generation
- **Stats:** 208 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twitter Like Checker

A Twitter Like Checker that checks if a specific user has liked your particular tweet. This tool is perfect for social media analytics, engagement tracking, and verification purposes.

### 🚀 Features

- **Lightning Fast**: Optimized for speed with adaptive delay systems and performance monitoring
- **Smart Search**: Stops immediately when target user is found (early termination)
- **Robust Error Handling**: Built-in retry logic for rate limits and connection issues
- **Scalable**: Supports checking up to 10,000 likes per tweet
- **Performance Metrics**: Real-time speed tracking and detailed logging
- **Cookie-Based Authentication**: Secure authentication using Twitter cookies

### 📋 Requirements

- Valid Twitter cookies for authentication
- Tweet URL (supports both twitter.com and x.com formats)
- Target username to search for

### 🔧 Input Parameters

#### Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `tweet_url` | String | Full URL of the tweet to check (e.g., `https://twitter.com/username/status/1234567890`) |
| `target_username` | String | Username to search for (with or without @ symbol) |
| `cookies` | Array | Twitter authentication cookies |

#### Optional Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `max_results` | Number | 5000 | Maximum number of likes to check (100-10000) |

### 🍪 Cookie Setup

To use this tool, you need to provide Twitter authentication cookies. Here's how to get them:

1. **Open Twitter/X in your browser** and log in
2. **Open Developer Tools** (F12 or right-click → Inspect)
3. **Go to the Application/Storage tab**
4. **Find Cookies** under the Storage section
5. **Copy the following cookies**:
   - `auth_token`
   - `ct0`
   - `guest_id`
   - `personalization_id`
   - `auth_multi`

#### Cookie Format

```json
[
  {
    "name": "auth_token",
    "value": "your_auth_token_here"
  },
  {
    "name": "ct0",
    "value": "your_ct0_token_here"
  },
  {
    "name": "guest_id",
    "value": "your_guest_id_here"
  },
  {
    "name": "personalization_id",
    "value": "your_personalization_id_here"
  }
]
```

### 📊 Output

The actor returns a JSON object with the following structure:

```json
{
  "success": true,
  "liked": true,
  "tweet_id": "1234567890",
  "search_time_seconds": 15.3
}
```

#### Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `success` | Boolean | Whether the check was completed successfully |
| `liked` | Boolean | `true` if the user liked the tweet, `false` if not |
| `tweet_id` | String | Extracted tweet ID from the URL |
| `search_time_seconds` | Number | Time taken to complete the search |

### 🎯 Usage Examples

#### Usage

```json
{
  "tweet_url": "https://twitter.com/elonmusk/status/1234567890",
  "target_username": "billgates",
  "cookies": [
    {
      "name": "auth_token",
      "value": "your_auth_token_here"
    }
  ]
}
```

### ⚡ Performance Optimization

The tool includes several performance optimizations:

- **Adaptive Delays**: Automatically adjusts request timing based on response quality
- **Smart Pagination**: Optimizes page size based on search requirements
- **Early Termination**: Stops immediately when target user is found
- **Connection Pooling**: Efficient request handling
- **Rate Limit Management**: Intelligent retry logic for rate-limited requests

### 🚨 Error Handling

The tool handles various error scenarios:

- **Rate Limiting**: Automatic retries with exponential backoff
- **Connection Issues**: Retry logic for network problems
- **Authentication Errors**: Clear error messages for invalid cookies
- **Tweet Access Issues**: Handles private/deleted tweets gracefully

### 🤝 Support

For issues or feature requests:

1. Check the troubleshooting section above
2. Verify your input parameters
3. Ensure cookies are valid and current
4. Review the Apify console logs for detailed error information

### ⚖️ Legal Notice

This tool is for educational and analytical purposes only. Users are responsible for complying with Twitter's Terms of Service and applicable laws. The tool should be used respectfully and within reasonable limits.

# Actor input Schema

## `tweet_url` (type: `string`):

Full URL of the tweet to check (e.g., https://x.com/username/status/1234567890)

## `target_username` (type: `string`):

Username to search for in the likes (without @)

## `cookies` (type: `array`):

Array of cookie objects for Twitter/X authentication. Export these from your browser when logged into x.com

## Actor input object example

```json
{
  "tweet_url": "https://x.com/Deepanshus55343/status/1938850187382006084",
  "target_username": "DeepanshuS39255",
  "cookies": [
    {
      "domain": ".x.com",
      "expirationDate": 1771085083.01971,
      "hostOnly": false,
      "httpOnly": true,
      "name": "auth_token",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "e8ebde28ed35f60bbaa480fadf171a2706262770"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1767339612.610054,
      "hostOnly": false,
      "httpOnly": false,
      "name": "guest_id",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "v1%3A172490945488285787"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1782628904.746276,
      "hostOnly": false,
      "httpOnly": false,
      "name": "twid",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "u%3D1877748387220799489"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1782628901.487226,
      "hostOnly": false,
      "httpOnly": false,
      "name": "night_mode",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "2"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1751094381.602159,
      "hostOnly": false,
      "httpOnly": true,
      "name": "__cf_bm",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "4pqZUXNkuqx5Mrdh3QuwEwR_oz_HZulQ6sFU4E9Rcbg-1751092584-1.0.1.1-Qk0ZxBUH8rVwfZLQgYGf8abWtpNNEa6HnynZUSNzwvIp8lGzOsodROxGEgCpM6SZX7QoKRoP5GVTvdnYYCM9Ql.XSbYpYGSGUJUI3NxOWrc"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1771085083.370993,
      "hostOnly": false,
      "httpOnly": false,
      "name": "ct0",
      "path": "/",
      "sameSite": "lax",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "b49f42546ed0263e7ed05dd736255e27cb99c44fb82abe573b42ae3132c7a5272856579502280f5624892335fcc0c6a686836b689565d9d0aaf4ad2c630fb7d77a67b7863020e130eeb1ed7dbf907a0c"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1785652901.47885,
      "hostOnly": false,
      "httpOnly": false,
      "name": "guest_id_ads",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "v1%3A172490945488285787"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1785652901.47894,
      "hostOnly": false,
      "httpOnly": false,
      "name": "guest_id_marketing",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "v1%3A172490945488285787"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1771085083.019629,
      "hostOnly": false,
      "httpOnly": true,
      "name": "kdt",
      "path": "/",
      "sameSite": null,
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "0MprSsNU5W2zirK0Kdo6YW1QFh58oyeb4Qw5RChk"
    },
    {
      "domain": ".x.com",
      "expirationDate": 1768061146.52658,
      "hostOnly": false,
      "httpOnly": false,
      "name": "personalization_id",
      "path": "/",
      "sameSite": "no_restriction",
      "secure": true,
      "session": false,
      "storeId": null,
      "value": "\"v1_fo7TidorU55HXywHnSY3Yw==\""
    }
  ]
}
```

# 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("dead00/twitter-like-checker").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("dead00/twitter-like-checker").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 dead00/twitter-like-checker --silent --output-dataset

```

## MCP server setup

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

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/IUk6jHWE20BrdgEbF/builds/DHagqrq1ZtKojbUwA/openapi.json
