# Twitter Account-Based-In Locator by Screen Name (`fastcrawler/twitter-account-based-in-locator-by-screen-name`) Actor

Fetch detailed “About” information for any Twitter/X user using their screen name.
This actor retrieves profile metadata such as account_based_in, location_accurate, bio details, and other About section fields from the latest Twitter/X web API.

- **URL**: https://apify.com/fastcrawler/twitter-account-based-in-locator-by-screen-name.md
- **Developed by:** [fastcrawler](https://apify.com/fastcrawler) (community)
- **Categories:** Social media, MCP servers, Agents
- **Features:** Limited permissions
- **Stats:** 373 total users, 8 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 aboutresults

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

### Twitter/X Account-Based-In Locator by Screen Name | 2025

Identify where a Twitter/X account is **based in**—instantly and accurately.

This tool retrieves the `account_based_in` and `location_accurate` metadata for any Twitter/X user using only their screen name.\
Whether you're conducting audience geo-analysis, influencer targeting, or market segmentation, this locator provides **precise account location insights** without requiring the Twitter API or developer credentials.

Key Features:

- 🌍 Retrieve `account_based_in` for any Twitter/X user
- 📍 Extract `location_accurate` when available
- ⚡ High-speed metadata lookup
- 🧭 Ideal for audience geo targeting and segmentation
- 🛡️ No API key required — works using your session cookie
- 📊 Output structured JSON suitable for analysis and enrichment

***

### Contact and Feature Requests

If you need customized features or have specific requirements:

- Bulk user location extraction
- Real-time username change tracking
- Full user profile enrichment
- Following/follower geo distribution

Feel free to contact me:

📩 Email: fastcrawler9@gmail.com\
💬 [Telegram](https://t.me/+MUMR3PKOoVVjNzE9)\
🧑‍🤝‍🧑 [Discord](https://discord.gg/s4jyupzaWu)

***

### Input Parameters

```
  {
    "user_id": "44196397",
    "avatar": "https://pbs.twimg.com/profile_images/1983681414370619392/oTT3nm5Z_normal.jpg",
    "name": "Elon Musk",
    "screen_name": "elonmusk",
    "created_at": "Tue Jun 02 20:12:29 +0000 2009",
    "profile_image_shape": "Circle",
    "verification": false,
    "userLabelDisplayType": "Badge",
    "userLabelType": "BusinessLabel",
    "is_blue_verified": true,
    "privacy_policy_url": "https://help.twitter.com/managing-your-account/about-twitter-verified-accounts",
    "account_based_in": "United States",
    "location_accurate": true,
    "affiliate_username": "X",
    "source": "United States App Store",
    "username_changes_count": 0,
    "override_verified_year": -3000,
    "verified_since_msec": -156836000000000
  }
```

***

### ❓ FAQ

#### **1. Do I need a Twitter API key or developer account to use this locator?**

**No.** This actor works entirely with session cookies and does not require Twitter API access or a developer account.

***

#### **2. How accurate is `account_based_in`?**

The value is sourced from the latest Twitter/X internal metadata and is typically more accurate than user profile text locations.

***

#### **3. Can I extract location data for multiple users in one run?**

Yes. You can provide multiple screen names or run in a workflow for batch processing.

***

#### **4. What data fields are included in the output?**

Typical fields include:

- `account_based_in`
- `location_accurate`
- Username and ID
- Profile bio
- Follower/following counts
- Account creation date
- Profile media URLs

***

#### **5. How do I get the cookie for authentication?**

1. Install the **Cookie-Editor** Chrome extension
2. Log in to Twitter/X
3. Open the extension on `twitter.com`
4. Click **Export as Header String**
5. Paste it into the `cookie` input field

***

#### **6. Can this tool detect VPN/spoofed locations?**

It detects the location stored in Twitter's internal account metadata, which may differ from user-visible profile text.

***

#### **7. Is there any rate limit?**

There is **no strict limit**, but performance depends on account trust level and request volume.

| Field | Type | Description |
|-------|------|-------------|
| screenName | string | The Twitter/X screen name of the user |

***

### Output Example

# Actor input Schema

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

The screen name of the twitter user to get about. Up to 10 items

## Actor input object example

```json
{
  "screenNames": [
    "elonmusk",
    "axiaisacat"
  ]
}
```

# Actor output Schema

## `overview` (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 = {
    "screenNames": [
        "elonmusk",
        "axiaisacat"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fastcrawler/twitter-account-based-in-locator-by-screen-name").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": [
        "elonmusk",
        "axiaisacat",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fastcrawler/twitter-account-based-in-locator-by-screen-name").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": [
    "elonmusk",
    "axiaisacat"
  ]
}' |
apify call fastcrawler/twitter-account-based-in-locator-by-screen-name --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fastcrawler/twitter-account-based-in-locator-by-screen-name"
        }
    }
}
```

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/ZQr8pyhNlDonh2SoK/builds/KTSJ8rM1eNLvVPxIt/openapi.json
