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

# Create a Monitor

> Creates a new Monitor to run recurring Exa searches on a schedule.

Monitors automatically execute your search query on a recurring schedule and deliver results to your webhook endpoint with automatic deduplication:
- **Date-based filtering** only fetches content since the last run
- **Semantic deduplication** tracks previous outputs to surface only new developments

The response includes a `webhookSecret` that is only returned once at creation time. Store it securely for webhook signature verification.



## OpenAPI

````yaml post /monitors
openapi: 3.1.0
info:
  version: 1.0.0
  title: Exa Monitors API
  description: API for creating and managing scheduled monitors with webhook notifications.
servers:
  - url: https://api.exa.ai
security:
  - api_key: []
paths:
  /monitors:
    post:
      tags:
        - Monitors
      summary: Create a Monitor
      description: >-
        Creates a new Monitor to run recurring Exa searches on a schedule.


        Monitors automatically execute your search query on a recurring schedule
        and deliver results to your webhook endpoint with automatic
        deduplication:

        - **Date-based filtering** only fetches content since the last run

        - **Semantic deduplication** tracks previous outputs to surface only new
        developments


        The response includes a `webhookSecret` that is only returned once at
        creation time. Store it securely for webhook signature verification.
      operationId: createMonitor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSearchMonitorParameters'
      responses:
        '201':
          description: The created monitor with webhook secret
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSearchMonitorResponse'
        '400':
          description: Invalid parameters
        '401':
          description: Invalid or missing API key
