# AIsa Payment Gateway - Twitter Advanced Search

> AIsa Payment Gateway - Twitter Advanced Search is a paid API for AI agents from pay.lnpay.ai, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-13).

Performs advanced search on Twitter/X with pagination, returning up to 20 tweets per page filtered by query and sort type.

## Facts

- Endpoint: GET https://pay.lnpay.ai/twitter/tweet/advanced-search
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aisa-payment-gateway-twitter-advanced-search-6ab344e6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KD1yYyK281Gr2IqyoX7Jt

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 aisa-payment-gateway-twitter-advanced-search-6ab344e6
```

Example prompt: Search Twitter for the latest tweets about 'AI' OR 'machine learning' from Elon Musk since 2024-01-01, sorted by Latest — show me the first page of results.

## When to prefer this

Use this endpoint when you need advanced Twitter search with complex query syntax (e.g. multi-keyword OR queries, from: filters, since: date filters) and require paginated access to either the latest or top tweets, paid via x402 microtransaction protocol.

## Known failure modes

- Invalid queryType value (not 'Latest' or 'Top') returns an error
- Missing required fields 'query' or 'queryType' causes a 400-level error
- Malformed query syntax may return zero results
- Expired or invalid cursor causes pagination to fail
- Payment failure (insufficient USDC) blocks the request
- Twitter API rate limits may cause temporary unavailability

## How this service works

Advanced search for tweets. Each page returns up to 20 replies (Sometimes less than 20, because we will filter out ads or other not tweets). Use cursor for pagination.

## Output

A paginated list of up to 20 tweets matching the advanced search query, with ads and non-tweet content filtered out; includes a cursor value for fetching subsequent pages.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query",
  "queryType"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "The query to search for. eg. \"AI\" OR \"Twitter\" from:elonmusk since:2021-12-31_23:59:59_UTC"
  },
  "cursor": {
   "type": "string",
   "description": "The cursor to paginate through the results. First page is \"\"."
  },
  "queryType": {
   "enum": [
    "Latest",
    "Top"
   ],
   "type": "string",
   "description": "The query type to search for. eg. \"Latest\" OR \"Top\". Available options: Latest, Top"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aisa-payment-gateway-twitter-advanced-search-6ab344e6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pay.lnpay.ai](https://www.zero.xyz/host/pay.lnpay.ai/llms.txt)
