# glim.sh Twitter Search

> glim.sh Twitter Search is a paid API for AI agents from surf.cascade.fyi, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Search Twitter/X in real time with advanced query operators, returning tweets, authors, and pagination — no API keys required.

## Facts

- Endpoint: POST https://surf.cascade.fyi/api/v1/twitter/search
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glim-sh-twitter-search-0137b723
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Q5jRADGhrLWrKGxUX4Bqv

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-search-0137b723 -d '<json body>'
```

Example prompt: Search Twitter for the latest tweets about the Nvidia earnings report, sorted by Latest, from the past 3 days — I want to see what people are saying right now.

## When to prefer this

Use this endpoint when you need live, real-time Twitter search without managing your own Twitter API credentials or scraping infrastructure. Ideal for agents that need to monitor breaking news, brand mentions, hashtags, or public sentiment on X/Twitter, especially when queries involve advanced operators or date-scoped retrieval. Prefer this over self-managed Twitter API integrations when you want pay-per-call pricing with no setup.

## Known failure modes

- Invalid or empty query string returns no results or error
- Malformed date formats (not YYYY-MM-DD or ISO 8601) cause a parsing error
- Invalid sort enum value (anything other than 'Latest' or 'Top') rejected
- Expired or invalid pagination cursor returns error or restarts results
- Rate limiting or payment failure returns 402 or 429 status
- Twitter API downtime causes upstream errors

## How this service works

Search tweets with advanced operators (recommended). Body param is `query` (not q), e.g. {"query":"from:elonmusk AI min_faves:100"}

## Output

A JSON object containing an array of tweets (each with tweet ID, text, and author username), a total count, a has_more boolean, and a next_cursor string for paginating through additional results.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sort": {
   "enum": [
    "latest",
    "top"
   ],
   "type": "string",
   "description": "Sort order: \"top\" (most engaged matching tweets) or \"latest\" (newest first). Default: \"top\"."
  },
  "query": {
   "type": "string",
   "maxLength": 1000,
   "minLength": 1,
   "description": "Search query with advanced operators"
  },
  "cursor": {
   "type": "string",
   "maxLength": 500,
   "description": "Pagination cursor"
  },
  "end_date": {
   "type": "string",
   "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2}))?$",
   "description": "Only tweets before this time. YYYY-MM-DD (inclusive through end of day UTC) or ISO 8601 datetime with Z/offset (e.g. 2026-04-13T14:30:00Z)"
  },
  "start_date": {
   "type": "string",
   "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2}))?$",
   "description": "Only tweets on or after this time. YYYY-MM-DD (UTC midnight) or ISO 8601 datetime with Z/offset (e.g. 2026-04-13T14:30:00Z)"
  },
  "expand_urls": {
   "type": "boolean",
   "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "tweets": [
   {
    "id": "123",
    "text": "Hello",
    "author": {
     "username": "elonmusk"
    }
   }
  ],
  "has_more": true,
  "next_cursor": "abc123"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glim-sh-twitter-search-0137b723/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from surf.cascade.fyi](https://www.zero.xyz/host/surf.cascade.fyi/llms.txt)
