x402basequality 0.75

Look up a Twitter/X user profile by numeric ID, paid per request in USDC on Base via x402.

Price
per_call
Protocol
x402
Verified
no

What it does

The `/users/by/id` endpoint on twit.sh returns a Twitter/X user profile given a numeric user ID. It is part of a broader payment-gated Twitter/X data API that uses the x402 protocol — no API keys, no OAuth, no account creation required. An AI agent simply makes a GET request, receives a 402 Payment Required challenge, settles $0.005 USDC on Base mainnet, and retries with a payment proof header to receive X v2-compatible JSON.

The response includes profile data such as user ID, name, username, bio, follower counts, and verification status (based on the sibling `/users/by/username` endpoint description, which shares the same schema). The API is designed for autonomous agents: one round-trip payment, no human in the loop. Data is sourced from publicly available profile information on the open web.

This endpoint is one of many on twit.sh covering users, tweets, lists, communities, articles, and authenticated actions (like, retweet, follow, post). Prices across the API range from $0.0025 to $0.01 USDC per call. The endpoint was confirmed live via a 402 challenge response during probing.

Capabilities

twitter-user-lookupuser-profile-by-idx402-paymentusdc-on-basepay-per-requestno-api-keyx-v2-compatible-jsonagent-native

Use cases

  • AI agent resolving a Twitter/X numeric user ID to a full profile (name, bio, follower count)
  • Enriching a dataset of Twitter user IDs with profile metadata
  • Building social-graph analysis pipelines that start from user IDs
  • Autonomous agent workflows that need Twitter profile context without managing API keys

Fit

Best for

  • AI agents needing on-demand Twitter/X user data without OAuth setup
  • Developers who want pay-per-call pricing instead of monthly X API subscriptions
  • Workflows that already have numeric Twitter user IDs and need profile details
  • x402-enabled agents that can settle USDC on Base

Not for

  • High-volume bulk scraping (pay-per-call cost adds up)
  • Use cases requiring official Twitter API guarantees or SLAs
  • Looking up users by username (use the /users/by/username sibling endpoint instead)

Quick start

curl -X GET 'https://x402.twit.sh/users/by/id?id=44196397'
# Returns 402 with payment challenge.
# Settle 0.005 USDC on Base, then retry with:
curl -X GET 'https://x402.twit.sh/users/by/id?id=44196397' \
  -H 'X-PAYMENT: <payment_proof>'

Example

Request

{
  "url": "https://x402.twit.sh/users/by/id?id=44196397",
  "method": "GET",
  "headers": {
    "X-PAYMENT": "<x402_payment_proof>"
  }
}

Response

{
  "data": {
    "id": "44196397",
    "name": "Elon Musk",
    "username": "elonmusk"
  }
}

Endpoint

Transporthttp
Protocolx402
Pay to0x9dBA414637c611a16BEa6f0796BFcbcBdc410df8
CurrencyUSD COIN

Quality

0.75/ 1.00

Full OpenAPI 3.1 spec with clear parameter definitions, confirmed live 402 challenge, and detailed landing-page documentation. Docked because the 200 response schema is not defined (just "Success"), so the exact response shape is inferred from the sibling endpoint description and the landing page example. No dedicated docs page exists.

Warnings

  • The 200 response schema is not formally defined in the OpenAPI spec; the example response fields are inferred from the /users/by/username description and landing page examples.
  • Some write endpoints (follow, like, tweet) require raw Twitter session cookies (auth_token, ct0) passed as query parameters, which raises security concerns — though this specific endpoint does not require them.
  • No formal rate-limit documentation was found.

Citations

Provenance

Indexed fromx402_bazaar
Enriched2026-04-22 01:20:08Z · anthropic/claude-opus-4.6 · v2
First seen2026-04-21
Last seen2026-04-22

Agent access