x/
user-about

The X Account Location API looks up the country or region X lists for an account from its username, plus how it connects to X, its join date, username change count and affiliate badge.

X Account Location API

Account based in
Connected via
Batch usernames
0.7 credits / result
Ready
Ready

Enter parameters and send a request. The task status and normalized results will appear here.

README

By SocQ · Updated

X Account Location

X's About this account panel is a short record attached to every profile: the country or region the account is based in, the app store, app or web client it connects through, the date it joined, how many times its username has changed and the organization it is affiliated with. Read together, these details let you test whether an account operates from where its content suggests, vet creators before a deal and find groups of accounts that share an unexpected origin.

X Account Location API Features

  • The country X lists for each accountEach X Account Location API row puts the "Account based in" value from the profile's About this account panel in country, such as United States or United Kingdom.
  • How the account reaches Xconnected_via names the channel X associates with the account, for example United States App Store, Android App or Web, which you can set beside country.
  • Join date and handle historypublished_at holds the date the account joined X and username_changes_count counts its renames, two quick signals of how established a handle is.
  • Affiliation and ID verificationaffiliate_username shows the organization badge on the profile, such as X for elonmusk or BBCNews for BBCWorld, next to is_identity_verified and the blue-check flag is_verified.
  • A row per username in one taskSend a list of usernames, a leading @ optional, and each account comes back as its own row with id, username, name, avatar_url and is_private alongside its location details.

X Account Location API Parameters

ParametersRequiredDescription
usernamesRequiredX usernames to look up, with or without the leading @. Each account returns its own row.

How to Use the X Account Location API

Submit usernames to the X Account Location API and read one About this account row per account.

  1. POST {"usernames": ["elonmusk", "BBCWorld"]} to /v1/x/user-about.
  2. Poll GET /v1/tasks/{task_id} until status is succeeded.
  3. Read one row per account from results.items and pass results.next_cursor back while has_more is true.
curl -X POST "https://api.socq.ai/v1/x/user-about" \
  -H "Authorization: Bearer $SOCQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"usernames":["elonmusk","BBCWorld"]}'

# An account that shows no country on X still returns a row, with country set to null.

X Account Location API Use Cases

  • Checking where political and news accounts operate: Run the handles driving a political or news topic through the X Account Location API and flag those whose country or connected_via points to a different part of the world from the audience they address.
  • Vetting a creator before a paid partnership: Confirm that country matches the market you are paying to reach, and look at published_at and username_changes_count for a recently created or often renamed handle.
  • Grouping accounts that may be coordinated: Cluster a set of suspicious accounts by country, connected_via and join month to surface batches that were created around the same time from the same place.
  • Counting the countries behind a conversation: Pass the usernames that replied to or reposted a post, collected with other X endpoints, and tally country to see which regions the discussion comes from.

X Account Location API Pro Tips

  • Before labeling an account as foreign-run, read country together with connected_via and published_at; one field on its own can mislead.
  • Store accounts by id, since username_changes_count shows how often a handle can change.
  • Keep collected_at with every row and rerun the same usernames through the X Account Location API later to catch a change in country, connected_via or username_changes_count.
  • Match the returned rows to your input list by username: when some accounts are missing, the rest still come back and the missing ones simply have no row.

Beyond the X Account Location API, use these APIs when you need a different type of public X data.

  • Twitter Profile Scraper API — Retrieve public account identity, biographies, avatars, cover images, account status, and visible audience statistics by username.
  • Twitter User Tweets Scraper API — Collect recent public posts, authors, media, hashtags, mentions, and engagement by username with replies excluded.
  • X Followers List API — Collect public follower account identities and visible profile metrics for one or more X usernames.
  • X Following List API — Collect profiles followed by public X accounts, including identity, biographies, account signals, visible counters, and source usernames.
  • X Post Retweeters API — Collect a task-level unique set of normalized public profiles for accounts that reposted known X or Twitter status URLs.
  • X Verified Followers API — Collect the verified accounts following a profile, with their usernames, names, avatars and join dates.

Explore other platforms

Combine X data with public data from other supported social platforms.

X Account Location API — FAQ

X Account Location API is a programmatic interface for reading the About this account details of X accounts from a list of usernames. It returns the country or region each account is based in, how it connects to X, its join date, username change count, affiliate badge and verification flags.

X shows it as "Account based in" in the profile's About this account panel. Submit the username here and the same value arrives in country, so you can check many accounts in one task.

It describes where the account connects to X from, such as a country's App Store, the Android app or the web. The X Account Location API returns it in connected_via.

X shows no country for some accounts, including many government and public-interest accounts such as NASA. They still return a row with the other fields filled and country set to null.

It is the value X itself displays in the About this account panel, returned unchanged. It tells you where X considers the account based, which is a label from X and not a live position of the person behind it.

No. The free-text location people type on their profile is a separate field; the Twitter Profile Scraper API returns it in location.