components:
  schemas:
    CreateSearchMonitorParameters:
      type: object
      properties:
        name:
          type: string
          description: An optional name for the monitor
        search:
          $ref: '#/components/schemas/SearchMonitorSearch'
        trigger:
          $ref: '#/components/schemas/SearchMonitorTrigger'
        outputSchema:
          $ref: '#/components/schemas/SearchMonitorOutputSchema'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Optional key-value metadata. Echoed back in webhook deliveries so
            you can route updates to systems like Slack.
          example:
            slack_channel_id: C123ABC
            slack_thread_id: '1745444400.123456'
            user_id: U123ABC
        webhook:
          $ref: '#/components/schemas/SearchMonitorWebhook'
      required:
        - search
        - webhook
    CreateSearchMonitorResponse:
      allOf:
        - $ref: '#/components/schemas/SearchMonitor'
        - type: object
          properties:
            webhookSecret:
              type: string
              description: >-
                The secret used to verify webhook signatures. This is only
                returned once at creation time. Store it securely.
          required:
            - webhookSecret
    SearchMonitorSearch:
      type: object
      properties:
        query:
          type: string
          description: The search query to run on each execution
        numResults:
          type: integer
          minimum: 1
          maximum: 100
          description: Number of results to return per run
        contents:
          $ref: '#/components/schemas/SearchMonitorContents'
      required:
        - query
    SearchMonitorTrigger:
      type: object
      properties:
        type:
          type: string
          const: interval
          default: interval
          description: The type of trigger. Currently only `interval` is supported.
        period:
          type: string
          description: >-
            A duration string specifying how often the monitor runs (e.g., "1h",
            "6h", "1d", "7d"). Single-unit only. Minimum interval is 1 hour. The
            schedule is anchored to the monitor's creation time (e.g., a daily
            monitor created at 2:30 PM runs daily around 2:30 PM).
          example: 6h
      required:
        - type
        - period
    SearchMonitorOutputSchema:
      type: object
      nullable: true
      description: >-
        Controls the format of the run output. Defaults to `{ "type": "text" }`
        if not specified. When `type` is `"text"`, the output is a plain text
        summary. When `type` is `"object"`, the output is structured JSON. If no
        `properties` are specified with `"object"` type, a schema is inferred
        automatically; otherwise the output adheres to the provided schema.
      properties:
        type:
          type: string
          enum:
            - text
            - object
          default: text
          description: >-
            The output format. `"text"` returns a plain text summary. `"object"`
            returns structured JSON.
        description:
          type: string
          description: >-
            Describes how the output should be written. Supported for both
            `text` and `object` types.
        properties:
          type: object
          description: >-
            Only used when `type` is `"object"`. An object where each key is a
            property name and each value is a JSON Schema describing that
            property (with `type`, `description`, etc). If omitted, a schema is
            inferred automatically.
        required:
          type: array
          items:
            type: string
          description: >-
            Only used when `type` is `"object"`. List of required property
            names.
        additionalProperties:
          type: boolean
          description: >-
            Only used when `type` is `"object"`. Whether to allow properties not
            listed in `properties`.
          default: false
    SearchMonitorWebhook:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: >-
            The HTTPS URL to receive webhook events. Must not point to localhost
            or private IP ranges.
        events:
          type: array
          items:
            type: string
            enum:
              - monitor.created
              - monitor.updated
              - monitor.deleted
              - monitor.run.created
              - monitor.run.completed
          description: >-
            Which events to subscribe to. Defaults to all events if not
            specified.
      required:
        - url
    SearchMonitor:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the monitor
        name:
          type: string
          nullable: true
          description: An optional display name
        status:
          type: string
          enum:
            - active
            - paused
            - disabled
          description: >-
            The status of the monitor. `active` monitors run on schedule and can
            be triggered manually. `paused` monitors can only be triggered
            manually. `disabled` monitors are auto-disabled after 10 consecutive
            authentication failures.
        search:
          $ref: '#/components/schemas/SearchMonitorSearch'
        trigger:
          nullable: true
          description: >-
            The interval-based schedule for automatic runs. Null if no schedule
            is set.
          allOf:
            - $ref: '#/components/schemas/SearchMonitorTrigger'
        outputSchema:
          $ref: '#/components/schemas/SearchMonitorOutputSchema'
        metadata:
          type: object
          nullable: true
          description: >-
            Optional key-value metadata for your own tracking. Echoed back in
            webhook deliveries so you can route updates to systems like Slack.
          additionalProperties:
            type: string
          example:
            slack_channel_id: C123ABC
            slack_thread_id: '1745444400.123456'
            user_id: U123ABC
        webhook:
          $ref: '#/components/schemas/SearchMonitorWebhook'
        nextRunAt:
          type: string
          format: date-time
          nullable: true
          description: When the next scheduled run will occur. Null if no trigger is set.
        createdAt:
          type: string
          format: date-time
          description: When the monitor was created
        updatedAt:
          type: string
          format: date-time
          description: When the monitor was last updated
      required:
        - id
        - name
        - status
        - search
        - trigger
        - outputSchema
        - metadata
        - webhook
        - nextRunAt
        - createdAt
        - updatedAt
    SearchMonitorContents:
      type: object
      description: >-
        Content extraction options applied to each search result. All fields are
        optional.
      properties:
        text:
          description: >-
            Return full page text as markdown. Pass `true` for defaults, or an
            object with `maxCharacters`, `includeHtmlTags`, `verbosity`
            (compact/standard/full), `includeSections`, `excludeSections`.
          oneOf:
            - type: boolean
            - type: object
              properties:
                maxCharacters:
                  type: integer
                  description: Character limit for returned text
                includeHtmlTags:
                  type: boolean
                  description: Preserve HTML tags in output
                verbosity:
                  type: string
                  enum:
                    - compact
                    - standard
                    - full
                  description: Level of detail in returned text
                includeSections:
                  type: array
                  items:
                    type: string
                    enum:
                      - header
                      - navigation
                      - banner
                      - body
                      - sidebar
                      - footer
                      - metadata
                  description: Only include these page sections
                excludeSections:
                  type: array
                  items:
                    type: string
                    enum:
                      - header
                      - navigation
                      - banner
                      - body
                      - sidebar
                      - footer
                      - metadata
                  description: Exclude these page sections
        highlights:
          description: >-
            Return key excerpts. Pass `true` for the highest-quality default, or
            an object with `query` to guide selection with your own query.
          oneOf:
            - type: boolean
            - type: object
              properties:
                query:
                  type: string
                  description: Custom query that guides which highlights are returned
                maxCharacters:
                  type: integer
                  description: Maximum characters for all highlights combined
        summary:
          description: >-
            Return an LLM-generated summary. Pass `true` for defaults, or an
            object with `query` and `maxTokens`.
          oneOf:
            - type: boolean
            - type: object
              properties:
                query:
                  type: string
                  description: Custom query for the summary
                maxTokens:
                  type: integer
                  description: Maximum tokens for the summary
        extras:
          type: object
          description: Extract links and media from results
          properties:
            links:
              type: integer
              minimum: 0
              maximum: 1000
            imageLinks:
              type: integer
              minimum: 0
              maximum: 1000
            richImageLinks:
              type: integer
              minimum: 0
              maximum: 1000
            richLinks:
              type: integer
              minimum: 0
              maximum: 1000
            codeBlocks:
              type: integer
              minimum: 0
              maximum: 1000
        context:
          description: >-
            Return surrounding context. Pass `true` for defaults, or an object
            with `maxCharacters`.
          oneOf:
            - type: boolean
            - type: object
              properties:
                maxCharacters:
                  type: integer
        livecrawl:
          type: string
          enum:
            - never
            - always
            - fallback
            - auto
            - preferred
          description: Crawl strategy for fetching page content
        livecrawlTimeout:
          type: integer
          minimum: 0
          maximum: 90000
          description: Livecrawl timeout in milliseconds
        maxAgeHours:
          type: integer
          description: >-
            Maximum age of cached content in hours. `0` forces livecrawl. `-1`
            only uses cache.
        filterEmptyResults:
          type: boolean
          description: Filter out results with no content
        subpages:
          type: integer
          minimum: 0
          maximum: 100
          description: Number of subpages to crawl per result
        subpageTarget:
          description: Keywords to prioritize when selecting subpages
          oneOf:
            - type: string
            - type: array
              items:
                type: string
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key

````