Skip to main content
The User Search endpoint lets you search for users by keyword. Find users by name, username, or content in their bio.

Overview

Keyword search

Search by name, username, or bio

Discover users

Find relevant accounts

Endpoint

MethodEndpointDescription
GET/2/users/searchSearch for users

Example request

curl "https://api.x.com/2/users/search?\
query=python%20developer&\
user.fields=description,verified,public_metrics" \
  -H "Authorization: Bearer $BEARER_TOKEN"

Example response

{
  "data": [
    {
      "id": "1234567890",
      "name": "Python Developer",
      "username": "pythondev",
      "description": "Building cool things with Python",
      "verified": false,
      "public_metrics": {
        "followers_count": 5000,
        "following_count": 200,
        "tweet_count": 1500
      }
    }
  ],
  "meta": {
    "result_count": 1
  }
}

Getting started

Prerequisites