Skip to main content

Comprehensive Profile Retrieval (GET /info)

What is it? The /info endpoint is the primary way to fetch the “identity” of an X account. It returns the most critical public data points, including display names, biographies, follower/following counts, account age, and profile imagery. It is flexible, accepting a profile link, a handle, or a numeric User ID as an identifier. Why use it?
  • User Cards: Generate rich profile previews in your app’s UI (name, avatar, bio).
  • Account Verification: Confirm if an account is verified or if its DMs are open before attempting outreach.
  • Database Enrichment: Periodically sync your records with current X metrics like follower counts and bio updates.
Python Implementation:
import requests

API_KEY = "YOUR_API_KEY"
URL = "https://api.sorsa.io/v3/info"

# You can use a handle, full link, or user_id
params = {"link": "elonmusk"} 
headers = {"ApiKey": API_KEY}

response = requests.get(URL, params=params, headers=headers)
user_data = response.json()

if response.status_code == 200:
    print(f"Name: {user_data.get('name')}")
    print(f"Followers: {user_data.get('followers_count')}")
    print(f"Bio: {user_data.get('description')}")