Skip to main content

Keyword-Based User Discovery (POST /search-users)

What is it? The /search-users endpoint allows you to find X accounts based on keywords or phrases found in their names, handles, or biographies. It returns a structured list of matching accounts along with their essential profile metrics. Why use it?
  • Influencer Discovery: Search for keywords like “Web3 Developer” or “Crypto VC” to find relevant industry figures.
  • In-App Search: Power your own platform’s “Find Users” or “Autocomplete” features with high-quality X data.
  • Lead Generation: Turn niche keywords into a curated list of candidate profiles for marketing outreach.
  • Verification: Confirm the correct handles for projects or brands during the onboarding process.
Data Points Returned: For every user found, the API provides:
  • Handle (screen_name) and User ID.
  • Profile Bio, Avatar URL, and Location.
  • Follower/Following counts and Verification status.
Python Implementation:
import requests

API_KEY = "YOUR_API_KEY"
URL = "https://api.sorsa.io/v3/search-users"

payload = {
    "query": "Solana Developer",
    "next_cursor": ""  # Used for pagination
}

headers = {
    "ApiKey": API_KEY,
    "Content-Type": "application/json"
}

response = requests.post(URL, json=payload, headers=headers)
data = response.json()

if "users" in data:
    for user in data["users"]:
        print(f"User: {user['name']} (@{user['screen_name']})")
        print(f"Bio: {user['description']}\n")