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

# Search events

> Full-text search across the Eventory event catalog with optional filters
and sort orders. See the **Search filters** guide for the
`filterExpression` syntax and the filterable attributes.

**Cost:** 1 credit.




## OpenAPI

````yaml /openapi.yaml post /eventory/data/search
openapi: 3.1.0
info:
  title: Eventory API
  version: '1.0'
  description: >
    Every HTTP endpoint of the Eventory platform, reached through the single
    public

    gateway at `https://api.eventory.ai`. The real-time notification stream is a

    WebSocket and is documented separately under **Real-time stream**.


    Authenticate every request with the `apikey` header. Each endpoint lists its

    credit cost; see **Credits & access** for how billing works.
  contact:
    name: Eventory
    url: https://eventory.ai
servers:
  - url: https://api.eventory.ai
    description: Production
security:
  - apiKey: []
tags:
  - name: Market Data
    description: |
      Historical and aggregated marketplace data for events and artists, plus
      full-text search over the Eventory catalog. Polling API.
      **1 credit per request** (sales list scales with rows requested).
  - name: Live Availability
    description: >
      On-demand scrape of the current ticket availability for one event on one
      of

      the eleven supported platforms. **5 credits per request.**
  - name: Watchlist
    description: |
      Manage the events your account monitors. The watchlist drives the
      real-time stream. **Free.**
  - name: Account
    description: Your plan and credit usage, live from billing. **Free.**
paths:
  /eventory/data/search:
    post:
      tags:
        - Market Data
      summary: Search events
      description: |
        Full-text search across the Eventory event catalog with optional filters
        and sort orders. See the **Search filters** guide for the
        `filterExpression` syntax and the filterable attributes.

        **Cost:** 1 credit.
      operationId: searchEvents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
            example:
              query: drake
              page: 1
              hitsPerPage: 24
              sortBy: tickets_sold.desc
              filterExpression: venue_country_code:US
      responses:
        '200':
          description: Search results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: >-
            Validation failed (bad type, out-of-range value, expression too
            long).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataApiError'
              example:
                status: error
                code: INVALID_REQUEST
                message: hitsPerPage must be <= 100
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          $ref: '#/components/responses/DataUpstream'
components:
  schemas:
    SearchRequest:
      type: object
      properties:
        query:
          type: string
          maxLength: 200
          default: ''
          description: Free-text query.
        page:
          type: integer
          minimum: 1
          maximum: 1000
          default: 1
          description: 1-based page index.
        hitsPerPage:
          type: integer
          minimum: 1
          maximum: 100
          default: 24
        sortBy:
          type: string
          default: recommended
          enum:
            - recommended
            - event_date
            - event_date.desc
            - event_name
            - event_name.desc
            - average_ticket_price_sold
            - average_ticket_price_sold.desc
            - tickets_sold
            - tickets_sold.desc
            - tickets_sold_24h
            - tickets_sold_24h.desc
            - available_tickets
            - available_tickets.desc
            - capacity
            - capacity.desc
        filterExpression:
          type: string
          maxLength: 6000
          default: ''
          description: Filter expression. See the **Search filters** guide.
          example: venue_country_code:US AND tickets_sold > 1000
    SearchResponse:
      type: object
      properties:
        hits:
          type: array
          description: >-
            Shape is determined by the search index and may include fields
            beyond the example.
          items:
            type: object
            additionalProperties: true
            properties:
              objectID:
                type: string
              event_id:
                type: integer
              event_name:
                type: string
              event_date:
                type: integer
                description: Unix timestamp (seconds).
              category_name:
                type: string
              artist_id:
                type: integer
              artist_name:
                type: string
              venue_id:
                type: integer
              venue_name:
                type: string
              venue_city:
                type: string
              venue_country:
                type: string
              venue_country_code:
                type: string
              tickets_sold:
                type: integer
              tickets_sold_24h:
                type: integer
              available_tickets:
                type: integer
              capacity:
                type: integer
              average_ticket_price_sold:
                type: number
        page:
          type: integer
        hitsPerPage:
          type: integer
        nbHits:
          type: integer
          description: Total matching events.
        nbPages:
          type: integer
        processingTimeMS:
          type: integer
      example:
        hits:
          - objectID: evt-12345
            event_id: 12345
            event_name: Drake — World Tour
            event_date: 1781294400
            category_name: Concerts
            artist_id: 981
            artist_name: Drake
            venue_id: 77
            venue_name: O2 Arena
            venue_city: London
            venue_country: United Kingdom
            venue_country_code: GB
            tickets_sold: 8000
            tickets_sold_24h: 210
            available_tickets: 1400
            capacity: 20000
            average_ticket_price_sold: 145.2
        page: 1
        hitsPerPage: 24
        nbHits: 1
        nbPages: 1
        processingTimeMS: 7
    DataApiError:
      type: object
      description: Error envelope of the Market Data API.
      required:
        - status
        - code
        - message
      properties:
        status:
          type: string
          const: error
        code:
          type: string
          enum:
            - INVALID_VIAGOGO_ID
            - INVALID_REQUEST
            - MISSING_URL
            - EVENT_NOT_FOUND
            - ARTIST_NOT_FOUND
            - BAD_UPSTREAM_REQUEST
            - UPSTREAM_AUTH_FAILED
            - EDGE_UPSTREAM_ERROR
            - EDGE_UNAVAILABLE
            - EDGE_TIMEOUT
            - INTERNAL_ERROR
        message:
          type: string
    GatewayError:
      type: object
      description: >
        Envelope for every failure decided by the gateway (auth, ACL, billing,

        rate limit, unknown route, upstream 5xx). Key on `code`; `message` is
        prose

        and may change.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthenticated
                - invalid_credentials
                - forbidden
                - no_subscription
                - limit_reached
                - no_billing_account
                - plan_unavailable
                - payment_required
                - invalid_parameter
                - rate_limited
                - not_found
                - service_unavailable
            message:
              type: string
  responses:
    Unauthenticated:
      description: No credential was sent, or the key was rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          examples:
            missing:
              value:
                error:
                  code: unauthenticated
                  message: Authentication is required to access this resource.
            invalid:
              value:
                error:
                  code: invalid_credentials
                  message: The provided credentials are invalid.
    PaymentRequired:
      description: Billing denied the request. See `code`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          examples:
            limit:
              value:
                error:
                  code: limit_reached
                  message: You have reached your usage limit.
            subscription:
              value:
                error:
                  code: no_subscription
                  message: No active subscription.
    Forbidden:
      description: >-
        The key is valid but not granted this route. Contact support to enable
        it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            error:
              code: forbidden
              message: You do not have access to this resource.
    RateLimited:
      description: More than 30 requests in the current minute. Back off.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded.
    DataUpstream:
      description: >-
        The data backend rejected the request, failed, or timed out.
        `INTERNAL_ERROR`, `EDGE_UNAVAILABLE`, and `EDGE_TIMEOUT` are safe to
        retry once with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DataApiError'
          example:
            status: error
            code: EDGE_UPSTREAM_ERROR
            message: Upstream returned an unexpected payload
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: Your Eventory API key. Sent as the `apikey` request header.

````