Twitter (X) User Profile Scraper by Handle avatar

Twitter (X) User Profile Scraper by Handle

Pricing

from $0.20 / 1,000 results

Go to Apify Store
Twitter (X) User Profile Scraper by Handle

Twitter (X) User Profile Scraper by Handle

Get public X/Twitter profiles by username or profile URL: bios, followers, following, verification, images, creation dates and explicit DM permission data. Export JSON, CSV or Excel.

Pricing

from $0.20 / 1,000 results

Rating

0.0

(0)

Developer

Dev

Dev

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Features

Limited permissions

Share

Get public X/Twitter profiles by username or profile URL: bios, followers, following, verification, images, creation dates and explicit DM permission data. Export JSON, CSV or Excel.

What this Actor collects

Look up public profiles by handle or profile URL. Numeric user IDs are not supported. One profile is returned per accessible unique account. Suspended or inaccessible handles are recorded as failed sources in COVERAGE.

Handles are looked up in batches of up to 100 using pure HTTP. Results are matched by handle, not response order. If X omits a handle, the Actor checks it individually before reporting it unavailable. This also handles aliases or renamed accounts without guessing which input owns a result.

If the bulk query becomes unavailable or its shared POST budget is exhausted, collection switches to the existing single-handle GET lookup for the rest of that run, subject to its separate account budget. This is not unlimited capacity: the Actors share the same X account pool. Coordinator outages remain fail-closed; the Actor does not bypass the shared ledger.

Quick start

Enter inputs, start with a small maxItems, and run. No customer X cookies are required. Export the default dataset as JSON, CSV, Excel or JSONL, or use the Apify API.

{
"twitterHandles": [
"NASA",
"the_hindu"
],
"maxItems": 100
}

Limits and deduplication

maxItems is the total unique output ceiling, not a per-source allowance. maxItemsPerSource caps each input and defaults to maxItems. maxDurationSeconds defaults to 300 and cannot exceed 600. Account rate limits, spending limits and X visibility may yield fewer results. Startup has bounded retries; very short deadlines may elapse during initialization.

IDs are strings. No duplicate IDs are emitted within a run; migration recovery reconciles existing writes. If several inputs discover the same record, the first source gets attribution. This is a unique-profile/result export, not an exhaustive relationship-edge export.

Output schema

Rows are flat user profiles with id, userName, name, url, description, followers, following, verification, images, createdAt, canDm and additional normalized fields. Every row includes sourceInput, sourceType and searchTerm. searchTerm is the query for user search, otherwise an empty string.

canDm reads dm_permissions.can_dm or legacy.can_dm: true/false when reported, null when unknown. Permission can depend on the authenticated X account; it is not a global guarantee that anyone may DM that profile.

The Output tab links to results and COVERAGE. COVERAGE lists source/strategy pages, limits, failures, repeated cursors and the exact stop reason. Dataset and output schemas are included for Store publishing.

For profiles, COVERAGE also includes profileLookupRequests: logical lookup calls made by the runner, excluding initialization, internal retries and query-ID fallback wire attempts. One bulk call is attributed once, to its first source. Per-source pages can include the same shared batch response; do not sum them to estimate HTTP calls. profileFallback identifies omitted-profile or bulk-unavailable single lookups. Dataset fields and customer input remain unchanged.

Older per-handle checkpoints can resume through batching. Already written profiles are reconciled from the dataset and are not requested or billed again. Only successfully written rows advance output counters; spending-limit truncation leaves unwritten sources pending.

Coverage and responsible use

X may withhold protected, deleted, blocked, suspended or unindexed content, or shorten lists despite larger public counters. An empty result is not a completeness guarantee. This Actor does not bypass access controls. Follow applicable terms and privacy obligations.

API

After deployment, POST JSON input to https://api.apify.com/v2/acts/

Operator setup

Not yet published; no price or Store publication is configured. Each new Actor requires secret X_ACCOUNTS and proxy environment configuration. Credentials never belong in input forms, source, datasets or logs. Arbitrary JavaScript mapping is not supported.

Prepare a clean build directory:

node scripts/prepare-actor.mjs profiles

Build from .artifacts/actors/profiles. Staging never deploys or publishes. Memory is fixed at 1024 MB. Pure HTTP with compressed responses and account-aware rate limits; no browser or third-party data API.