# X / Twitter Search

Search X (Twitter) with full advanced-search syntax (operators like from:, since:, until:, min_faves: work inline in the query) and get structured tweets with text, author, engagement, and cursor pagination. Limit is a per-page maximum; native pages contain approximately 20 tweets unless requireSinglePage selects a bulk lane.

|  |  |
| --- | --- |
| Tool id | `anyapi.x-search-posts` |
| Platform | [X (Twitter)](https://www.orcarouter.ai/tools/x.md) |
| Capability | [Search posts](https://www.orcarouter.ai/tools/x/search-posts.md) |
| Price | $0.00066 per call |
| Health | OK |
| p50 latency | — |
| Success (7 days) | — |
| Runs (30 days) | 8 |
| Idempotent | no |
| Data class | scraped |

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | Search query using X (Twitter) advanced-search syntax. IMPORTANT: bare terms are ANDed - a tweet must contain EVERY word, so a list of loosely related keywords matches nothing; use one short phrase or OR between alternatives (e.g. 'anyapi OR getanyapi'). You can embed X advanced-search operators... |
| `cursor` | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of search results. |
| `limit` | integer | no | Per-page maximum number of results to return (1-50, default 20). A provider may return a smaller native page; follow nextCursor for more. |
| `queryType` | string | no | Result ranking: 'Latest', 'Top', 'Photos', or 'Videos' (e.g. Latest). |

## Call it

```bash
curl -sS https://api.orcarouter.ai/v1/tools/anyapi.x-search-posts/run \
  -H "Authorization: Bearer $ORCAROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"<query>"}}'
```

```python
import os, requests

resp = requests.post(
    "https://api.orcarouter.ai/v1/tools/anyapi.x-search-posts/run",
    headers={"Authorization": f"Bearer {os.environ['ORCAROUTER_API_KEY']}"},
    json={"input":{"query":"<query>"}},
)
print(resp.json())
```

## Alternatives

| Tool | Source | Price | Health |
| --- | --- | --- | --- |
| [Search X (Twitter) posts by keyword](https://www.orcarouter.ai/tools/x/search-posts/x-twitter-web-fetch-search-timeline.md) | — | $0.0011 per call | OK |
| [X / Twitter Community Search](https://www.orcarouter.ai/tools/x/search-posts/twitter-search-communities.md) | — | $0.00121 per call | OK |

## FAQ

### How much does X / Twitter Search cost?

X / Twitter Search costs $0.00066 per call: 1,000 calls cost $0.66.

### What does a $10 budget buy with X / Twitter Search?

About 15151 calls at $0.00066 per call.

### What inputs does X / Twitter Search need?

Required inputs: query.

### How do I call X / Twitter Search?

Send POST /v1/tools/{id}/run with your OrcaRouter API key and a JSON body {"input": {…}}, where {id} is the tool id POST /v1/tools/discover returns for it.

---

Markdown version of https://www.orcarouter.ai/tools/x/search-posts/x-search-posts
