# X (Twitter) Username Lookup — agentutility.ai

> X (Twitter) Username Lookup — agentutility.ai 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-02).

Resolves an X (Twitter) handle to a full public profile including user ID, display name, bio, verification status, follower/following counts, tweet count, and creation date

## Facts

- Endpoint: POST https://x402.agentutility.ai/x-username?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-twitter-username-lookup-agentutility-ai-2db82e67
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BT5nF8-ts0wKYGi4XWE08

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-username-lookup-agentutility-ai-2db82e67 -d '<json body>'
```

Example prompt: Look up the X profile for @elonmusk and tell me their follower count, bio, and whether they're verified.

## When to prefer this

Choose this endpoint when you need read-only public profile data for an X/Twitter user and want a simple, pay-per-call interface without managing X API credentials or rate limits yourself. It is ideal for agents that need to enrich data pipelines with Twitter profile metadata, verify influencer stats, or resolve handles to canonical user IDs. Prefer it over direct X API calls when you want USDC-settled micropayment access (x402 protocol) with no OAuth setup.

## Known failure modes

- Handle not found (user does not exist or has been suspended) — returns error or empty result
- Invalid or expired X_BEARER_TOKEN — authentication failure
- Rate limit exceeded on the underlying X API v2 — temporary unavailability
- Handle passed with special characters or spaces — malformed request
- Account is private or deactivated — limited or no profile data returned

## How this service works

X username lookup / Twitter username lookup / handle resolver / public profile lookup / follower count API. Read-only X API v2 user-by-username wrapper. Accepts a handle with or without @ and returns id, username, display name, bio, verification fields, created_at, followers, following, tweet count, and listed count. Requires X_BEARER_TOKEN; no posting, replying, liking, following, or account mutation.

## Output

A JSON object containing the user's numeric X ID, username, display name, bio/description, verification fields (verified, verified_type), account creation timestamp, follower count, following count, total tweet count, and listed count — all sourced from the X API v2 user-by-username endpoint.

## 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-username-lookup-agentutility-ai-2db82e67/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)
