# glim.sh Twitter Trends

> glim.sh Twitter Trends is a paid API for AI agents from glim.sh, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13, last successful call 2026-07-02).

Fetches live trending topics on Twitter/X, returning ranked trend names and counts

## Facts

- Endpoint: POST https://glim.sh/api/v1/twitter/trends
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Last successful call: 2026-07-02
- Success rate: 100% of calls made through Zero
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glim-sh-twitter-trends-2a92d884
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-Ks7M7zU8vVsnXob2eZLy

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-trends-2a92d884 -d '<json body>'
```

Example prompt: What are the top trending topics on Twitter right now? Give me a ranked list of what's currently going viral on X.

## When to prefer this

Use this endpoint when you need live, real-time Twitter/X trending data without managing your own Twitter API keys or scraping infrastructure. Ideal for agents that need to monitor viral topics, surface trending conversations, or provide social listening insights on demand, paying only per call at $0.001 USDC.

## Known failure modes

- Payment not included or insufficient — 402 Payment Required
- Twitter API rate limit exceeded — upstream rate limit error
- Invalid request body parameters — 400 Bad Request
- Twitter/X platform outage causes empty or stale results
- No trends available for the specified filter — empty data array

## How this service works

Trending topics

## Output

A JSON object containing an array of trending topic objects each with a name and rank, plus metadata including the result count — e.g. [{name: 'x402', rank: 1}, ...] with a meta.result_count field.

## Example request

```json
{
 "count": 10,
 "woeid": 1
}
```

## 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": {
      "woeid": {
       "default": 1,
       "description": "Yahoo Where On Earth ID. Defaults to 1 for worldwide trends.",
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "count": {
       "default": 30,
       "description": "Maximum trends to return",
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      }
     }
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "target": {
          "type": "string"
         },
         "rank": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
         }
        },
        "required": [
         "name"
        ]
       }
      },
      "meta": {
       "type": "object",
       "properties": {
        "result_count": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        }
       },
       "required": [
        "result_count"
       ]
      }
     },
     "required": [
      "data",
      "meta"
     ]
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "name": "x402",
    "rank": 1
   }
  ],
  "meta": {
   "result_count": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glim-sh-twitter-trends-2a92d884/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)
