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

# Search by keyphrases

> Search for events using keyphrases.




## OpenAPI

````yaml openapi.json post /search
openapi: 3.0.0
info:
  title: Nevua Markets API
  version: 0.0.1
  license:
    name: ISC
    url: https://opensource.org/licenses/ISC
servers:
  - url: https://api.nevua.markets
    description: Production
security: []
tags: []
paths:
  /search:
    post:
      tags:
        - Search
      summary: Search by keyphrases
      description: |
        Search for events using keyphrases.
      operationId: searchEvents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchJSONRequest'
            example:
              keyphrases:
                - text: will trump
                  include: true
              searchMatchOperator: OR
      responses:
        '200':
          description: Successful search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchJSONResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  schemas:
    SearchJSONRequest:
      type: object
      properties:
        keyphrases:
          type: array
          items:
            $ref: '#/components/schemas/SearchKeyphrase'
        searchMatchOperator:
          $ref: '#/components/schemas/SearchMatchOperator'
      additionalProperties: false
      required:
        - keyphrases
        - searchMatchOperator
    SearchJSONResponse:
      type: array
      items:
        $ref: '#/components/schemas/MatchingEvent'
    SearchKeyphrase:
      type: object
      properties:
        text:
          type: string
        include:
          type: boolean
      additionalProperties: false
      required:
        - text
    SearchMatchOperator:
      type: string
      enum:
        - AND
        - OR
    MatchingEvent:
      type: object
      properties:
        id:
          description: The event ID
          type: string
        title:
          description: The event title
          type: string
        slug:
          description: The event slug
          type: string
        image:
          description: The event image
          type: string
        type:
          description: The event type
          enum:
            - event
            - market
          type: string
        markets:
          description: The markets associated with the event
          type: array
          items:
            type: object
            properties:
              id:
                description: The market ID
                type: string
              image:
                description: The market image
                type: string
              question:
                description: The market question
                type: string
              outcomes:
                description: Outcomes and outcome prices
                type: string
              outcomePrices:
                type: string
              nevuaSVGLink:
                description: SVG link
                type: string
            additionalProperties: false
            required:
              - id
              - image
              - nevuaSVGLink
              - outcomePrices
              - outcomes
              - question
      additionalProperties: false
      required:
        - id
        - image
        - markets
        - slug
        - title
        - type

````