Skip to content

X trends by location

$0.02 per callUSDC via x402POST /api/x-trends

Read the current trending topics on X (Twitter) for one location by its WOEID (1 for worldwide, 23424977 for the United States, 44418 for London): up to 50 trends with each trend's name and its post count where X reports one, plus the location's name, country and place type. Send POST /api/x-trends with the required field woeid and pay $0.02 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, woeid, location, count and 1 more.

Category: Web & documentsTags: x twitter social x-api tweets trends trending topics

Try in playground →

Parameters

NameTypeRequiredDescription
woeidnumberyesYahoo Where On Earth id of the location: 1 worldwide, 23424977 United States, 44418 London.
max_trendsnumbernoTrends to return, 1-50 (default 20).

Example request

curl -i -X POST https://agent402.tools/api/x-trends \
  -H "Content-Type: application/json" \
  -d '{"woeid":23424977,"max_trends":10}'

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

Watch a call get paid

RequestPOST /api/x-trends
402$0.02 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "source": "x-api-v2",
  "fetchedAt": "2026-11-20T14:10:00.000Z",
  "woeid": 23424977,
  "location": {
    "woeid": 23424977,
    "name": "United States",
    "country": "United States",
    "countryCode": "US",
    "placeType": "country"
  },
  "count": 2,
  "trends": [
    {
      "name": "#Thanksgiving",
      "postCount": 184000
    },
    {
      "name": "Stablecoins",
      "postCount": null
    }
  ]
}
FieldTypeAlways presentIn the example
sourcestringyesx-api-v2
fetchedAtstringyes2026-11-20T14:10:00.000Z
woeidnumberyes23424977
locationobjectyes5 fields: woeid, name, country, countryCode, placeType
countnumberyes2
trendsarray of objectsyes2 items in the example

From an MCP client

catalog.call {
  "slug": "x-trends",
  "params": {
    "woeid": 23424977,
    "max_trends": 10
  }
}

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

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?.({ maxAmountPerPayment: "$0.02" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/x-trends", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "woeid": 23424977,
    "max_trends": 10
  }),
});

Related tools

X post counts

$0.01POST /api/x-post-counts

Count public posts on X (Twitter) matching a query over the last 7 days, bucketed by day, hour or minute, using X API v2.

X recent tweet search

$0.08POST /api/x-search-recent

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

X tweet lookup

$0.008POST /api/x-tweet

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

X user profile

$0.015POST /api/x-user

Look up one X (Twitter) account by username: id, display name, bio, account creation date, verification status and type.

X user timeline

$0.09POST /api/x-user-tweets

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

X bulk user lookup

$0.15POST /api/x-users-lookup

Look up up to 10 X (Twitter) accounts by username in one call.