---
title: "Search tweets with advanced query operators - body param is query"
method: POST
path: "/api/v1/twitter/search"
tags: ["Twitter"]
---

# Search tweets with advanced query operators - body param is query

`POST /api/v1/twitter/search`

## Request

- Base URL: `https://glim.sh`
- URL: `https://glim.sh/api/v1/twitter/search`
- Auth: one of:
  - none
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in query parameter `apiKey`

Search Twitter with advanced operators. Returns ~20 tweets per page with engagement summary. Use cursor for pagination.

## Request body

- object
  - `query` string, required: Search query with advanced operators
  - `sort` 'latest' | 'top': Sort order: "top" (most engaged matching tweets) or "latest" (newest first). Default: "top".
  - `cursor` string: Pagination cursor
  - `start_date` string: 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)
  - `end_date` string: 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)
  - `expand_urls` boolean: 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 `200`

Search results

- object

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `502`: Upstream Error

---

[API](https://skmtc.dev/glim/apis/glim-sh.md) · [All operations](https://skmtc.dev/glim/apis/glim-sh/llms.txt) · [OpenAPI document](https://skmtc.dev/glim/apis/glim-sh/revisions/0094e5226d73?raw)
