# X / Twitter Account Origin Intelligence (`arjun_code/x-twitter-account-origin-scraper`) Actor

Check X-reported account country or region, app/source labels, username-change counts, and the latest change date. Enter usernames, profile URLs, or user IDs to collect account background and profile details for research. Export JSON, CSV, or Excel. No X login required.

- **URL**: https://apify.com/arjun_code/x-twitter-account-origin-scraper.md
- **Developed by:** [ArjunAI Data](https://apify.com/arjun_code) (community)
- **Categories:** Agents, Social media, SEO tools
- **Features:** Limited permissions
- **Stats:** 51 total users, 17 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.35 / 1,000 account lookup completeds

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?

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

Review the country or region and app/source labels X reports for an account, alongside its username-change count and latest change date. Enter a username, profile URL, or numeric user ID to collect these background signals together with public profile details. Export JSON, CSV, or Excel for account research.

### 🚀 Quick start

1. Enter usernames or profile links, numeric user IDs, or both.
2. Click **Start**.
3. Review account background, profile details, and the status of each lookup.
4. Export JSON, CSV, or Excel.

Start with one account; a run accepts up to 100 combined normalized inputs.

```json
{
  "screenNames": [
    "https://x.com/apify"
  ]
}
```

### 🔗 Ready-to-run examples

Open an example, review its input and spending limit, then run it in your Apify account.

- [Check X Account Origin from a Profile Link](https://apify.com/arjun_code/x-twitter-account-origin-scraper/examples/find-x-account-origin-from-profile-url)
- [Look Up X Account Background by User ID](https://apify.com/arjun_code/x-twitter-account-origin-scraper/examples/look-up-x-account-origin-by-user-id)
- [Review X Account Background and Username Changes](https://apify.com/arjun_code/x-twitter-account-origin-scraper/examples/investigate-x-accounts-for-osint-research)

### 📊 Results

Each completed lookup reports an available profile, an account that was not found, or a suspended account. Completed lookups are billable according to the Pricing tab; request and system failures are not completed-lookup results.

| Field group | Fields |
| --- | --- |
| Result | `status`, `requested_screen_name`, `requested_user_id`, `error` |
| Identity | `user_id`, `screen_name`, `name`, `profile_url`, `description`, `location`, `website_url`, `account_created_at` |
| Account origin | `account_based_in`, `account_source`, `created_country_accurate`, `account_location_accurate` |
| Verification and affiliation | `verification_type`, `affiliate_username`, `affiliation_name`, `affiliation_url`, `affiliation_badge_url`, `account_label` |
| Professional profile | `professional_type`, `professional_categories`, `bio_links`, `pinned_tweet_ids` |
| Username changes | `username_changes_count`, `username_last_changed_at`, `username_last_changed_at_msec` |
| Audience and activity | `followers_count`, `following_count`, `tweets_count`, `media_count`, `likes_count`, `listed_count` |
| Account state | `verified`, `blue_verified`, `protected`, `possibly_sensitive`, `business_affiliates_count`, `creator_subscriptions_count`, `profile_interstitial_type`, `default_profile_image`, `can_media_tag`, `withheld_scope`, `withheld_description` |
| Images | `profile_image_url`, `profile_banner_url` |
| Original data | `profile` preserves the Actor's earlier source-field shape and adds enrichment fields under their native X names and object structures. |

`account_source`, `following_count`, `tweets_count`, `likes_count`, and `blue_verified` are clearer top-level names for native values also retained as `profile.source`, `profile.friends_count`, `profile.statuses_count`, `profile.favourites_count`, and `profile.is_blue_verified`. ISO date fields are derived from X's native date or millisecond timestamp values; the raw username-change timestamp is also retained.

### Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `screenNames` | `string[]` | No\* | Enter usernames, `@handles`, or full X/Twitter profile URLs. |
| `userIds` | `string[]` | No\* | Enter numeric X user IDs such as `3510729917`. IDs remain stable after username changes. |

Provide at least one valid value in `screenNames` or `userIds`. A run accepts at most 100 combined account inputs after normalization and deduplication within each field. The limit applies before successful results are deduplicated by native X user ID. If no valid input remains, or if the combined total exceeds 100, the Actor writes one `invalid_input` record without a lookup fee and stops before making an X request. Split larger lists across several runs.

No X login, cookies, API key, or proxy setup is required. Results can be downloaded from the Dataset or used through the Apify API, schedules, webhooks, and integrations.

### 💰 Pricing

This Actor uses pay-per-event pricing:

| Charge | Base price | What it covers |
| --- | --- | --- |
| Actor start | $0.00005 per start event | One start event at the Actor's available memory settings. |
| Account lookup completed | $0.0005 per account ($0.50 / 1,000) | Each saved `success`, confirmed `not_found`, or explicitly `suspended` result. |

#### Subscription discounts

Save up to **30% on completed lookups** with higher Apify subscription tiers. Your eligible price applies automatically based on your Apify subscription, not the number of accounts you enter. No discount code is needed.

| Apify subscription tier | Per completed lookup | Per 1,000 completed lookups | Lookup discount |
| --- | ---: | ---: | ---: |
| FREE | $0.0005 | $0.50 | Base price |
| BRONZE | $0.00045 | $0.45 | 10% |
| SILVER | $0.0004 | $0.40 | 20% |
| GOLD / PLATINUM / DIAMOND | $0.00035 | $0.35 | 30% |

Discounts apply only to the completed lookup fee. The Actor start fee remains **$0.00005** at every tier.

For example, 100 completed lookups in one run cost **$0.05005 on FREE** or **$0.03505 on GOLD, PLATINUM, or DIAMOND**, including one start event. The same lookup rate applies whether the results contain profiles, confirmed not-found accounts, suspended accounts, or a mix. A spending limit can stop the run before all inputs are checked.

Invalid input, request failures, unprocessed accounts, and `partial` summaries do not incur a completed lookup fee; the start fee still applies when the run starts. Automatic retries do not create extra lookup fees. Duplicate successful profiles are saved and charged only once.

For developers, the completed lookup event retains its existing ID, `profile-result`. The Actor stops querying when your spending limit cannot cover another completed lookup. See the [Pricing tab](https://apify.com/arjun_code/x-twitter-account-origin-scraper/pricing) for current prices and discounts for your subscription.

### What account origin and username changes mean

#### Does this return every previous username?

The Actor reports the username-change count and latest change date when X provides them. Use [Profile Monitor](https://apify.com/arjun_code/x-twitter-profile-username-history-monitor) to record changes observed across your own monitoring runs.

#### What does account origin mean?

These are the country or region and app/source labels reported by X. Treat them as account background signals; they do not establish a person's real-time location or prove the device used to register the account.

### Result availability and statuses

- Results depend on data currently returned by X/Twitter and individual fields may be empty or unavailable.
- Account-origin signals are reported by X and should not be treated as independent proof of a person's identity, nationality, or physical location.
- Accounts X explicitly reports as suspended are returned with `status: "suspended"`. Not-found, deleted, renamed, or otherwise unavailable accounts remain `not_found`; X may not provide a more specific reason. The Actor continues processing the remaining accounts.
- Temporary request failures are retried automatically. An uncharged `request_failed` record identifies an account that could not be checked; a `partial` record explains when a run stops early because X remains unavailable.
- X may change its response structure or access controls, which can temporarily affect availability.
- Previously saved results remain available if a later request fails.

### Result examples

The examples below were captured from successful runs on November 10, 2026. Counts and availability can change. They correspond to the Quick start or separately labeled input above.

#### Account background and profile

```json
{
  "status": "success",
  "requested_screen_name": "apify",
  "requested_user_id": "",
  "user_id": "3510729917",
  "screen_name": "apify",
  "name": "Apify",
  "profile_url": "https://x.com/apify",
  "account_based_in": "Czechia",
  "account_source": "Web",
  "created_country_accurate": true,
  "account_location_accurate": true,
  "verification_type": "Business",
  "affiliate_username": null,
  "affiliation_name": null,
  "affiliation_url": null,
  "affiliation_badge_url": null,
  "account_label": null,
  "professional_type": "Business",
  "professional_categories": [],
  "username_changes_count": 3,
  "username_last_changed_at": "2017-10-09T13:30:52.904Z",
  "username_last_changed_at_msec": 1507555852904,
  "account_created_at": "2015-09-01T08:38:01Z",
  "description": "Thousands of Actors to automate your business, get real-time web data, and equip your AI agents.  ➡️  https://t.co/rySkh8pPkM • https://t.co/PiUfLvrm0u • https://t.co/x4G1meKqfK",
  "location": "The Interwebz",
  "website_url": "https://apify.com",
  "bio_links": [
    "http://apify.com",
    "http://mcp.apify.com",
    "http://github.com/apify"
  ],
  "followers_count": 22390,
  "following_count": 307,
  "tweets_count": 5315,
  "media_count": 1360,
  "likes_count": 4803,
  "listed_count": 152,
  "verified": false,
  "blue_verified": false,
  "protected": false,
  "possibly_sensitive": false,
  "business_affiliates_count": 4,
  "creator_subscriptions_count": 0,
  "profile_image_url": "https://pbs.twimg.com/profile_images/2036008913192316928/yuW3cobE_normal.png",
  "profile_banner_url": "https://pbs.twimg.com/profile_banners/3510729917/1791211391",
  "pinned_tweet_ids": [
    "2109661698982305935"
  ],
  "profile_interstitial_type": null,
  "default_profile_image": false,
  "can_media_tag": true,
  "withheld_scope": null,
  "withheld_description": null,
  "profile": {
    "account_based_in": "Czechia",
    "source": "Web",
    "created_country_accurate": true,
    "rest_id": "3510729917",
    "username_changes": {
      "count": "3",
      "last_changed_at_msec": "1507555852904"
    },
    "user_created_at": "Tue Sep 01 08:38:01 +0000 2015",
    "description": "Thousands of Actors to automate your business, get real-time web data, and equip your AI agents.  ➡️  https://t.co/rySkh8pPkM • https://t.co/PiUfLvrm0u • https://t.co/x4G1meKqfK",
    "entities": {
      "description": {
        "urls": [
          {
            "display_url": "apify.com",
            "expanded_url": "http://apify.com",
            "indices": [
              102,
              125
            ],
            "url": "https://t.co/rySkh8pPkM"
          },
          {
            "display_url": "mcp.apify.com",
            "expanded_url": "http://mcp.apify.com",
            "indices": [
              128,
              151
            ],
            "url": "https://t.co/PiUfLvrm0u"
          },
          {
            "display_url": "github.com/apify",
            "expanded_url": "http://github.com/apify",
            "indices": [
              154,
              177
            ],
            "url": "https://t.co/x4G1meKqfK"
          }
        ]
      },
      "url": {
        "urls": [
          {
            "display_url": "apify.com",
            "expanded_url": "https://apify.com",
            "indices": [
              0,
              23
            ],
            "url": "https://t.co/VWktFqWjsp"
          }
        ]
      }
    },
    "is_blue_verified": false,
    "business_account": {
      "affiliates_count": 4
    },
    "creator_subscriptions_count": 0,
    "has_graduated_access": true,
    "favourites_count": 4803,
    "followers_count": 22390,
    "friends_count": 307,
    "listed_count": 152,
    "location": "The Interwebz",
    "media_count": 1360,
    "user_name": "Apify",
    "normal_followers_count": 22390,
    "possibly_sensitive": false,
    "has_custom_timelines": false,
    "needs_phone_verification": false,
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/3510729917/1791211391",
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/2036008913192316928/yuW3cobE_normal.png",
    "protected": false,
    "user_screen_name": "apify",
    "statuses_count": 5315,
    "verified": false,
    "utc_offset": 0,
    "url": "https://t.co/VWktFqWjsp",
    "location_accurate": true,
    "verification": {
      "verified": false,
      "verified_type": "Business"
    },
    "identity_profile_labels_highlighted_label": {},
    "affiliates_highlighted_label": {},
    "parody_commentary_fan_label": "None",
    "professional": {
      "category": [],
      "professional_type": "Business",
      "rest_id": "1583013496266137600"
    },
    "verified_type": "Business",
    "pinned_tweet_ids_str": [
      "2109661698982305935"
    ],
    "profile_interstitial_type": "",
    "default_profile_image": false,
    "can_media_tag": true,
    "withheld_scope": "",
    "withheld_description": ""
  }
}
```

### API and integrations

Use your Apify API token in the request header.

```bash
curl -X POST \
  "https://api.apify.com/v2/actors/arjun_code~x-twitter-account-origin-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"screenNames":["https://x.com/apify"]}'
```

This starts a run and returns its ID. After the run finishes, use its `defaultDatasetId` to download the results. You can also save the input as a Task, schedule it, or use Apify integrations.

#### Python Client 3.x

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("arjun_code/x-twitter-account-origin-scraper").call(
    run_input={'screenNames': ['https://x.com/apify']}
)
if run is not None:
    for item in client.dataset(run.default_dataset_id).iterate_items():
        print(item)
```

### Continue your research

- [Track future profile changes with Profile Monitor](https://apify.com/arjun_code/x-twitter-profile-username-history-monitor)
- [Find accounts by keyword with People Search](https://apify.com/arjun_code/x-twitter-people-search-scraper)
- [Export audience profiles with Followers & Following](https://apify.com/arjun_code/x-twitter-followers-followings-scraper)

### Privacy and responsible use

This Actor processes publicly accessible X/Twitter account and profile metadata. Use the results only for lawful purposes and in accordance with applicable privacy laws, X's terms, and Apify's terms. Do not use account-origin signals alone to make high-impact decisions about individuals.

### Support

If a run fails or a field is unexpectedly missing, open an issue from the Actor's **Issues** tab and include the run ID. Do not post API tokens, cookies, or other credentials in public issues.

# Actor input Schema

## `screenNames` (type: `array`):

Enter one account per line as a username (apify), @handle (@apify), or full X/Twitter profile URL (https://x.com/apify). Equivalent username formats are normalized and requested only once.

## `userIds` (type: `array`):

Enter one numeric X user ID per line, for example 3510729917. User IDs remain stable when an account changes its username. Duplicate and invalid IDs are ignored.

## Actor input object example

```json
{
  "screenNames": [
    "https://x.com/apify"
  ]
}
```

# Actor output Schema

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

Structured account origin and profile metadata stored in the default dataset.

# 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 = {
    "screenNames": [
        "https://x.com/apify"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("arjun_code/x-twitter-account-origin-scraper").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 = { "screenNames": ["https://x.com/apify"] }

# Run the Actor and wait for it to finish
run = client.actor("arjun_code/x-twitter-account-origin-scraper").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 '{
  "screenNames": [
    "https://x.com/apify"
  ]
}' |
apify call arjun_code/x-twitter-account-origin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,arjun_code/x-twitter-account-origin-scraper"
        }
    }
}
```

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/NSpWIO5XhAaphQnz5/builds/yjsRahQroHd0GUhfA/openapi.json
