X User Tweets
by X user timeline in News & content
Fetch an X (Twitter) account's most recent tweets by user id or username (username is resolved first). Options to exclude retweets and replies, page with pagination_token, or fetch only tweets newer than since_id. Each tweet carries text, created time, language and engagement metrics.
https://agent402.tools/api/x-user-tweets- Price
- $0.08
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 210 ms
- 656 ms slowest 5%
- Last check
- Passed
- 3 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://agent402.tools/api/x-user-tweets
Each call costs $0.08 in USDC on Polygon, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://agent402.tools/api/x-user-tweets
content-type: application/json
{
"exclude_replies": true,
"exclude_retweets": true,
"max_results": 10,
"username": "coinbase"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
exclude_replies | boolean | No | Drop replies (default false). |
exclude_retweets | boolean | No | Drop retweets (default false). |
id | string | No | Numeric X user id. Provide id OR username. |
max_results | number | No | Tweets per page, 5-10 (default 10). |
pagination_token | string | No | Pagination token from a previous response. |
since_id | string | No | Only tweets with an id greater than this. |
username | string | No | X username (resolved to an id first). Provide id OR username. |
Example response
The provider's example. We can't check it without paying.
Example response, 37 lines
{
"count": 1,
"fetchedAt": "2026-08-20T14:10:00.000Z",
"nextToken": "7140dibdnow9c7btw4xxxxx",
"source": "x-api-v2",
"tweets": [
{
"author": {
"name": "Coinbase",
"username": "coinbase",
"verified": true
},
"authorId": "574032254",
"conversationId": "20",
"createdAt": "2006-03-21T20:50:14.000Z",
"id": "20",
"lang": "en",
"metrics": {
"bookmarks": 5000,
"impressions": 0,
"likes": 180000,
"quotes": 30000,
"replies": 10000,
"retweets": 120000
},
"possiblySensitive": false,
"text": "just setting up my twttr",
"url": "https://x.com/coinbase/status/1800000000000000000"
}
],
"user": {
"id": "574032254",
"name": "Coinbase",
"username": "coinbase",
"verified": true
}
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.08.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://agent402.tools/api/x-user-tweets' \
-H 'content-type: application/json' \
--data-raw '{"exclude_replies":true,"exclude_retweets":true,"max_results":10,"username":"coinbase"}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://agent402.tools/api/x-user-tweets' \
-H 'content-type: application/json' \
--data-raw '{"exclude_replies":true,"exclude_retweets":true,"max_results":10,"username":"coinbase"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.08 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.08" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.08 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fx-user-tweets&method=POST
const res = await pay("https://agent402.tools/api/x-user-tweets", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"exclude_replies": true,
"exclude_retweets": true,
"max_results": 10,
"username": "coinbase"
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.08 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.08"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://agent402.tools/api/x-user-tweets",
json={
"exclude_replies": True,
"exclude_retweets": True,
"max_results": 10,
"username": "coinbase",
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 197 ms | $0.08 |
| 8 h ago | Passed | 402 | 347 ms | $0.08 |
| 12 h ago | Passed | 402 | 331 ms | $0.08 |
| 17 h ago | Passed | 402 | 198 ms | $0.08 |
| 22 h ago | Passed | 402 | 206 ms | $0.08 |
Show 10 older checks
| 26 h ago | Passed | 402 | 194 ms | $0.08 |
| 31 h ago | Passed | 402 | 325 ms | $0.08 |
| 35 h ago | Passed | 402 | 267 ms | $0.08 |
| 39 h ago | Passed | 402 | 346 ms | $0.08 |
| 43 h ago | Passed | 402 | 198 ms | $0.08 |
| 47 h ago | Passed | 402 | 198 ms | $0.08 |
| 2 days ago | Passed | 402 | 346 ms | $0.08 |
| 2 days ago | Passed | 402 | 187 ms | $0.08 |
| 2 days ago | Passed | 402 | 862 ms | $0.08 |
| 3 days ago | Passed | 402 | 196 ms | $0.08 |