> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Prediction Markets

> Search and filter prediction markets by query, category, status, volume, and liquidity.

<Warning>**Alpha** — This endpoint is part of the Prediction Markets API, currently in early access. May change without notice.</Warning>

### Query Parameters

<ParamField query="input" type="string">
  Text search query on market question and description.
</ParamField>

<ParamField query="filters" type="string">
  JSON object with filter criteria. Accepted keys: `platforms` (comma-separated or array), `categories` (comma-separated or array), `statuses` (comma-separated or array), `minVolume` (number), `minLiquidity` (number), `excludeRecurring` (boolean — exclude recurring series such as hourly/daily up-or-down markets).

  Example: `{"platforms":"polymarket","categories":"crypto,politics","statuses":"active","minVolume":10000,"excludeRecurring":true}`
</ParamField>

<ParamField query="sortBy" type="string" default="volume24hUSD">
  Sort field. Possible values: `volume24hUSD` (24h volume), `totalVolumeUSD` (all-time volume), `liquidityUSD` (current liquidity), `createdAt` (newest first), `endDate` (resolution date — combine with `order=asc` for "closing soon"), `trendingScore` (trending score).
</ParamField>

<ParamField query="order" type="string" default="desc">
  Sort direction. `asc` or `desc`.
</ParamField>

<ParamField query="limit" type="number" default="50">
  Number of markets to return (1 to 100).
</ParamField>

<ParamField query="offset" type="number" default="0">
  Pagination offset.
</ParamField>

### Response

<ResponseField name="data" type="array">
  Array of market search results.

  <Expandable title="Search Result">
    <ResponseField name="platform" type="string">Platform name.</ResponseField>
    <ResponseField name="marketId" type="string">Market identifier.</ResponseField>
    <ResponseField name="slug" type="string">URL-friendly slug.</ResponseField>
    <ResponseField name="question" type="string">Market question.</ResponseField>
    <ResponseField name="category" type="string">Market category.</ResponseField>
    <ResponseField name="status" type="string">Market status.</ResponseField>
    <ResponseField name="logo" type="string">Market logo URL.</ResponseField>
    <ResponseField name="volume24hUSD" type="number">24-hour trading volume in USD.</ResponseField>
    <ResponseField name="totalVolumeUSD" type="number">All-time trading volume in USD.</ResponseField>
    <ResponseField name="liquidityUSD" type="number">Current liquidity in USD.</ResponseField>
    <ResponseField name="endDate" type="string | null">Market end date in ISO 8601, or null if not set.</ResponseField>
    <ResponseField name="createdAt" type="string">Market creation timestamp in ISO 8601.</ResponseField>
    <ResponseField name="openInterestUSD" type="number | null">Open interest in USD.</ResponseField>
    <ResponseField name="tradesCount" type="number">Total number of trades.</ResponseField>
    <ResponseField name="eventId" type="string | null">Parent event identifier, if this market belongs to a grouped event. `null` for standalone markets. Use with [`/api/2/pm/event/details`](/endpoint/pm-event-details) to fetch the full event.</ResponseField>
    <ResponseField name="eventSlug" type="string | null">Parent event URL-friendly slug. `null` for standalone markets.</ResponseField>
    <ResponseField name="eventTitle" type="string | null">Parent event title. `null` for standalone markets.</ResponseField>

    <ResponseField name="outcomes" type="array">
      Array of outcome summaries.

      <Expandable title="Outcome Summary">
        <ResponseField name="outcomeId" type="string">Outcome token ID.</ResponseField>
        <ResponseField name="label" type="string">Outcome label.</ResponseField>
        <ResponseField name="priceUSD" type="number">Current price (0 to 1).</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata.

  <Expandable title="Pagination">
    <ResponseField name="page" type="number">Current page number (1-indexed).</ResponseField>
    <ResponseField name="offset" type="number">Current offset.</ResponseField>
    <ResponseField name="limit" type="number">Items per page.</ResponseField>
    <ResponseField name="pageEntries" type="number">Number of items returned in this page.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hostname" type="string">Server hostname that handled the request.</ResponseField>
