Agent402 / tools / x-tweet

X tweet lookup

$0.008 per call · USDC via x402 · POST /api/x-tweet

Fetch one public tweet on X (Twitter) by id: text, created time, language, conversation id, engagement metrics (likes, retweets, replies, quotes, bookmarks, impressions) and the author's username, name and verification.

TRY IN PLAYGROUND →

Input

FieldTypeDescription
id *stringNumeric tweet id (the trailing number of a status URL).

Example output

{
  "source": "x-api-v2",
  "fetchedAt": "2026-08-20T14:10:00.000Z",
  "tweet": {
    "id": "1800000000000000000",
    "text": "x402 lets an agent pay for an API call with one HTTP round trip.",
    "createdAt": "2026-08-20T14:05:00.000Z",
    "lang": "en",
    "authorId": "1234567890",
    "author": {
      "username": "example_dev",
      "name": "Example Dev",
      "verified": false
    },
    "conversationId": "1800000000000000000",
    "possiblySensitive": false,
    "metrics": {
      "likes": 12,
      "retweets": 3,
      "replies": 1,
      "quotes": 0,
      "bookmarks": 2,
      "impressions": 1400
    },
    "url": "https://x.com/example_dev/status/1800000000000000000"
  }
}

Try it - see the 402 challenge (free)

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

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-tweet", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "id": "1800000000000000000"
  }),
});
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 →