# glim.sh Twitter Trending Topics

> glim.sh Twitter Trending Topics is a paid API for AI agents from glim.sh, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Fetches live Twitter/X trending topics for a specified geographic location using a Yahoo Where On Earth ID

## Facts

- Endpoint: POST https://glim.sh/api/v1/twitter/get
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glim-sh-twitter-trending-topics-e516138c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i4bLIKVPPhT32PG-zkYm8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability glim-sh-twitter-trending-topics-e516138c -d '<json body>'
```

Example prompt: What are the top 20 trending topics on Twitter worldwide right now? Use WOEID 1 for global trends.

## When to prefer this

Use this endpoint when you need live Twitter/X trending topic data without managing your own Twitter API credentials or scraping infrastructure. Ideal for agents that need real-time social media pulse data on a pay-per-call basis with no setup overhead.

## Known failure modes

- Invalid WOEID returns empty or error response
- Count value out of supported range may return validation error
- Twitter API rate limits or downtime may result in failed fetch
- Payment not processed (x402) results in 402 status with no data returned
- Unsupported or obscure WOEID may return no trends

## How this service works

Fetch a tweet (with thread context) by URL/id or a user (with recent tweets) from one URL

## Output

Returns a JSON object containing trending tweet data including tweet ID, text content, parent tweet context, and thread array. Represents current trending topics for the requested geographic area.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "ref": {
       "type": "string",
       "minLength": 1,
       "maxLength": 2048,
       "description": "Tweet URL/id or profile URL. Tweet URLs including /i/status/<id> and bare numeric tweet ids return the tweet + thread; a profile URL (https://x.com/<handle>) returns the user + recent tweets."
      },
      "include": {
       "description": "Tweet refs only: extra sections to include (replies, quotes)",
       "type": "array",
       "items": {
        "type": "string",
        "enum": [
         "replies",
         "quotes"
        ]
       }
      },
      "include_replies": {
       "default": false,
       "description": "Profile refs only: include replies in the timeline",
       "type": "boolean"
      },
      "include_mentions": {
       "default": false,
       "description": "Profile refs only: include the mentions timeline",
       "type": "boolean"
      },
      "cursor": {
       "description": "Profile refs only: pagination cursor",
       "type": "string",
       "maxLength": 500
      },
      "expand_urls": {
       "default": false,
       "description": "When true, auto-crawl entity URLs and attach crawled_content to tweets. Off by default: responses can grow by up to 4KB per expanded URL. Use glim_web_crawl(url) for targeted crawls instead.",
       "type": "boolean"
      }
     },
     "required": [
      "ref"
     ]
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tweet": {
   "id": "123",
   "text": "Hello"
  },
  "parent": null,
  "thread": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glim-sh-twitter-trending-topics-e516138c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from glim.sh](https://www.zero.xyz/host/glim.sh/llms.txt)
