---
title: "Search tweets (paginated) - body param is q, not query"
method: POST
path: "/api/v1/twitter/tweets/search"
tags: ["Twitter"]
---

# Search tweets (paginated) - body param is q, not query

`POST /api/v1/twitter/tweets/search`

## Request

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

## Request body

- object
  - `q` string, required: Twitter search query with operators
  - `sort` 'Latest' | 'Top': Sort order
  - `limit` integer: Maximum tweets to return
  - `cursor` string: Pagination cursor. Ranking is strongest on page 1 - paged results under sort=Top trend toward recency (upstream behavior).

## Response `200`

Result

- object
  - `data` object[], required
  - `meta` object, required
    - `result_count` integer, required
    - `has_next_page` boolean
    - `next_cursor` string
  - `summary` object

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `404`: Not Found
- `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)
