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

# Compare Crawlers

> Admin-only: run V1 and V2 crawlers on the same URL, return side-by-side.

Used to eyeball V2 improvements over V1 on real sites before flipping
the global CRAWLER_V2_ENABLED flag. Safe to hit on production - V1
makes a real LLM call (~$0.008/request), V2 may launch Chromium
(~$0 on self-hosted Railway).

V1 and V2 run sequentially (not via asyncio.gather) so per-side
exceptions are isolated: if V1 crashes, V2 output still returns.

Calls ``_extract_brand_from_url`` directly (V1 impl) so the comparison
stays valid even when CRAWLER_V2_ENABLED=true — otherwise the 'v1'
key would route through V2 via generate_brand_kit_from_url and the
comparison would be meaningless.

Input URL is validated for SSRF (no private IPs, HTTPS required).



## OpenAPI

````yaml /openapi.json post /api/v1/admin/crawler/compare
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/crawler/compare:
    post:
      tags:
        - Admin
      summary: Compare Crawlers
      description: |-
        Admin-only: run V1 and V2 crawlers on the same URL, return side-by-side.

        Used to eyeball V2 improvements over V1 on real sites before flipping
        the global CRAWLER_V2_ENABLED flag. Safe to hit on production - V1
        makes a real LLM call (~$0.008/request), V2 may launch Chromium
        (~$0 on self-hosted Railway).

        V1 and V2 run sequentially (not via asyncio.gather) so per-side
        exceptions are isolated: if V1 crashes, V2 output still returns.

        Calls ``_extract_brand_from_url`` directly (V1 impl) so the comparison
        stays valid even when CRAWLER_V2_ENABLED=true — otherwise the 'v1'
        key would route through V2 via generate_brand_kit_from_url and the
        comparison would be meaningless.

        Input URL is validated for SSRF (no private IPs, HTTPS required).
      operationId: compare_crawlers_api_v1_admin_crawler_compare_post
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: true
              type: object
              title: Body
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````