Agent402 / tools / x-user

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).

TRY IN PLAYGROUND →

Input

FieldTypeDescription
username *stringX username, with or without the leading @ (1-15 chars).

Example output

{
  "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"
  }
}

Try it - see the 402 challenge (free)

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

The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:

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();
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"
  }),
});
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

Related tools

Extract article

$0.010 · POST /api/extract

Extract the main article content from any public URL as clean markdown. Returns title, byline, excerpt, word count, and …

try in playground →

Page metadata

$0.002 · GET /api/meta

Fetch page metadata for a URL: title, description, OpenGraph, Twitter cards, canonical URL, favicon.

try in playground →

Browser render

$0.02 · POST /api/render

Render a page in a real headless Chromium browser (JavaScript executed), then extract the main content as clean markdown…

try in playground →