> ## Documentation Index
> Fetch the complete documentation index at: https://pmxt-sync-hosted-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search

> Search events and markets across the hosted catalog in a single query.

The **Router** is a catalog-backed, cross-venue search surface. It
searches across the hosted catalog and returns a unified list, sorted by
24h volume.

Unlike the venue pass-through (`POST /api/:exchange/:method`), the
Router is `GET`-based, browser-friendly, and never falls through to a
live venue call. It is always served from the Postgres catalog.

Pick the shape by the endpoint you hit:

* `GET /v0/events` — events with their child markets and outcomes nested inline.
* `GET /v0/markets` — flat per-market rows with their outcomes inline.

## Endpoints

```http theme={null}
GET https://api.pmxt.dev/v0/events
GET https://api.pmxt.dev/v0/markets
Authorization: Bearer pmxt_live_...
```

## Query parameters

| Parameter  | Type      | Default | Notes                                                   |
| ---------- | --------- | ------- | ------------------------------------------------------- |
| `query`    | `string`  | —       | Full-text ILIKE over title and slug.                    |
| `limit`    | `integer` | `50`    | Max rows, capped at `500`.                              |
| `offset`   | `integer` | `0`     | Standard pagination offset.                             |
| `closed`   | `boolean` | `false` | Include closed / resolved rows.                         |
| `category` | `string`  | —       | Exact match on normalized category.                     |
| `exchange` | `string`  | —       | Filter to a single venue (`polymarket`, `kalshi`, ...). |

## Events shape

```bash theme={null}
curl "https://api.pmxt.dev/v0/events?query=election&limit=2" \
  -H "Authorization: Bearer pmxt_live_..."
```

```json theme={null}
{
  "data": [
    {
      "id": "e344d660-5e22-411f-b516-ea37a0d9c3cb",
      "title": "2028 US Presidential Election",
      "volume24h": 12345678.9,
      "markets": [
        {
          "marketId": "…",
          "title": "Will Gavin Newsom win?",
          "outcomes": [
            { "label": "Yes", "price": 0.31, "priceChange24h":  0.02 },
            { "label": "No",  "price": 0.69, "priceChange24h": -0.02 }
          ]
        }
      ]
    }
  ],
  "meta": { "count": 2, "limit": 2, "offset": 0 }
}
```

Exactly the same shape as [`UnifiedEvent`](/concepts/unified-schema#unifiedevent).

## Markets shape

```bash theme={null}
curl "https://api.pmxt.dev/v0/markets?query=election&limit=3" \
  -H "Authorization: Bearer pmxt_live_..."
```

```json theme={null}
{
  "data": [
    {
      "marketId": "d35bc8c6-5602-477d-af21-e9513af9d696",
      "eventId":  "3b6432b6-c956-446e-a7a6-abda14e97aba",
      "title":    "US forces enter Iran by April 30?",
      "volume24h": 89757605.08,
      "outcomes": [
        { "outcomeId": "…", "label": "April 30",     "price": 0.9985, "priceChange24h":  0.002 },
        { "outcomeId": "…", "label": "Not April 30", "price": 0.0015, "priceChange24h":  0.000 }
      ]
    }
  ],
  "meta": { "count": 3, "limit": 3, "offset": 0 }
}
```

## Events vs markets

| You want…                                       | Use                                                      |
| ----------------------------------------------- | -------------------------------------------------------- |
| A single answer for a topic with many questions | `GET /v0/events`                                         |
| A flat list ranked across all events            | `GET /v0/markets`                                        |
| The full venue surface (writes, OHLCV, ...)     | [`POST /api/:exchange/:method`](/api-reference/overview) |

## Latency

Typical p95 on a warm catalog: **\~10 ms per request**, regardless of
venue. Cross-venue fan-out that would take 2–5 seconds live is served
by a single indexed SQL query against `prediction_markets.events` +
`prediction_markets.markets` + `prediction_markets.outcomes`.

See [Unified Schema](/concepts/unified-schema) for the full rationale.
