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

# Run the Search agent

> Runs Messari's Search agent standalone over Messari research and news. Returns the retrieved documents in `sources`. There is no synthesized answer and no citation numbering: this endpoint retrieves, and the caller writes the answer. Requires an authenticated Enterprise user holding the `ai_toolkit_permission` API permission. Limited to 30 requests per minute per user.



## OpenAPI

````yaml POST /ai/v1/agent/search
openapi: 3.0.0
info:
  description: OpenAPI specification for the entire Messari API
  title: Messari API - Ai V1
  version: 1.0.0
servers:
  - description: Messari API
    url: https://api.messari.io
security: []
paths:
  /ai/v1/agent/search:
    post:
      summary: Run the Search agent
      description: >-
        Runs Messari's Search agent standalone over Messari research and news.
        Returns the retrieved documents in `sources`. There is no synthesized
        answer and no citation numbering: this endpoint retrieves, and the
        caller writes the answer. Requires an authenticated Enterprise user
        holding the `ai_toolkit_permission` API permission. Limited to 30
        requests per minute per user.
      operationId: postSearchAgent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/SearchResponse'
                  error:
                    type: string
                  metadata:
                    $ref: '#/components/schemas/SearchResponseMetadata'
                required:
                  - data
                type: object
              example:
                error: null
                data:
                  sources:
                    - domain: research
                      title: EigenLayer and Securing New Middleware
                      url: >-
                        https://messari.io/report/eigenlayer-and-securing-new-middleware
                      published_at: '2023-02-28T15:30:59Z'
                      content: >-
                        TITLE:

                        EigenLayer and Securing New Middleware


                        HOOK:

                        EigenLayer is a restaking primitive that enables
                        Ethereum stakers to use their staked ETH to secure
                        additional networks, thus effectively securing multiple
                        services with the same initial capital. The team
                        recently released the public version of their
                        whitepaper.


                        ASSET SLUGS:

                        ethereum, eigenlayer


                        PUBLISHED:

                        2023-02-28T15:30:59.879000Z


                        CONTENT: …
                    - domain: research
                      title: EigenLayer and Securing New Middleware
                      url: >-
                        https://messari.io/report/eigenlayer-and-securing-new-middleware
                      published_at: '2023-02-28T15:30:59Z'
                      content: >-
                        TITLE:

                        EigenLayer and Securing New Middleware


                        HOOK:

                        EigenLayer is a restaking primitive that enables
                        Ethereum stakers to use their staked ETH to secure
                        additional networks, thus effectively securing multiple
                        services with the same initial capital. The team
                        recently released the public version of their
                        whitepaper.


                        ASSET SLUGS:

                        ethereum, eigenlayer


                        PUBLISHED:

                        2023-02-28T15:30:59.879000Z


                        CONTENT: …
                metadata:
                  trace_id: 43efbf4c-e3c7-4d64-8892-9e8dc4c7a85a
          description: Default response
        '400':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  error:
                    type: string
                required:
                  - data
                type: object
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  error:
                    type: string
                required:
                  - data
                type: object
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  error:
                    type: string
                required:
                  - data
                type: object
          description: Forbidden
        '429':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  error:
                    type: string
                required:
                  - data
                type: object
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  error:
                    type: string
                required:
                  - data
                type: object
          description: Internal Server Error
      security:
        - apiKey: []
components:
  schemas:
    SearchRequest:
      properties:
        query:
          description: One natural language question. Ask one thing per call.
          type: string
          example: What is EigenLayer restaking?
      required:
        - query
      type: object
    SearchResponse:
      properties:
        sources:
          description: The retrieved documents.
          items:
            $ref: '#/components/schemas/SearchSource'
          type: array
        error:
          description: Set only when the run finds no usable document. It explains why.
          type: string
      required:
        - sources
      type: object
    SearchResponseMetadata:
      properties:
        trace_id:
          format: byte
          type: string
      required:
        - trace_id
      type: object
    SearchSource:
      properties:
        domain:
          description: >-
            The corpus the document came from, for example research, news,
            external_news, diligence, governance, twitter or video_transcript.
          type: string
        title:
          type: string
        url:
          type: string
        published_at:
          description: >-
            When the document became current. Absent where the domain carries no
            date.
          format: date-time
          type: string
        content:
          description: The document text.
          type: string
      type: object
  securitySchemes:
    apiKey:
      in: header
      name: X-Messari-API-Key
      type: apiKey

````