# X (Twitter) User Profile Lookup by Username

> X (Twitter) User Profile Lookup by Username is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-19).

Resolves an X (Twitter) handle to a full public user profile including id, display name, bio, verification status, follower counts, and account metadata.

## Facts

- Endpoint: POST https://x402.agentutility.ai/users-by-username?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-twitter-user-profile-lookup-by-username-1216206a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ACdRxZHWdEiRtI8brW6I_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x-twitter-user-profile-lookup-by-username-1216206a -d '<json body>'
```

Example prompt: Can you look up the public profile for the X account @sama — I want to see their display name, bio, follower count, and when the account was created?

## When to prefer this

Use this endpoint when you need to resolve an X handle to a structured public profile object — especially when you need the numeric user ID, follower/following counts, or verification status. Prefer this over scraping or manual lookup for agent workflows that need reliable, structured data at $0.005 USDC per call with USDC settlement on Base.

## Known failure modes

- Username not found — account may not exist or may have been suspended
- Rate limit exceeded on the underlying X API v2
- Invalid or malformed username input
- Account is suspended or deactivated — profile not returned
- Payment failure via x402 USDC — call not executed

## How this service works

Resolves an X handle to a public profile: id, username, display name, bio, verification fields, created_at, followers, following, tweet count, and listed count. Same read-only X API v2 user-by-username backend as x-username. Use it as an X users by username API, Twitter user profile lookup, or handle to public profile API.

## Output

Returns the full public X (Twitter) user profile for the given username, including numeric user ID, username, display name, bio text, verification fields, account creation timestamp, follower count, following count, total tweet count, and listed count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "username"
     ],
     "properties": {
      "username": {
       "type": "string",
       "description": "X/Twitter handle, with or without @, e.g. 'bankrbot'."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "mode": {
       "type": "string"
      },
      "user": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "username": {
         "type": "string"
        },
        "public_metrics": {
         "type": "object",
         "properties": {
          "followers_count": {
           "type": "integer"
          }
         }
        }
       }
      },
      "source": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "user",
  "user": {
   "id": "99",
   "name": "Bankr",
   "username": "bankrbot",
   "public_metrics": {
    "followers_count": 1234
   }
  },
  "source": "X API v2 user lookup"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-twitter-user-profile-lookup-by-username-1216206a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