<ResponseField name="took" type="number">Request processing time in milliseconds.</ResponseField>

### Usage Examples

#### Search by keyword

```bash theme={null}
curl -X GET "https://api.mobula.io/api/2/pm/search?input=ethereum&sortBy=volume24hUSD&limit=10"
```

#### Filter by category and minimum volume

```bash theme={null}
curl -X GET 'https://api.mobula.io/api/2/pm/search?filters={"categories":"crypto","minVolume":10000}&sortBy=liquidityUSD'
```

#### Get active markets sorted by trending

```bash theme={null}
curl -X GET 'https://api.mobula.io/api/2/pm/search?filters={"statuses":"active"}&sortBy=trendingScore&limit=20'
```

### Example Response

```json theme={null}
{
  "data": [
    {
      "platform": "polymarket",
      "marketId": "0x1234...",
      "slug": "will-eth-reach-10k-2026",
      "question": "Will ETH reach $10,000 by end of 2026?",
      "category": "crypto",
      "status": "active",
      "logo": "https://polymarket.com/images/market.png",
      "volume24hUSD": 45000,
      "totalVolumeUSD": 1250000,
      "liquidityUSD": 320000,
      "openInterestUSD": 580000,
      "endDate": "2026-12-31T23:59:59.000Z",
      "createdAt": "2026-01-15T00:00:00.000Z",
      "tradesCount": 8500,
      "outcomes": [
        { "outcomeId": "71321...", "label": "Yes", "priceUSD": 0.35 },
        { "outcomeId": "71322...", "label": "No", "priceUSD": 0.65 }
      ]
    }
  ],
  "pagination": {
    "page": 1,
    "offset": 0,
    "limit": 50,
    "pageEntries": 1
  },
  "hostname": "node-xyz",
  "took": 42
}
```


## OpenAPI

````yaml GET /2/pm/search
openapi: 3.0.0
info:
  version: 1.0.0
  title: Mobula Prediction Markets API
  description: >-
    Documentation of the Mobula Prediction Markets API.


    The PM API is currently served from a dedicated host:
    `pm-api-prod-eu.mobula.io`.

    All endpoints below require an API key (same key as the main Mobula API).


    Parameter names below are the **canonical names enforced by the API

    controllers** (Zod-validated). Following the wrong name (e.g. `?market=...`

    instead of `?platform=...&marketId=...`) returns `HTTP 400`.
servers:
  - url: https://pm-api-prod-eu.mobula.io/api/
    description: PM Production API (requires API key)
security: []
tags:
  - name: V2 - PM Market
    description: Prediction market data — details, prices, order book, trades, OHLCV
  - name: V2 - PM Discovery
    description: Search, trending, categories, live markets
  - name: V2 - PM Wallet
    description: Wallet prediction-market positions, balances, PnL, activity, status
paths:
  /2/pm/search:
    get:
      tags:
        - V2 - PM Discovery
      summary: Search Prediction Markets
      description: >
        Search and filter prediction markets by query, category, status, volume,
        and liquidity.


        Filters are passed as a JSON-encoded `filters` query param, e.g.

        `?filters={"statuses":["open"],"minVolume":1000}`.
      parameters:
        - name: query
          in: query
          required: false
          description: >-
            Free-text search query (canonical name; `input` accepted as legacy
            alias).
          schema:
            type: string
        - name: input
          in: query
          required: false
          description: Legacy alias for `query`.
          schema:
            type: string
        - name: filters
          in: query
          required: false
          description: >
            JSON-encoded filter object. Supported keys: `platforms` (string[]),

            `categories` (string[]), `statuses` (string[]), `minVolume`
            (number),

            `minLiquidity` (number).
          schema:
            type: string
            example: '{"statuses":["open"],"minVolume":1000}'
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - volume24hUSD
              - totalVolumeUSD
              - liquidityUSD
              - createdAt
              - endDate
              - trendingScore
            default: volume24hUSD
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: limit
          in: query
          required: false
          description: Page size (1-100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
components:
  parameters:
    Offset:
      name: offset
      in: query
      required: false
      description: Pagination offset.
      schema:
        type: integer
        minimum: 0
        default: 0

````