X / Twitter Posts Scraper — Profile & Post URLs

Export public X/Twitter posts from profile or post URLs, with text, authors, engagement counts, and media links. Download JSON or CSV. Search queries are not supported.

Data fields

FieldTypeDescription
idstringValue exported as id.
urlstringValue exported as url.
twitterUrlstringValue exported as twitterUrl.
textstringValue exported as text.
createdAtstring | nullValue exported as createdAt.
langstring | nullValue exported as lang.
replyCountinteger | nullValue exported as replyCount.
repostCountinteger | nullValue exported as repostCount.

Input preview

startUrlsStart URLs *
maxItemsMaximum items

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

Ready-to-run examples

Open a saved Apify example, adjust the input, and run the actor in your own Apify account.

View all examples

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

X Tweet Scraper exports public posts from supplied X profile and status URLs into a structured dataset. It is built for social listening, content research, public-post monitoring, and archival workflows where a normalized post record is more useful than a browser tab.

Why use this X tweet scraper?

  • Export public post text, canonical links, author details, visible engagement, and media URLs.
  • Start from public profile URLs or direct /status/<id> links.
  • Keep requested source URLs and collection timestamps alongside every saved record.
  • Deduplicate posts across multiple supplied sources in one run.

Use cases

A Twitter tweet scraper workflow can monitor posts from a public company, creator, or community account. An X profile scraper workflow can turn a supplied public account URL into a compact, reusable post dataset.

  • Monitor posts from a public company, creator, or community account.
  • Build a research dataset for content analysis or reporting.
  • Preserve public post references for editorial review.
  • Send normalized public post data to spreadsheets, databases, or automation workflows.

Output dataset

{
  "id": "2093127984701989032",
  "url": "https://x.com/example/status/2093127984701989032",
  "text": "Example public post text",
  "createdAt": "2026-08-28T00:06:14.000Z",
  "likeCount": 40194,
  "repostCount": 3852,
  "author": { "username": "example", "name": "Example Author" },
  "sourceType": "profile"
}
Field Description
id, url, twitterUrl, text Stable post identity, canonical links, and public post text.
createdAt, lang Publication timestamp and language when the public response provides them.
replyCount, repostCount, likeCount, quoteCount, bookmarkCount, viewCount Visible engagement metrics; unavailable values are null.
isReply, isRetweet, isQuote Post relationship flags where publicly detectable.
mediaUrls Unique public media URLs attached to a post.
author Public author ID, username, display name, profile URL/image, follow counts, and verification flags when available.
sourceUrl, sourceType, paginationCursor, scrapedAt, partialSourceFailure Requested source, source mode, collection time, and partial-run indicator. paginationCursor records the public cursor used for a continued profile page, or is null for the first page/status URLs.

Tips

  • Supply one or more direct public profile or post URLs in startUrls.
  • Use direct status URLs when you need a single public post.
  • X search URLs and query strings are not supported in this version because a stable anonymous result route is not available.
  • Review partialSourceFailure and the RUN_SUMMARY record when a multi-source run has mixed results.

Who is it for?

This Actor is for social media teams, researchers, analysts, and automation builders who need a repeatable export of public X posts from known profiles or status links. It is not a search engine and does not collect protected or login-only posts.

Start on Apify

  1. Open X Tweet Scraper in the Apify Store and click Try for free.
  2. Add one or more public profile or direct status URLs under Start URLs.
  3. Set a low maxItems first, then run the Actor and export the default dataset as JSON or CSV.

API usage

Run with the same input used in the recipes above. The resulting default dataset can be downloaded as JSON or CSV.

Node.js

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/tweet-scraper').call({
  startUrls: [{ url: 'https://x.com/elonmusk' }],
  maxItems: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("fetch_cat/tweet-scraper").call(run_input={
    "startUrls": [{"url": "https://x.com/elonmusk"}], "maxItems": 10
})
print(client.dataset(run["defaultDatasetId"]).list_items().items)

cURL

curl "https://api.apify.com/v2/acts/fetch_cat~tweet-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"startUrls":[{"url":"https://x.com/elonmusk"}],"maxItems":10}'

Integrations and MCP

Run the Actor with the Apify API, then send the default dataset to n8n, Make, Zapier, Google Sheets, or another dataset consumer. For agent workflows, add it to Apify MCP so your agent can submit public URLs and read normalized records.

Support

For a reproducible public-data issue, include:

  • the Apify run ID or run URL;
  • the exact input JSON submitted;
  • the expected output;
  • the actual output (or error); and
  • a reproducible public X URL that is accessible without login.

Do not include account credentials, cookies, or protected content. This lets support reproduce the public route without requesting account access.

Common questions

Questions and answers reused from the canonical actor README.

Can I scrape X search results?

No. This version supports public profile and direct status URLs only. It rejects search URLs rather than returning a login page or unrelated records.

Can I use the Actor via API or MCP?

Yes. Submit the same input through the Apify API, retrieve the default dataset, or enable this Actor in an Apify MCP tool selection.

What happens if one source fails?

Completed posts are retained. Check partialSourceFailure and RUN_SUMMARY to identify a source that was private, deleted, rate-limited, or no longer publicly available.

Is this for public data only?

Yes. Do not use it to access protected content, bypass access controls, or collect data in violation of applicable laws or platform terms.