# X Twitter Profile Lookup (`agentx/x-twitter-profile-lookup`) Actor

Bulk Twitter profile lookup exports up to 1,000 identity-matched public X profiles per run with 38 possible sparse fields and $0.00250 per result.

- **URL**: https://apify.com/agentx/x-twitter-profile-lookup.md
- **Developed by:** [AgentX](https://apify.com/agentx) (community)
- **Categories:** Social media, Lead generation, Developer tools
- **Stats:** 134 total users, 3 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.88 / 1,000 results

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Profile Lookup is a bulk twitter profile lookup that converts 1–1,000 known public X handles or profile URLs into sparse 38-field account records.** It supports repeatable audience research, creator qualification, monitored account panels, and enrichment workflows that need identity-matched rows rather than copied pages.

[![Apify Users](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.apify.com%2Fv2%2Facts%2Fagentx~x-twitter-profile-lookup\&query=%24.data.stats.totalUsers\&style=for-the-badge\&label=Apify%20Users\&color=ff9013)](https://apify.com/agentx/x-twitter-profile-lookup) [![Apify Runs](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.apify.com%2Fv2%2Facts%2Fagentx~x-twitter-profile-lookup\&query=%24.data.stats.totalRuns\&style=for-the-badge\&label=Apify%20Runs\&color=ff9013)](https://apify.com/agentx/x-twitter-profile-lookup) [![$0.00250 / result](https://img.shields.io/badge/%240.00250%20%2F%20result-4285f4?style=for-the-badge)](https://apify.com/agentx/x-twitter-profile-lookup/pricing) [![38-field profiles](https://img.shields.io/badge/38--field%20profiles-34a853?style=for-the-badge)](https://console.apify.com/actors/PVpATK5xrZz1JBNvn/input) [![API + MCP ready](https://img.shields.io/badge/API%20%2B%20MCP%20ready-fbbc05?style=for-the-badge)](https://apify.com/agentx/x-twitter-profile-lookup/api)

- **One run accepts a required list of 1–1,000 strict handles, @handles, or canonical HTTPS profile URLs.**
- **Each retained row has a matching requested/returned username and up to 38 sparse top-level fields.**
- **Unavailable or identity-mismatched accounts produce no placeholder row and no Result charge.**
- **Avatar and banner fields remain only when their images can be stored successfully.**

The smallest useful FREE-tier run costs $0.01 for Actor Start plus $0.00250 for one saved Profile Result, or **$0.01250 total**.

### Why Choose X Twitter Profile Lookup

**Known-account batching.** Submit one account for a low-risk test or up to 1,000 identifiers in one run. Case-insensitive deduplication preserves first-seen order and prevents duplicate work.

**Profile depth.** A successful row can cover identity, public bio and location, verification labels, account dates, follower and content counts, professional category, public links, pinned-post details, posting-source labels, stored imagery, and processing provenance.

**Honest partial outcomes.** One missing account does not erase valid profiles from the same batch. Optional timeline failure does not discard the core profile, while a wrong returned identity is rejected.

**Sparse data.** Missing values remain absent rather than becoming guessed facts. Consumers can distinguish an observed zero or false value from a field the source did not provide.

### Quick Start Guide

#### Step 1: Configure

Open the input form and keep `OpenAI`, or replace it with another known 1–15 character X handle. `@OpenAI` and `https://x.com/OpenAI` normalize to the same identity.

#### Step 2: Run

Start the Actor and wait for the terminal ready, unavailable, and failed counts. A valid-looking handle can still be unavailable, so inspect the Dataset count separately.

#### Step 3: Collect

Export successful rows as JSON, CSV, Excel, XML, or RSS. Preserve `user_id`, `user_name`, `processed_at`, and the run ID when joining or comparing observations.

```json
{"usernames":["OpenAI"]}
```

### Input Parameters

X Twitter Profile Lookup exposes one required input property.

| Parameter | Type | Required | Limits | Description |
| --- | --- | --- | --- | --- |
| `usernames` | array of strings | Yes | 1–1,000 | X handles, @handles, or exact HTTPS X/Twitter one-segment profile URLs |

Handles use letters, digits, and underscores and contain 1–15 characters. URLs must use `https`, an exact X/Twitter host, no credentials or custom port, and one profile path segment. Post, search, list, and embedded foreign URLs are rejected. Duplicate normalized handles are removed.

The Actor does not accept display-name searches, keywords, IDs, cookies, credentials, follower limits, location filters, or date filters. Invalid items are ignored only when at least one usable handle remains.

### Output Data Schema

Each retained Dataset item is one identity-matched public profile with up to 38 top-level fields.

| Group | Fields | Meaning |
| --- | --- | --- |
| Identity | `user_id`, `user_name`, `display_name`, `description`, `location` | Public account identity and self-presented context |
| Verification | `verified`, `blue_verified`, `verified_type`, `verified_at`, `affiliate_label` | Source-reported labels and dates, not independent verification |
| Counts | `followers_count`, `following_count`, `statuses_count`, `favourites_count`, `listed_count`, `media_count` | Current public counter snapshots |
| Account | `created_at`, `protected`, `sensitive`, `account_type`, `account_category`, `creator_subscriptions`, `business_affiliates`, `highlighted_tweets` | Source-reported account flags and category fields |
| Links and media | `profile_urls`, `description_urls`, `avatar_url`, `banner_url` | Public links plus successfully stored imagery |
| Timeline | `pinned_tweet`, `pinned_tweet_ids`, `posting_sources` | Available pinned-post observation and first-seen source labels |
| Other | `birthdate`, `profile_language`, `custom_timelines`, `default_profile` | Sparse public source fields |
| Processing | `status`, `processor`, `processed_at` | Outcome, producing Actor, and observation time |

This JSON is abbreviated; a real row can expose up to 38 top-level keys.

```json
{
  "user_id":"4398626122",
  "user_name":"OpenAI",
  "display_name":"OpenAI",
  "description":"OpenAI’s mission is to ensure AGI benefits all of humanity.",
  "followers_count":5102563,
  "blue_verified":true,
  "status":"success",
  "processor":"https://apify.com/agentx/x-twitter-profile-lookup",
  "processed_at":"2026-08-12T18:55:00+00:00"
}
```

Optional keys are omitted when unavailable. `posting_sources` is a first-seen sample from the recent public timeline, not a complete device history. `pinned_tweet` is omitted when no pinned entry is returned.

### Integration Examples

Use Actor ID `PVpATK5xrZz1JBNvn` or name `agentx/x-twitter-profile-lookup` through HTTP, SDKs, automation platforms, or MCP.

```bash
curl -X POST "https://api.apify.com/v2/acts/PVpATK5xrZz1JBNvn/runs?token=$APIFY_TOKEN" -H "Content-Type: application/json" -d '{"usernames":["OpenAI"]}'
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("PVpATK5xrZz1JBNvn").call(run_input={"usernames": ["OpenAI"]})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('PVpATK5xrZz1JBNvn').call({ usernames: ['OpenAI'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

For MCP, connect the Apify MCP server, select `agentx/x-twitter-profile-lookup`, and pass `{"usernames":["OpenAI"]}`. Poll an existing run ID when a client wait expires rather than launching a duplicate.

### Pricing

X Twitter Profile Lookup costs $0.00250 per saved Profile Result on FREE, plus $0.01 Actor Start; the smallest successful run is $0.01250.

| Event | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| Actor Start | $0.01000 | $0.01000 | $0.01000 | $0.01000 | $0.01000 | $0.01000 |
| Profile Result | $0.00250 | $0.00225 | $0.00200 | $0.00188 | $0.00188 | $0.00188 |

Actor Start is once per run. Profile Result repeats only for saved rows. One FREE result costs `$0.01 + $0.00250 = $0.01250`; 100 results cost `$0.01 + (100 × $0.00250) = $0.26`. Unavailable users have no Result charge. Prices can change; check the [pricing page](https://apify.com/agentx/x-twitter-profile-lookup/pricing).

### Use Cases

**Creator qualification.** Compare bio, location, labels, counts, links, and pinned context before a human reviews a known account.

**Audience panels.** Schedule selected handles and retain `processed_at` to observe directional changes in counts, descriptions, categories, or pinned posts.

**CRM enrichment.** Add a public X identity and timestamped profile fields to a record that already has a known handle. Do not infer consent or private contact data.

**Account monitoring.** Detect unavailable accounts, changed handles, or sparse responses while keeping identity validation and human review in the workflow.

**Research exports.** Build reproducible account tables for public-interest, brand, developer, media, or market research without presenting a snapshot as verified truth.

### Alternatives

Manual profile review is preferable for one consequential account when current posts and page context matter. It is hard to repeat consistently across a larger known list and copied data loses provenance.

X offers official [User Lookup](https://docs.x.com/x-api/users/lookup/introduction) endpoints for approved developers with authentication. Use them when the official API, its quotas, fields, and policy contract are required. This Actor is independent and is not the official X API.

Choose a search or post product when you need discovery by name/keyword, timelines, replies, followers, following lists, email discovery, private data, or engagement analytics.

### Limits and Troubleshooting

- **Fewer rows than inputs:** invalid and duplicate handles are normalized away; unavailable or identity-mismatched users produce no placeholder.
- **No row:** verify the 1–15 character handle, open the public profile, inspect terminal counts, and retry later.
- **Missing field:** absence means “not retained from this snapshot,” not factual zero.
- **Missing avatar/banner:** the text record survives when an image cannot be validated and stored.
- **No pinned post:** `pinned_tweet` is optional and depends on the recent public timeline response.
- **Changing counts:** preserve `processed_at` and compare repeated observations before interpretation.

Open an Issue with the run ID, redacted input, terminal message, Dataset count, observed keys, and expected behavior. Never send tokens or private data.

### Trust and Reliability

Apify provides isolated runs, storage, schedules, webhooks, Dataset exports, and API access. The Actor declares one 1–1,000-item input and a 38-field sparse output contract.

The requested normalized handle must equal the returned source handle. Core profile success survives optional pinned-timeline failure, but a wrong identity is rejected. Result billing occurs only after successful persistence.

X's official [username lookup reference](https://docs.x.com/x-api/users/get-user-by-username) documents the same 1–15 character handle pattern and identifies public fields such as name, description, location, links, protection, metrics, verification, imagery, and pinned-post ID.

### Legal and Compliance

Public visibility does not remove privacy, intellectual-property, database-right, contractual, employment, advertising, or consumer-protection obligations. Establish a lawful purpose, minimize retention, protect tokens and Datasets, and honor deletion or suppression duties.

Do not use the output for harassment, sensitive profiling, spam, access-control evasion, or high-impact automated decisions without appropriate authority and human review. A follower, label, or posting source does not imply consent, authenticity, affiliation, or endorsement.

Review the current [X Terms of Service](https://x.com/en/tos) and [Apify General Terms](https://docs.apify.com/legal/general-terms-and-conditions) before production use.

### Frequently Asked Questions

#### How do I perform a bulk twitter profile lookup without an X developer key?

Submit known public handles to the Actor with an Apify token. It does not request an X developer key, but it remains independent from the official X API.

#### Can I use full X profile URLs?

Yes. Exact HTTPS one-segment profile URLs normalize to the same case-insensitive handle as plain and @handle forms.

#### Does the Actor search by display name?

No. It resolves known handles only and does not discover accounts by names, bios, or keywords.

#### Is there a free Twitter profile API?

This Actor is pay per event. The current smallest successful FREE-tier run costs $0.01250 rather than promising permanently free access.

#### Can I schedule runs to monitor X profiles over time?

Yes. Retain `processed_at` and compare snapshots cautiously because public values and availability can change.

#### Does posting\_sources identify every device?

No. It contains first-seen public posting-source labels from the recent timeline response and is not a complete device history.

### Related AgentX Actors

AgentX includes 77 Actors across social, jobs, property, shopping, vehicle, media, and automation categories. The three closest extensions are:

- **[X Twitter Community API](https://apify.com/agentx/x-twitter-community-api)** — resolve known X Community profiles under a separate schema.
- **[Instagram Creator Scraper](https://apify.com/agentx/instagram-creator-scraper)** — enrich a known Instagram creator.
- **[TikTok Creator API](https://apify.com/agentx/tiktok-creator-api)** — retrieve public TikTok creator context.

#### Business and Market Intelligence

- **[Google Keyword Trends](https://apify.com/agentx/google-keyword-trends)** — Google Trends keyword interest, compared five at a time
- **[Google Trends Scraper](https://apify.com/agentx/google-trends-scraper)** — Google Trends trending searches
- **[Google Maps Store Scraper](https://apify.com/agentx/google-maps-store-scraper)** — Google Maps business listings
- **[LinkedIn Company Lookup](https://apify.com/agentx/linkedin-company-lookup)** — LinkedIn company records
- **[LinkedIn Profile Lookup](https://apify.com/agentx/linkedin-profile-lookup)** — LinkedIn profile records
- **[Weather Forecast API](https://apify.com/agentx/weather-forecast-api)** — forecast and historical weather data

#### Jobs and Hiring

- **[All Jobs Scraper](https://apify.com/agentx/all-jobs-scraper)** — multi-platform job listings
- **[Bayt Jobs Scraper](https://apify.com/agentx/bayt-jobs-scraper)** — Bayt job listings
- **[Glassdoor Jobs Scraper](https://apify.com/agentx/glassdoor-jobs-scraper)** — Glassdoor job listings
- **[Indeed Jobs Scraper](https://apify.com/agentx/indeed-jobs-scraper)** — Indeed job listings
- **[JobStreet Company Profile](https://apify.com/agentx/jobstreet-company-profile)** — JobStreet employer records
- **[Jooble Jobs Scraper](https://apify.com/agentx/jooble-jobs-scraper)** — Jooble job listings
- **[LinkedIn Jobs Scraper](https://apify.com/agentx/linkedin-jobs-scraper)** — LinkedIn job listings
- **[Naukri Jobs Scraper](https://apify.com/agentx/naukri-jobs-scraper)** — Naukri job listings
- **[Talent Jobs Scraper](https://apify.com/agentx/talent-jobs-scraper)** — Talent.com job listings
- **[ZipRecruiter Jobs Scraper](https://apify.com/agentx/ziprecruiter-jobs-scraper)** — ZipRecruiter job listings

#### Social Media

- **[Instagram Creator Scraper](https://apify.com/agentx/instagram-creator-scraper)** — Instagram creator profiles
- **[Instagram Reels Scraper](https://apify.com/agentx/instagram-reels-scraper)** — Instagram Reels metadata
- **[Instagram Trending Scraper](https://apify.com/agentx/instagram-trending-scraper)** — Instagram trending content
- **[Medium Scraper](https://apify.com/agentx/medium-scraper)** — Medium articles
- **[Medium Profile Scraper](https://apify.com/agentx/medium-profile-scraper)** — Medium author profiles
- **[Reddit Profile Scraper](https://apify.com/agentx/reddit-profile-scraper)** — Reddit user profiles
- **[Reddit Viral Scraper](https://apify.com/agentx/reddit-viral-scraper)** — Reddit viral posts
- **[SubReddit Info Scraper](https://apify.com/agentx/subreddit-info-scraper)** — subreddit metadata
- **[Subreddit Members Scraper](https://apify.com/agentx/subreddit-members-scraper)** — subreddit member lists
- **[Subreddit Posts Scraper](https://apify.com/agentx/subreddit-posts-scraper)** — subreddit post feeds
- **[Telegram Chat Scraper](https://apify.com/agentx/telegram-chat-scraper)** — Telegram chat messages
- **[Telegram Info Scraper](https://apify.com/agentx/telegram-info-scraper)** — Telegram channel metadata
- **[Telegram Member Adder](https://apify.com/agentx/telegram-member-adder)** — Telegram group membership management
- **[Telegram Member Scraper](https://apify.com/agentx/telegram-member-scraper)** — Telegram group members
- **[Telegram Private Group Scraper](https://apify.com/agentx/telegram-private-group-scraper)** — private Telegram group data
- **[TikTok Creator API](https://apify.com/agentx/tiktok-creator-api)** — TikTok creator profiles
- **[TikTok User Lookup](https://apify.com/agentx/tiktok-user-lookup)** — TikTok account records
- **[X Twitter Community API](https://apify.com/agentx/x-twitter-community-api)** — X community data
- **[YouTube Creator Email Scraper](https://apify.com/agentx/youtube-creator-email-scraper)** — YouTube creator contact data

#### Video, Transcripts and Downloads

- **[All Video Scraper](https://apify.com/agentx/all-video-scraper)** — multi-platform video metadata
- **[Video Transcript](https://apify.com/agentx/video-transcript)** — multi-platform transcripts
- **[Video Captions Downloader](https://apify.com/agentx/video-captions-downloader)** — caption files
- **[Video to Social Post](https://apify.com/agentx/video-to-social-post)** — video repurposed into social copy
- **[YouTube Transcript](https://apify.com/agentx/youtube-transcript)** — YouTube transcripts
- **[TikTok Transcript](https://apify.com/agentx/tiktok-transcript)** — TikTok transcripts
- **[X Twitter Transcript](https://apify.com/agentx/x-twitter-transcript)** — X video transcripts
- **[Facebook Transcript](https://apify.com/agentx/facebook-transcript)** — Facebook video transcripts
- **[Bilibili Transcript](https://apify.com/agentx/bilibili-transcript)** — Bilibili transcripts
- **[Dailymotion Transcript](https://apify.com/agentx/dailymotion-transcript)** — Dailymotion transcripts
- **[Rutube Transcript](https://apify.com/agentx/rutube-transcript)** — Rutube transcripts
- **[Loom Transcript](https://apify.com/agentx/loom-transcript)** — Loom transcripts
- **[Wistia Transcript](https://apify.com/agentx/wistia-transcript)** — Wistia transcripts
- **[Instagram Reels Downloader](https://apify.com/agentx/instagram-reels-downloader)** — Reels downloads
- **[Kick Clip Downloader](https://apify.com/agentx/kick-clip-downloader)** — Kick clip downloads
- **[Linkedin Video Downloader](https://apify.com/agentx/linkedin-video-downloader)** — LinkedIn video downloads
- **[Pinterest Video Downloader](https://apify.com/agentx/pinterest-video-downloader)** — Pinterest video downloads
- **[Reddit Video Downloader](https://apify.com/agentx/reddit-video-downloader)** — Reddit video downloads
- **[Snapchat Video Downloader](https://apify.com/agentx/snapchat-video-downloader)** — Snapchat video downloads
- **[TED Talk Downloader](https://apify.com/agentx/ted-talk-downloader)** — TED talk downloads
- **[TikTok Live Downloader](https://apify.com/agentx/tiktok-live-downloader)** — TikTok live downloads
- **[Twitch VOD Downloader](https://apify.com/agentx/twitch-vod-downloader)** — Twitch VOD downloads
- **[Zoom Recording Downloader](https://apify.com/agentx/zoom-recording-downloader)** — Zoom recording downloads

#### E-Commerce and Retail

- **[All Shopping Scraper](https://apify.com/agentx/all-shopping-scraper)** — multi-platform product data
- **[AliExpress Product Scraper](https://apify.com/agentx/aliexpress-product-scraper)** — AliExpress products
- **[Amazon Storefront Scraper](https://apify.com/agentx/amazon-storefront-scraper)** — Amazon Brand Store pages
- **[Bol Product Scraper](https://apify.com/agentx/bol-product-scraper)** — Bol.com products
- **[eBay Seller Leads API](https://apify.com/agentx/ebay-seller-leads-api)** — eBay seller records
- **[Hepsiburada Product Scraper](https://apify.com/agentx/hepsiburada-product-scraper)** — Hepsiburada products
- **[Kakaku Product Scraper](https://apify.com/agentx/kakaku-product-scraper)** — Kakaku.com products
- **[Rakuten Product Scraper](https://apify.com/agentx/rakuten-product-scraper)** — Rakuten products

#### Classifieds and Automotive

- **[All Vehicle Scraper](https://apify.com/agentx/all-vehicle-scraper)** — multi-platform vehicle listings
- **[AutoTrader Vehicle Search](https://apify.com/agentx/autotrader-vehicle-search)** — AutoTrader US listings
- **[AutoTrader UK Vehicle Search](https://apify.com/agentx/autotrader-uk-vehicle-search)** — AutoTrader UK listings

#### Real Estate

- **[All Property Scraper](https://apify.com/agentx/all-property-scraper)** — multi-platform property listings
- **[Homes Property Scraper](https://apify.com/agentx/homes-property-scraper)** — Homes.com listings
- **[MagicBricks Property Scraper](https://apify.com/agentx/magicbricks-property-scraper)** — MagicBricks listings
- **[NoBroker Property Scraper](https://apify.com/agentx/nobroker-property-scraper)** — NoBroker listings
- **[Property24 Property Scraper](https://apify.com/agentx/property24-property-scraper)** — Property24 listings
- **[Realtor Property Scraper](https://apify.com/agentx/realtor-property-scraper)** — Realtor.com listings
- **[Zillow Property Scraper](https://apify.com/agentx/zillow-property-scraper)** — Zillow listings

### Support and Community

Ask about handles, sparse profile fields, unavailable accounts, pricing, Datasets, or integrations in the [AgentX community on Telegram](https://t.me/Apify_Actor); for a reproducible bug, open an Issue with the run ID and exact redacted input.

AgentX is an Arcyton brand — [arcyton.com](https://arcyton.com).

**Last Updated:** August 12, 2026

# Actor input Schema

## `usernames` (type: `array`):

Enter 1 to 1,000 X handles, @handles, or exact HTTPS X/Twitter profile URLs. Invalid, unavailable, or identity-mismatched users do not create placeholder rows.

## Actor input object example

```json
{
  "usernames": [
    "OpenAI"
  ]
}
```

# Actor output Schema

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

Open successfully resolved public profile rows in the default Dataset. Each row exposes up to 38 sparse top-level fields.

# 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 = {
    "usernames": [
        "OpenAI"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("agentx/x-twitter-profile-lookup").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 = { "usernames": ["OpenAI"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agentx/x-twitter-profile-lookup"
        }
    }
}

```

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/PVpATK5xrZz1JBNvn/builds/tUD55tbenqpKeUbn8/openapi.json
