# X/Twitter Article Markdown API (`parsebird/x-twitter-article-markdown`) Actor

Convert public X/Twitter article and tweet content to Markdown by tweet ID. Batch up to 10 IDs and export Markdown as JSON, CSV, or Excel.

- **URL**: https://apify.com/parsebird/x-twitter-article-markdown.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Categories:** Social media, AI, Agents
- **Stats:** 10 total users, 8 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 x articles

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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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/Twitter Article Markdown API

Convert public [X/Twitter](https://x.com) article and tweet content into clean Markdown by tweet ID. X/Twitter Article Markdown API returns one dataset row per ID with `tweet_id` and `md`, ready for archives, AI workflows, documentation, and exports.

<table><tr>
<td style="border-left:4px solid #000000;padding:12px 16px;font-weight:600">
Extract Markdown from up to 10 public X/Twitter tweet IDs per run, then download the results from Apify as JSON, CSV, Excel, or HTML or call them from the API.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

````

X/Twitter Article Markdown API (parsebird/x-twitter-article-markdown) converts public X/Twitter article or tweet content to Markdown. Call via ApifyClient: client.actor("parsebird/x-twitter-article-markdown").call(run\_input={"tweetIds": \["2010751592346030461"]}). Inputs: tweetIds (array of strings, required, 1-10 tweet IDs or URLs containing tweet IDs). Output fields: tweet\_id (string), md (Markdown string; empty when X does not expose the content publicly). API docs: https://docs.apify.com/api/v2. Get API token: https://console.apify.com/account#/integrations. Pricing: markdown-result event, $5.99 per 1,000 successful Markdown results on Free/Bronze/Silver and $2.99 per 1,000 on Gold.

````

### What is X/Twitter Article Markdown API?

**X/Twitter Article Markdown API** is an X/Twitter article to Markdown converter for public content. Add one or more tweet IDs and the actor attempts to extract publicly available article or tweet text, normalize it into Markdown, and save it to an Apify dataset.

Use it as an **X scraper API alternative** when you need Markdown output for research notes, AI pipelines, content backup, or knowledge management. New Apify users can test it with the [Apify free trial](https://apify.com/pricing).

### What can X/Twitter Article Markdown API do?

- Convert public X/Twitter article rich-text blocks to Markdown
- Process up to 10 tweet IDs in one run
- Keep output simple: `tweet_id` and `md`
- Export Markdown results as JSON, CSV, Excel, or HTML from the Apify dataset
- Access results through the [Apify API](https://docs.apify.com/api/v2)
- Schedule recurring runs with [Apify schedules](https://docs.apify.com/platform/schedules)
- Send results to apps and databases with [Apify integrations](https://apify.com/integrations)

X can limit what is visible without authentication. X/Twitter Article Markdown API uses public tweet/article mirror data when available, then converts the article's rich-text blocks into Markdown. When a tweet ID is deleted, private, restricted, or unsupported by the public source, the actor returns the ID with an empty `md` value instead of fabricating content.

### What data can you extract from X/Twitter?

| Data Field | Type | Description |
|------------|------|-------------|
| **tweet_id** | string | The X/Twitter tweet ID supplied in the input |
| **md** | string | Markdown content extracted from the public article or tweet payload |

### How to convert X/Twitter articles to Markdown

1. Open [X/Twitter Article Markdown API](https://apify.com/parsebird/x-twitter-article-markdown) on Apify.
2. Paste up to 10 tweet IDs into the **Tweet IDs** input field.
3. Click **Start**.
4. Open the dataset when the run finishes.
5. Download the Markdown rows as JSON, CSV, Excel, or HTML, or fetch them through the API.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| tweetIds | array | **Yes** | - | Up to 10 X/Twitter tweet IDs. URLs containing tweet IDs are also accepted. |

### Output example

```json
[
  {
    "tweet_id": "2010751592346030461",
    "md": "# How to fix your entire life in 1 day\n\nIf you're anything like me, you think new years resolutions are stupid."
  },
  {
    "tweet_id": "2034246147318202855",
    "md": "# Example article title\n\nArticle text converted to Markdown."
  }
]
````

Download results in **JSON, CSV, Excel, or HTML** from the [Apify dataset](https://docs.apify.com/platform/storage/dataset).

### Programmatic API usage

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run_input = {
    "tweetIds": ["2010751592346030461"],
}

run = client.actor("parsebird/x-twitter-article-markdown").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["tweet_id"])
    print(item["md"])
```

#### JavaScript

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

const client = new ApifyClient({ token: "<YOUR_API_TOKEN>" });

const input = {
    tweetIds: ["2010751592346030461"],
};

const run = await client.actor("parsebird/x-twitter-article-markdown").call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();

items.forEach((item) => {
    console.log(item.tweet_id);
    console.log(item.md);
});
```

Get your API token at [Apify Console -> Integrations](https://console.apify.com/account#/integrations). Use [Apify integrations](https://apify.com/integrations) to send Markdown results to Google Sheets, Make, Zapier, webhooks, or your own database.

### Use cases

- **Knowledge management**: Save public X/Twitter long-form content to Markdown vaults
- **AI workflows**: Feed Markdown into summarizers, RAG pipelines, and agent tools
- **Research archives**: Keep stable text copies of public social content for analysis
- **Publishing workflows**: Convert public X/Twitter content into Markdown for CMS review

### How does the X/Twitter Markdown extraction work?

1. The actor validates and deduplicates the `tweetIds` input.
2. It requests public FxTwitter tweet/article data for each tweet ID.
3. It reads article rich-text blocks, entity ranges, inline styles, links, dividers, and media references.
4. The actor converts the article structure into Markdown headings, lists, blockquotes, images, and paragraphs.
5. The actor pushes one dataset row per processed tweet ID.
6. Successful Markdown results are charged as `markdown-result` events.

### How much does it cost to convert X/Twitter articles to Markdown?

X/Twitter Article Markdown API uses pay-per-event pricing. You are charged only for successful Markdown results, not for IDs that return an empty `md`.

| Event | Free / Bronze / Silver | Gold |
|-------|-------------------------|------|
| markdown-result | **$5.99 / 1,000 results** | **$2.99 / 1,000 results** |

Example: 1,000 successful Markdown rows cost $5.99 on Free, Bronze, or Silver plans and $2.99 on Gold. Apify's free trial includes platform credits you can use to test the actor.

### Is it legal to scrape X/Twitter articles?

Scraping public web data can be legal when done responsibly, but laws and platform terms vary by jurisdiction and use case. X/Twitter Article Markdown API is designed for publicly available content and does not bypass login-only access. Review X's terms, avoid collecting sensitive personal data, and read Apify's overview of [web scraping legality](https://blog.apify.com/is-web-scraping-legal/) before using scraped data commercially.

### Other X/Twitter scrapers and related Actors

- [Truth Social Scraper](https://apify.com/parsebird/truth-social-scraper) - scrape public Truth Social posts
- [Truth Social Comment Scraper](https://apify.com/parsebird/truth-social-comment-scraper) - extract public comment data
- [YouTube Search Scraper](https://apify.com/parsebird/youtube-search-scraper) - collect YouTube search results
- [YouTube Thumbnail Downloader](https://apify.com/parsebird/youtube-thumbnail-downloader) - download YouTube thumbnails
- [Apify Store Social media Actors](https://apify.com/store?category=social-media) - browse more social media scraping tools

### FAQ

**Can this actor access private X/Twitter articles?**
No. It only attempts to extract content exposed through public X/Twitter surfaces.

**Why is `md` empty for some tweet IDs?**
X may return no public text for deleted, private, restricted, login-gated, or unsupported article IDs. The actor keeps the row so you can see which ID did not return public Markdown.

**Can I schedule recurring runs?**
Yes. Use [Apify scheduling](https://docs.apify.com/platform/schedules) to run the actor daily, weekly, or at a custom interval.

**Can I use this X/Twitter Markdown API from Python or JavaScript?**
Yes. Use the API examples above or the [Apify API](https://docs.apify.com/api/v2) directly.

**Where can I report extraction issues?**
Use the Actor's Issues tab on Apify and include a tweet ID that reproduces the problem.

# Actor input Schema

## `tweetIds` (type: `array`):

Add up to 10 X/Twitter tweet IDs. The actor returns one Markdown result row per ID when the content is publicly available.

## Actor input object example

```json
{
  "tweetIds": [
    "2010751592346030461"
  ]
}
```

# Actor output Schema

## `dataset` (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 = {
    "tweetIds": [
        "2010751592346030461"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/x-twitter-article-markdown").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 = { "tweetIds": ["2010751592346030461"] }

# Run the Actor and wait for it to finish
run = client.actor("parsebird/x-twitter-article-markdown").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 '{
  "tweetIds": [
    "2010751592346030461"
  ]
}' |
apify call parsebird/x-twitter-article-markdown --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X/Twitter Article Markdown API",
        "description": "Convert public X/Twitter article and tweet content to Markdown by tweet ID. Batch up to 10 IDs and export Markdown as JSON, CSV, or Excel.",
        "version": "1.1",
        "x-build-id": "adbjR32pZEmaiuUFP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parsebird~x-twitter-article-markdown/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parsebird-x-twitter-article-markdown",
                "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/parsebird~x-twitter-article-markdown/runs": {
            "post": {
                "operationId": "runs-sync-parsebird-x-twitter-article-markdown",
                "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/parsebird~x-twitter-article-markdown/run-sync": {
            "post": {
                "operationId": "run-sync-parsebird-x-twitter-article-markdown",
                "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": [
                    "tweetIds"
                ],
                "properties": {
                    "tweetIds": {
                        "title": "Tweet IDs",
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "description": "Add up to 10 X/Twitter tweet IDs. The actor returns one Markdown result row per ID when the content is publicly available.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
