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

# Queue Site Crawl

> Queue a site crawl job for batch product discovery.

**Authentication Required**: Requires `product:write` permission.

Creates a Job (type=CRAWL) and publishes a discovery event to NATS.



## OpenAPI

````yaml /openapi/merchantops-public.json post /api/products/queue-crawl
openapi: 3.1.0
info:
  description: >-
    Public API for the MerchantOps product catalog, pricing, and publishing
    surface.
  title: MerchantOps API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.merchantops.ai
security: []
paths:
  /api/products/queue-crawl:
    post:
      tags:
        - Products
      summary: Queue Site Crawl
      description: |-
        Queue a site crawl job for batch product discovery.

        **Authentication Required**: Requires `product:write` permission.

        Creates a Job (type=CRAWL) and publishes a discovery event to NATS.
      operationId: queue_site_crawl
      parameters:
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: X-Organization-ID
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Organization-Id
        - in: cookie
          name: stytch_session
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Stytch Session
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SiteCrawlRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrawlJobResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    SiteCrawlRequest:
      description: Request model for site crawl job using Firecrawl Map API.
      properties:
        max_pages:
          default: 500
          description: >-
            Maximum URLs to discover (1-5000). Map API is efficient for large
            sites.
          maximum: 5000
          minimum: 1
          title: Max Pages
          type: integer
        search:
          default: product
          description: >-
            Search term to filter discovered URLs (e.g., 'product' to find
            product pages)
          title: Search
          type: string
        site_url:
          description: Base URL to map
          title: Site Url
          type: string
      required:
        - site_url
      title: SiteCrawlRequest
      type: object
    CrawlJobResponse:
      description: Response model for crawl job.
      properties:
        job_id:
          description: Unique job identifier
          title: Job Id
          type: string
        message:
          description: Status message
          title: Message
          type: string
        site_url:
          description: Site being crawled
          title: Site Url
          type: string
        status:
          description: Job status
          title: Status
          type: string
      required:
        - job_id
        - status
        - site_url
        - message
      title: CrawlJobResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````