# Twitter/X User Lookup by Username

> Twitter/X User Lookup by Username is a paid API for AI agents from twit-api-production-de12.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Looks up a Twitter/X user profile by their username and returns user account details

## Facts

- Endpoint: POST https://twit-api-production-de12.up.railway.app/users/by/username
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/twitter-x-user-lookup-by-username-064c480e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lNAuQa2LxQpWsVUT-EBEC

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 twitter-x-user-lookup-by-username-064c480e -d '<json body>'
```

Example prompt: Can you look up the Twitter user profile for the username 'elonmusk' and tell me their user ID and account details?

## When to prefer this

Use this endpoint when you need to resolve a Twitter/X username to a structured user profile or user ID, especially in workflows that require Twitter identity resolution or need to enrich data with Twitter account metadata. Best when you have a known username and need the associated profile details.

## Known failure modes

- Username not found — user does not exist or has been suspended
- Rate limit exceeded — too many requests to the underlying Twitter API
- Invalid username format — username contains disallowed characters
- Authentication failure — upstream Twitter API credentials expired or invalid
- Payment not processed — x402 micropayment not completed, request rejected

## Output

Returns Twitter/X user profile data for the given username, likely including user ID, display name, handle, follower/following counts, bio, and account metadata.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "username"
     ],
     "properties": {
      "username": {
       "type": "string",
       "description": "Twitter screen name without @"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/twitter-x-user-lookup-by-username-064c480e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twit-api-production-de12.up.railway.app](https://www.zero.xyz/host/twit-api-production-de12.up.railway.app/llms.txt)
