X user profile

$0.015 per call · USDC via x402 · POST /api/x-user

Look up one X (Twitter) account by username: id, display name, bio, account creation date, verification status and type, location, link, protected flag, and public metrics (followers, following, tweet count, listed count). Send POST /api/x-user with the required field username and pay $0.015 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt and user.

Category: Web & documents · Tags: x twitter social x-api tweets user profile followers

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
usernamestringyesX username, with or without the leading @ (1-15 chars).

Example request

curl -i -X POST https://agent402.tools/api/x-user \
  -H "Content-Type: application/json" \
  -d '{"username":"coinbase"}'

Without payment this returns HTTP 402 Payment Required with the exact price for x-user; any x402 v2 or MPP client pays it and retries.

Example response

{
  "source": "x-api-v2",
  "fetchedAt": "2026-08-20T14:10:00.000Z",
  "user": {
    "id": "574032254",
    "username": "coinbase",
    "name": "Coinbase",
    "description": "The future of money is here.",
    "createdAt": "2012-05-07T23:46:41.000Z",
    "verified": true,
    "verifiedType": "business",
    "location": "Global",
    "url": "https://coinbase.com",
    "protected": false,
    "profileImageUrl": "https://pbs.twimg.com/profile_images/.../normal.jpg",
    "metrics": {
      "followers": 6400000,
      "following": 250,
      "tweets": 19000,
      "listed": 9000
    },
    "profileUrl": "https://x.com/coinbase"
  }
}
FieldTypeAlways presentIn the example
sourcestringyesx-api-v2
fetchedAtstringyes2026-08-20T14:10:00.000Z
userobjectyes13 fields: id, username, name, description, createdAt, verified

From an MCP client

catalog.call {
  "slug": "x-user",
  "params": {
    "username": "coinbase"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for x-user; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/x-user", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "username": "coinbase"
  }),
});

Related tools

X recent tweet search

$0.08 · POST /api/x-search-recent

Search public tweets from the last 7 days on X (Twitter) by query, using X API v2 search operators (keywords, from:, #ha…

X tweet lookup

$0.008 · POST /api/x-tweet

Fetch one public tweet on X (Twitter) by id: text, created time, language, conversation id, engagement metrics (likes, r…

X user timeline

$0.08 · POST /api/x-user-tweets

Fetch an X (Twitter) account's most recent tweets by user id or username (username is resolved first). Options to exclud…

X bulk user lookup

$0.15 · POST /api/x-users-lookup

Look up up to 10 X (Twitter) accounts by username in one call. Returns each found profile with public metrics (followers…

Farcaster user search

$0.003 · POST /api/fc-user-search

Search Farcaster users by name or username fragment. Returns up to 10 compact profiles: fid, username, display name, bio…

Farcaster user casts

$0.004 · POST /api/fc-user-casts

A Farcaster user's recent casts by fid or username, newest first, optionally including replies or limited to one channel…