# X (Twitter) Scraper & API | EveryInfra (`blushing_parachute/everyinfra-twitter-api`) Actor

Unofficial X (Twitter) data via one Actor: search, profile, user_posts, post, comments, trending, followers_list, following_list. Pay per request, no start fee. First 3 requests free across EveryInfra Actors.

- **URL**: https://apify.com/blushing_parachute/everyinfra-twitter-api.md
- **Developed by:** [ECHO](https://apify.com/blushing_parachute) (community)
- **Categories:** Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 4 total users, 3 monthly users, 58.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 search requests

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

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

## X (Twitter) Scraper & API | EveryInfra

Search posts, user profiles, and conversation replies using keywords or handles for discussion observation and content curation.

Get posts by keyword and user profiles by handle. Search returns the Top results of X by default.

### Actions

| Action | What you get | Required | Optional | Results per request | Price per request |
|---|---|---|---|---|---|
| `search` | Search tweets by keyword and get them as JSON. Each post has text, author, follower count and engagement counts. The query can use operators such as from: or since:. Top results come first by default. Latest posts may not come in strict time order. | keyword | sort | 25 (up to 200) | $0.0018 |
| `profile` | Check an X (Twitter) handle's bio, location, follower, following and post counts, verification and account creation date. Pass the username with or without @, not a profile URL. The result does not confirm identity, current activity or audience makeup. | username | — | 1 | $0.0010 |
| `user_posts` | Pull an X (Twitter) account's posts with likes, reposts, replies and views for each, plus publish time. One batch may not hold every post, reply or repost, and private messages are never included. | username | — | 20 (up to 200) | $0.0016 |
| `post` | Fetch one X (Twitter) post by its numeric ID, with full text, author, publish time and like, repost, reply and view counts. Keep the ID as a string to avoid JavaScript rounding, and do not pass the full link. | id | tweet_id | all the source returns | $0.0010 |
| `comments` | Collect the replies under an X (Twitter) post. Each reply has text, author, the author's follower count and its own engagement numbers. Send the original post's numeric `id`. The full conversation is not guaranteed. | id | tweet_id | 20 (up to 50) | $0.0016 |
| `trending` | List trending topics on X (Twitter) with rank, discussion volume, time period and the time of collection. Choose a region with `country`, world by default. `rank` and `volume` describe one observation, not the algorithm or a history. | — | country | all the source returns | $0.0008 |
| `followers_list` | Map the audience of an X (Twitter) account through its followers. Each follower has bio, location, counts, verification and protected status. The list covers followers that X makes visible and may be partial. The counts on each row belong to that follower. | username | — | 200 (up to 2000) | $0.0080 |
| `following_list` | Get the accounts an X (Twitter) user follows, with each one's bio, location, follower and post counts and verification. Following can change at any time and does not prove affinity or interaction. | username | — | 200 (up to 2000) | $0.0080 |

### Input

Pick an `action` and fill the fields it uses. Example:

```json
{
  "action": "search",
  "keyword": "open source"
}
```

Fields that another action needs are ignored when left empty. API users can also pass `{"action": ..., "params": {...}}`.

### Output

Each result is one dataset row. Rows keep every field the source page exposes for that action; a field the platform hides or leaves empty for a record is omitted rather than filled with a placeholder. When there is a next page, the run's `OUTPUT` record holds `next_page_token`.

- `search`: `id`, `url`, `text`, `like_count`, `retweet_count`, `reply_count`, `view_count`, `posted_at`, `author_username`, `author_name`, `author_url`, `author_follower_count`, `quote_count`, `bookmark_count`, `language`, `conversation_id`, `is_reply`, `is_quote`, `is_repost`, `is_pinned`, `reply_to_id`, `reply_to_user_id`, `reply_to`, `source`, `media`, `hashtags`, `mentions`, `links`, `author_id`, `author_avatar_url`, `author_bio`, `author_is_verified`, `author_following_count`, `author_post_count`, `author_media_count`, `author_created_at`, `author_banner_url`, `platform`
- `profile`: `user_id`, `username`, `display_name`, `bio`, `url`, `follower_count`, `following_count`, `post_count`, `is_verified`, `location`, `avatar_url`, `created_at`, `platform`
- `user_posts`: `id`, `url`, `text`, `like_count`, `retweet_count`, `reply_count`, `view_count`, `posted_at`, `author_username`, `author_name`, `author_url`, `author_follower_count`, `quote_count`, `bookmark_count`, `language`, `conversation_id`, `is_reply`, `is_quote`, `is_repost`, `is_pinned`, `reply_to_id`, `reply_to_user_id`, `reply_to`, `source`, `media`, `hashtags`, `mentions`, `links`, `author_id`, `author_avatar_url`, `author_bio`, `author_is_verified`, `author_following_count`, `author_post_count`, `author_media_count`, `author_created_at`, `author_banner_url`, `platform`
- `post`: `id`, `url`, `text`, `like_count`, `retweet_count`, `reply_count`, `view_count`, `posted_at`, `author_username`, `author_name`, `author_url`, `author_follower_count`, `quote_count`, `bookmark_count`, `language`, `conversation_id`, `is_reply`, `is_quote`, `is_repost`, `is_pinned`, `reply_to_id`, `reply_to_user_id`, `reply_to`, `source`, `media`, `hashtags`, `mentions`, `links`, `author_id`, `author_avatar_url`, `author_bio`, `author_is_verified`, `author_following_count`, `author_post_count`, `author_media_count`, `author_created_at`, `author_banner_url`, `platform`
- `comments`: `id`, `url`, `text`, `like_count`, `retweet_count`, `reply_count`, `view_count`, `posted_at`, `author_username`, `author_name`, `author_url`, `author_follower_count`, `quote_count`, `bookmark_count`, `language`, `conversation_id`, `is_reply`, `is_quote`, `is_repost`, `is_pinned`, `reply_to_id`, `reply_to_user_id`, `reply_to`, `source`, `media`, `hashtags`, `mentions`, `links`, `author_id`, `author_avatar_url`, `author_bio`, `author_is_verified`, `author_following_count`, `author_post_count`, `author_media_count`, `author_created_at`, `author_banner_url`, `platform`
- `trending`: `id`, `name`, `url`, `rank`, `volume`, `period`, `collected_at`, `platform`
- `followers_list`: `id`, `username`, `url`, `name`, `text`, `location`, `avatar_url`, `follower_count`, `following_count`, `post_count`, `is_verified`, `is_protected`, `created_at`, `platform`
- `following_list`: `id`, `username`, `url`, `name`, `text`, `location`, `avatar_url`, `follower_count`, `following_count`, `post_count`, `is_verified`, `is_protected`, `created_at`, `platform`

#### Field notes

- `account_based_in`: Country or region where the account is based, as shown on X's "About this account" page (such as United States); absent when X does not show it.
- `account_status`: Account status; normally active (another value when banned or deactivated).
- `affiliation`: Organization label attached to the account (such as the company name "X" on an employee account); absent when none is attached.
- `author_avatar_url`: Link to the author's avatar image (on most platforms the link is signed and expires).
- `author_banner_url`: Link to the author's profile banner image.
- `author_media_count`: Number of media items the author has posted.
- `author_post_count`: Total number of posts by the author.
- `banner_url`: Link to the community banner image.
- `bookmark_count`: Number of bookmarks (saves).
- `collected_at`: Time this record was collected. Trends change fast; use it to judge freshness.
- `community_role`: Member's role in the community: Admin (administrator), Moderator or Member (regular member).
- `conversation_id`: ID of the conversation thread (the root post ID); replies in the same thread are grouped by it.
- `input`: Which item you passed in urls this row corresponds to, returned unchanged (posts_batch).
- `is_following`: Whether username follows target_username (check_follow).
- `is_live`: Whether the account is live right now (an audio or video Space, or a video broadcast).
- `is_location_accurate`: Whether X considers account_based_in accurate (false means a proxy or VPN may have been used).
- `is_nsfw`: Whether the community is marked as adult content.
- `is_protected`: Whether the account is protected (posts visible to followers only).
- `is_quote`: Whether the post is a quote post.
- `is_retweeted`: Whether username has reposted this post (check_retweet).
- `last_username_change_at`: Time of the latest username change; absent if never changed.
- `links`: External links in the text (full expanded URLs).
- `live_id`: ID of the Space or broadcast; absent when not live.
- `live_type`: Type of live: space (Space) or broadcast (video broadcast); absent when not live.
- `media`: Post images and videos: type (photo / video / animated_gif), url (image or video cover), width, height, duration_sec (video seconds), video_url (highest-bitrate mp4).
- `media_count`: Number of images and videos the account has posted (retweeters).
- `mentions`: Usernames @-mentioned in the text.
- `period`: Statistics period.
- `rank`: Rank in the trending list.
- `reply_to_user_id`: Numeric ID of the user being replied to.
- `reposted_at`: Time of the repost. Rows that are not reposts do not have this field.
- `reposted_by`: Account (username) that reposted this post; the row itself is the original post that was reposted. Rows that are not reposts do not have this field.
- `retweet_count`: Repost count.
- `rules`: Community rules (the title of each).
- `signup_source`: Where the account was signed up from (such as United States App Store); absent when X does not show it.
- `source`: Client used to post (such as Twitter for iPhone); the key is absent when the platform does not provide it.
- `started_at`: Time this live started; absent when not live.
- `target_username`: The account being checked for being followed (returned unchanged from check_follow).
- `topic`: Main topic of the community (such as Finance).
- `username_change_count`: Number of times the account has changed its username.
- `verified_since`: Time the account first got its verification badge.
- `volume`: Discussion volume of the topic.
- `watching_count`: Number of people watching; only for video broadcasts, absent for Spaces and when not live.
- `author_bio`: The author's profile bio; not returned on some requests.
- `author_created_at`: When the author's account was created, ISO 8601 in UTC (for example 2007-12-19T20:20:32+00:00); not returned on some requests.
- `author_following_count`: How many accounts the author follows; not returned on some requests.
- `author_is_verified`: Whether the author has the blue verified checkmark; not returned on some requests.
- `is_pinned`: Whether the post is pinned to the top of the author's profile; not returned on some requests.
- `is_reply`: Whether the post is a reply (every comments row is one); not returned on some requests.
- `is_repost`: Whether the post is a repost (every user_reposts row is one); not returned on some requests.
- `member_count`: Number of members in the community (community_info / search_communities).
- `next_page_token`: Page token (user_media / user_replies / retweeters / search_communities / search_users / community_posts): pass it back unchanged as page_token on the next request to get the next page; every row of a page carries the same value; valid for 24 hours. On some requests only the first page comes back and it is null.
- `post_id`: ID of the post that was checked (check_retweet).
- `quote_count`: Quotes: how many times others have quoted this post in their own posts. null means not disclosed, not 0.
- `reply_to`: Username (without @) of the person being replied to; absent when the post is not a reply and on some requests.
- `reply_to_id`: ID of the post being replied to; absent when the post is not a reply and on some requests.
- `word_count`: Number of words in text, counted by splitting on spaces (video_transcript).

### Pricing

Pay per event, charged only when a run delivers data:

- `search`: $0.0018, one event per started block of 25 results.
- `profile`: $0.0010, one event per non-empty request, whatever the row count.
- `user_posts`: $0.0016, one event per started block of 20 results.
- `post`: $0.0010, one event per non-empty request, whatever the row count.
- `comments`: $0.0016, one event per started block of 20 results.
- `trending`: $0.0008, one event per non-empty request, whatever the row count.
- `followers_list`: $0.0080, one event per started block of 200 results.
- `following_list`: $0.0080, one event per started block of 200 results.

Empty or failed requests are never charged. There is no actor-start fee and no per-row fee, and platform usage is included in these prices.

### Free trial

The first 3 accepted data requests per Apify account are free across all EveryInfra Actors combined (a lifetime total, not per Actor and not reset). Invalid input does not use a trial; an accepted request that returns no data still does. After that a paid Apify plan is required.

### Notes

- Results reflect what is publicly visible when the run happens; counts can be lower than requested.
- One run makes one request. For more pages, start another run with `page_token` where the action supports it.
- This is an independent Actor. It is not affiliated with, sponsored by, or endorsed by X (Twitter) or its owner; names and trademarks belong to their respective owners.

### Support

Open an issue on this Actor's Issues tab with the run ID.

# Actor input Schema

## `action` (type: `string`):

What to fetch. Each action uses only the fields listed for it below; other fields are ignored when empty.

## `keyword` (type: `string`):

Used by `search` (required). X post query string; it may include platform search operators such as from: or since:. For ordering, see sort.

## `sort` (type: `string`):

Used by `search`. Ordering preference. latest asks for the newest posts first; X returns Top results by default, and latest does not guarantee strictly chronological results.

## `username` (type: `string`):

Used by `profile` (required), `user_posts` (required), `followers_list` (required), `following_list` (required). X username, optionally prefixed with @, without entering a full profile URL. profile compiles data from author details within recent posts; followers_list and following_list retrieve visible followers and following accounts respectively.

## `id` (type: `string`):

Used by `post` (required), `comments` (required). Numeric post ID for post or comments, corresponding to the digits following x.com/username/status/. It is recommended to store this as a string to prevent JavaScript large integer precision loss; do not pass full URLs into id.

## `tweet_id` (type: `string`):

Used by `post`, `comments`. Compatibility input for id, with lower precedence than id, which does not replace the required public id field.

## `country` (type: `string`):

Used by `trending`. Region code for trending, with world as the global default. Supports us, ca, mx, uk/gb, fr, de, it, es, pt, nl, dk, at, be, ch, gr, ru, tr, kr, sg, id, ph, vn, th, au, il, ae, sa, ar, br, eg, ng, ke, za, jp, and some English country names. Unrecognized inputs return the global ranking.

## `limit` (type: `integer`):

How many results to request for list actions. Defaults and maximums per action: `search` 25 (max 200); `user_posts` 20 (max 200); `comments` 20 (max 50); `followers_list` 200 (max 2000); `following_list` 200 (max 2000). Billing: `search` one event per started block of 25 results; `user_posts` one event per started block of 20 results; `comments` one event per started block of 20 results; `followers_list` one event per started block of 200 results; `following_list` one event per started block of 200 results.

## `params` (type: `object`):

Optional JSON object with the same fields as above, for API and integration use. Flat fields and params must not disagree.

## Actor input object example

```json
{
  "action": "search",
  "keyword": "open source"
}
```

# Actor output Schema

## `records` (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 = {
    "keyword": "open source"
};

// Run the Actor and wait for it to finish
const run = await client.actor("blushing_parachute/everyinfra-twitter-api").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 = { "keyword": "open source" }

# Run the Actor and wait for it to finish
run = client.actor("blushing_parachute/everyinfra-twitter-api").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 '{
  "keyword": "open source"
}' |
apify call blushing_parachute/everyinfra-twitter-api --silent --output-dataset

```

## MCP server setup

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

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/adu3C6lgXiwKc8o8a/builds/7ZwUaGFk1S9VGJAk0/openapi.json
