# X Post Metrics Scraper (`chronometrica/x-post-metrics`) Actor

Track public X post views, likes, reposts, quotes, replies, bookmarks, text, authors, and profile counts from known post URLs.

- **URL**: https://apify.com/chronometrica/x-post-metrics.md
- **Developed by:** [Chronometrica](https://apify.com/chronometrica) (community)
- **Categories:** Social media, Automation, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.20 / 1,000 x post metric snapshots

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

## X Post Metrics Scraper

### 📊 What does X Post Metrics Scraper do?

X Post Metrics Scraper turns known public X or Twitter post URLs into clean
metric snapshots. Use it for campaign reports, creator tracking, alerts, and
scheduled history.

Each input URL creates one stable row. It can include views, likes, replies,
reposts, quotes, bookmarks, post text, author identity, and public profile
counts.

This Actor reads public logged-out X data. It does not use cookies, log in to
X, open private posts, or run keyword searches.

With X Post Metrics Scraper, you can:

- 📈 Track post engagement over time.
- 🧑‍💻 Compare creators, brands, and campaigns.
- 🔔 Send metric snapshots to alerts and dashboards.
- 🆔 Keep stable post and profile IDs for matching.
- 📦 Export clean rows to JSON, CSV, Excel, XML, RSS, or an API.

### 📦 What X post data can I extract?

One dataset row represents one attempted public X post URL.

| Data group         | Example fields                                                |
| ------------------ | ------------------------------------------------------------- |
| 🔗 Post identity   | `inputUrl`, `postUrl`, `postId`, `postType`                   |
| 🧾 Post details    | `text`, `publishedAt`                                         |
| 👤 Author          | `profileId`, `profileUrl`, `profileUsername`, `profileName`   |
| 📊 Post metrics    | `views`, `likes`, `replies`, `reposts`, `quotes`, `bookmarks` |
| 👥 Profile metrics | `profileFollowers`                                            |
| 🎯 Quality         | `postMetricStatus`, `status`, `statusReason`                  |
| 🕒 Observation     | `observedAt`                                                  |

Missing public values stay `null`. They are never changed to a made-up zero.
Metric status records show whether each value was present, unavailable, or not
attempted.

### ⚙️ Can I use X Post Metrics Scraper through an API?

Yes. Run it in Apify Console or connect it through:

- Apify API
- Python SDK
- JavaScript SDK
- Webhooks
- Scheduled Tasks
- Apify integrations

### 🎯 Why collect X post metrics?

| Use case            | How the data helps                               |
| ------------------- | ------------------------------------------------ |
| 📣 Campaign reports | Compare public results across campaign posts.    |
| 🧑‍🎨 Creator tracking | Follow post and profile growth over time.        |
| 🏷️ Brand monitoring | Watch known brand posts without manual checks.   |
| 🧱 Data pipelines   | Load stable snapshots into a sheet or warehouse. |

### 💵 Pricing event

The product is designed for pay-per-result pricing. One paid result means one
successful public post metric row. Invalid inputs and missing posts are not
billable result events.

The price ranges from $2.20 to $4.50 per 1,000 results, based on your Apify
plan. Platform usage is included. Use Apify's maximum charge setting to cap
paid results.

### 🚀 How do I use X Post Metrics Scraper?

1. Open **X Post Metrics Scraper** in Apify Console.
2. Paste one or more public X post URLs into **Post URLs**.
3. Click **Start**.
4. Open the **Output** tab.
5. Download the dataset or connect it to your workflow.

### ⬇️ Input

Paste up to 1,000 full public post URLs into `startUrls`.

```json
{
  "startUrls": ["https://x.com/OpenAI/status/2077446718728425686"]
}
````

Supported URLs contain `/status/{post ID}` and use `x.com` or `twitter.com`.
Raw post IDs, profile URLs, searches, lists, and private posts are not
supported. Duplicate URLs are checked once.

When an input URL is a repost, the row describes the original post shown by X.
`inputUrl` keeps the URL you supplied. `postUrl`, post identity, author, text,
and metrics describe the visible original post.

### ⬆️ Output sample

```json
{
  "platform": "x",
  "inputUrl": "https://x.com/OpenAI/status/2077446718728425686",
  "postUrl": "https://x.com/OpenAI/status/2077446718728425686",
  "postId": "2077446718728425686",
  "postType": "post",
  "publishedAt": "2026-07-01T12:00:00.000Z",
  "text": "Example post",
  "profileUrl": "https://x.com/OpenAI",
  "profileId": "4398626122",
  "profileUsername": "@OpenAI",
  "profileName": "OpenAI",
  "views": 1200000,
  "likes": 14000,
  "replies": 900,
  "reposts": 2100,
  "quotes": 300,
  "bookmarks": 1800,
  "postMetricStatus": [
    {
      "metric": "views",
      "status": "present",
      "precision": "exact",
      "source": "public_post"
    }
  ],
  "profileFollowers": 4200000,
  "status": "ok",
  "statusReason": null,
  "observedAt": "2026-07-17T12:00:00.000Z"
}
```

X shows plain reposts and quotes as one repost total. Add `reposts` and
`quotes` to match the displayed total.

#### 📌 Run summary

The `OUTPUT` record reports input count, unique inputs, saved rows, billable
rows, status counts, start time, finish time, and runtime.

### 🚦 Status and quality fields

- `ok`: the public post identity was proven and its snapshot was saved.
- `not_found`: the post was missing or no longer public.
- `blocked`: X did not allow the public request at that time.
- `rate_limited`: X asked the run to slow down.
- `parser_miss`: X returned data without a stable post identity.
- `invalid_input` or `unsupported_url`: the input was not a supported URL.
- `source_error`: X could not be read for another safe, known reason.

Good and failed rows use the same ordered fields. Unknown values stay `null`,
which keeps CSV imports and scheduled checks stable.

### 🔒 Source boundary

This Actor reads only data X shows without signing in. It does not use your X
account, cookies, passwords, or private tokens. It does not bypass login or
challenge screens.

### ⚠️ Limits

- Deleted, private, age-gated, region-limited, or hidden posts may fail.
- X may not show every metric on every post.
- Results are snapshots. Use a schedule to build history.
- X can change its public pages, so a later run may need an Actor update.

### ❓ FAQ

#### Does this Actor need an X login or API key?

No. It reads logged-out public X data.

#### Why is a metric `null`?

X did not show that value publicly for the post at run time. Check the matching
metric status record.

#### How are duplicate URLs handled?

The same normalized post URL is checked once per run.

### 🏠 Related Actors

| Actor                                                                          | Use it for                                                                                |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| [X Profile Metrics Scraper](https://apify.com/chronometrica/x-profile-metrics) | Get public profile identity, details, and audience counts from X handles or profile URLs. |

### 🛟 Support

For help, share the public post URL, run ID, expected result, and actual result.
Never share passwords, cookies, or private tokens.

Use public data in line with the law, X rules, and Apify rules. Do not use it
to harass people or build sensitive personal profiles.

# Actor input Schema

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

Paste up to 1,000 public X post URLs. Each URL creates one attempted metric snapshot row.

## Actor input object example

```json
{
  "startUrls": [
    "https://x.com/OpenAI/status/2077446718728425686"
  ]
}
```

# Actor output Schema

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

No description

## `output` (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 = {
    "startUrls": [
        "https://x.com/OpenAI/status/2077446718728425686"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chronometrica/x-post-metrics").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 = { "startUrls": ["https://x.com/OpenAI/status/2077446718728425686"] }

# Run the Actor and wait for it to finish
run = client.actor("chronometrica/x-post-metrics").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 '{
  "startUrls": [
    "https://x.com/OpenAI/status/2077446718728425686"
  ]
}' |
apify call chronometrica/x-post-metrics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=chronometrica/x-post-metrics",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X Post Metrics Scraper",
        "description": "Track public X post views, likes, reposts, quotes, replies, bookmarks, text, authors, and profile counts from known post URLs.",
        "version": "1.0",
        "x-build-id": "Ybju7sfQ9uOnucXNI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/chronometrica~x-post-metrics/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-chronometrica-x-post-metrics",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/chronometrica~x-post-metrics/runs": {
            "post": {
                "operationId": "runs-sync-chronometrica-x-post-metrics",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/chronometrica~x-post-metrics/run-sync": {
            "post": {
                "operationId": "run-sync-chronometrica-x-post-metrics",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "X post URLs",
                        "minItems": 1,
                        "maxItems": 1000,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Paste up to 1,000 public X post URLs. Each URL creates one attempted metric snapshot row.",
                        "items": {
                            "type": "string",
                            "pattern": "^https://(www\\.|mobile\\.)?(x\\.com|twitter\\.com)/.+/status/[0-9]{5,25}(?:[/?#].*)?$"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
