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

# Search Events

> API reference for GET /api/v1/search

## What Search Covers

Search uses a multi-field, full-text query across **events** and **markets**.

### Events (fields searched)

* `id` (event ticker)
* `series_ticker` (series ticker)
* `title`
* `sub_title`

### Markets (fields searched)

* `id` (market ticker)
* `event_ticker`
* `title`
* `yes_sub_title`
* `no_sub_title`

### Fields Not Searched

Search does **not** query tags, categories, rules, competition fields, images,
or settlement sources.

## How Matching Works

* The query is split on whitespace; **all tokens** must match.
* Ticker fields (`id`, `series_ticker`, `event_ticker`) match **upper and lower**
  variants.
* Text fields (`title`, `sub_title`, `yes_sub_title`, `no_sub_title`) use
  full-text matching.
* Special characters are escaped before search.


## OpenAPI

````yaml GET /api/v1/search
openapi: 3.1.0
info:
  title: prediction-markets-api
  description: API for prediction markets
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://dev-prediction-markets-api.dflow.net
security:
  - api_key: []
tags:
  - name: Candlesticks
    description: Market and event candlesticks relay endpoints
  - name: Events
    description: Event management endpoints
  - name: Markets
    description: Market management endpoints
  - name: Trades
    description: Trade history endpoints
  - name: Series
    description: Series template endpoints
  - name: Tags
    description: Tag and category endpoints
  - name: Sports
    description: Sports filtering endpoints
  - name: Live Data
    description: Live data relay endpoints
  - name: Orderbook
    description: Orderbook endpoints
  - name: Search
    description: Full-text search endpoints
paths:
  /api/v1/search:
    get:
      tags:
        - Search
      summary: Get events with nested markets by title or ticker (search)
      description: Returns events with nested markets which match the search query
      operationId: full_text_search
      parameters:
        - name: q
          in: query
          description: The query string to search for
          required: true
          schema:
            type: string
        - name: sort
          in: query
          description: Field to sort by
          required: false
          schema:
            $ref: '#/components/schemas/SortField'
        - name: order
          in: query
          description: How to order the results
          required: false
          schema:
            $ref: '#/components/schemas/SortMethod'
        - name: limit
          in: query
          description: How many records to limit the results to
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: cursor
          in: query
          description: Cursor for pagination
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: withNestedMarkets
          in: query
          description: Include nested markets in response
          required: false
          schema:
            type: boolean
        - name: withMarketAccounts
          in: query
          description: |-
            Include market account information (settlement mints and redemption
            status)
          required: false
          schema:
            type: boolean
        - name: status
          in: query
          description: >-
            Filter events by market status. Available options: initialized,
            active,

            inactive, closed, determined
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SortField:
      type: string
      enum:
        - volume
        - volume24h
        - liquidity
        - openInterest
        - startDate
    SortMethod:
      type: string
      enum:
        - desc
        - asc
    SearchResponse:
      type: object
      required:
        - events
        - cursor
      properties:
        cursor:
          type: integer
          format: int32
          minimum: 0
        events:
          type: array
          items:
            $ref: '#/components/schemas/SingleEventResponse'
    ErrorResponse:
      type: object
      required:
        - msg
        - code
      properties:
        code:
          type: string
        msg:
          type: string
    SingleEventResponse:
      type: object
      required:
        - ticker
        - seriesTicker
        - title
        - subtitle
      properties:
        competition:
          type:
            - string
            - 'null'
        competitionScope:
          type:
            - string
            - 'null'
        imageUrl:
          type:
            - string
            - 'null'
        liquidity:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        markets:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/SingleMarketResponse'
        openInterest:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        openInterestFp:
          type:
            - string
            - 'null'
        seriesTicker:
          type: string
        settlementSources:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/SettlementSource'
        strikeDate:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        strikePeriod:
          type:
            - string
            - 'null'
        subtitle:
          type: string
        ticker:
          type: string
        title:
          type: string
        volume:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        volume24h:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        volume24hFp:
          type:
            - string
            - 'null'
        volumeFp:
          type:
            - string
            - 'null'
    SingleMarketResponse:
      type: object
      required:
        - ticker
        - eventTicker
        - marketType
        - title
        - subtitle
        - yesSubTitle
        - noSubTitle
        - openTime
        - closeTime
        - expirationTime
        - status
        - volume
        - result
        - openInterest
        - fractionalTradingEnabled
        - canCloseEarly
        - rulesPrimary
        - accounts
      properties:
        accounts:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MarketAccountInfo'
          propertyNames:
            type: string
        canCloseEarly:
          type: boolean
        closeTime:
          type: integer
          format: int64
          minimum: 0
        earlyCloseCondition:
          type:
            - string
            - 'null'
        eventTicker:
          type: string
        expirationTime:
          type: integer
          format: int64
          minimum: 0
        fractionalTradingEnabled:
          type: boolean
        marketType:
          type: string
        noAsk:
          type:
            - string
            - 'null'
        noBid:
          type:
            - string
            - 'null'
        noSubTitle:
          type: string
        openInterest:
          type: integer
          format: int64
          minimum: 0
        openInterestFp:
          type:
            - string
            - 'null'
        openTime:
          type: integer
          format: int64
          minimum: 0
        result:
          type: string
        rulesPrimary:
          type: string
        rulesSecondary:
          type:
            - string
            - 'null'
        status:
          type: string
        subtitle:
          type: string
        ticker:
          type: string
        title:
          type: string
        volume:
          type: integer
          format: int64
          minimum: 0
        volume24hFp:
          type:
            - string
            - 'null'
        volumeFp:
          type:
            - string
            - 'null'
        yesAsk:
          type:
            - string
            - 'null'
        yesBid:
          type:
            - string
            - 'null'
        yesSubTitle:
          type: string
    SettlementSource:
      type: object
      required:
        - name
        - url
      properties:
        name:
          type: string
          description: Name of the settlement source
        url:
          type: string
          description: URL to the settlement source
    MarketAccountInfo:
      type: object
      required:
        - marketLedger
        - yesMint
        - noMint
        - isInitialized
      properties:
        isInitialized:
          type: boolean
        marketLedger:
          type: string
        noMint:
          type: string
        redemptionStatus:
          type:
            - string
            - 'null'
        scalarOutcomePct:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        yesMint:
          type: string
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Contact hello@dflow.net to obtain an API
        key.

````