OpenSERP Server (self-hosted)

The MIT-licensed, self-hosted OpenSERP REST server. Runs on port 7000 by default and exposes dedicated per-engine web and image search, Google and Bing SERP HTML parsing, multi-engine mega search, single and batch URL extraction, health and readiness probes, and cache, proxy-pool and circuit-breaker statistics. Ships a published OpenAPI 3.0.3 contract and a Swagger UI at /docs.

OpenAPI Specification

openserp-oss-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: OpenSERP API
  version: 2.2.0
  description: >
    OpenSERP provides dedicated and multi-engine search endpoints for Google, Yandex,
    Baidu, Bing, and DuckDuckGo. Search responses are wrapped in a v2 envelope with
    query echo, metadata, normalized results, and pagination. Invalid client input
    returns 400 with a machine-readable `reason` code.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://127.0.0.1:7000
    description: Local default server
security: []
tags:
  - name: Search
    description: Dedicated per-engine search endpoints
  - name: Mega
    description: Cross-engine aggregated search endpoints
  - name: Health
    description: Health and readiness endpoints
  - name: Stats
    description: Runtime statistics endpoints
  - name: Docs
    description: OpenAPI and Swagger UI endpoints
paths:
  /{engine}/search:
    get:
      tags: [Search]
      operationId: searchWeb
      summary: Search web results from a specific engine
      description: >
        Engine path values are `google`, `yandex`, `baidu`, `bing`, `duck`, and `ecosia`
        (`duck` maps to DuckDuckGo internally). Use `?format=markdown|text|ndjson`
        for alternative output formats.
      parameters:
        - $ref: "#/components/parameters/EnginePath"
        - $ref: "#/components/parameters/TextQuery"
        - $ref: "#/components/parameters/LangQuery"
        - $ref: "#/components/parameters/RegionQuery"
        - $ref: "#/components/parameters/DateQuery"
        - $ref: "#/components/parameters/FileQuery"
        - $ref: "#/components/parameters/SiteQuery"
        - $ref: "#/components/parameters/LimitQuery"
        - $ref: "#/components/parameters/StartQuery"
        - $ref: "#/components/parameters/FilterQuery"
        - $ref: "#/components/parameters/FeaturesQuery"
        - $ref: "#/components/parameters/ExtractQuery"
        - $ref: "#/components/parameters/ExtractModeQuery"
        - $ref: "#/components/parameters/MinRunesQuery"
        - $ref: "#/components/parameters/FormatQuery"
        - $ref: "#/components/parameters/UseProxyHeader"
        - $ref: "#/components/parameters/ProxyURLHeader"
        - $ref: "#/components/parameters/ProxyCountryHeader"
        - $ref: "#/components/parameters/ProxyClassHeader"
        - $ref: "#/components/parameters/ProxyProviderHeader"
        - $ref: "#/components/parameters/ProxySessionIDHeader"
        - $ref: "#/components/parameters/TenantHeader"
      responses:
        "200":
          description: Search results envelope
          headers:
            X-Request-ID:
              $ref: "#/components/headers/XRequestID"
            X-Cache:
              $ref: "#/components/headers/XCache"
            X-Fallback-Engine:
              $ref: "#/components/headers/XFallbackEngine"
            X-Proxy-Mode:
              $ref: "#/components/headers/XProxyMode"
            X-Proxy-Tag:
              $ref: "#/components/headers/XProxyTag"
            X-Proxy-Used:
              $ref: "#/components/headers/XProxyUsed"
            X-Network-Bytes:
              $ref: "#/components/headers/XNetworkBytes"
            X-Browser-Profile-Id:
              $ref: "#/components/headers/XBrowserProfileID"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchEnvelope"
              examples:
                default:
                  value:
                    query:
                      text: golang
                      lang: EN
                      region: US
                      engines_requested: [google]
                    meta:
                      request_id: 01HXYZ...
                      requested_at: "2026-04-24T12:00:00Z"
                      took_ms: 842
                      engines_failed: []
                      version: "2.1"
                    results:
                      - id: s_a1b2c3d4e5f6a1b2
                        rank: 1
                        type: organic
                        title: The Go Programming Language
                        url: https://go.dev/
                        display_url: go.dev
                        snippet: Go is an open source programming language...
                        domain: go.dev
                        favicon: https://go.dev/favicon.ico
                        position:
                          absolute: 1
                        engine: google
                        domain_info:
                          tld: dev
                          sld: go
                          category: ""
                    serp_features:
                      - id: f_a1b2c3d4e5f6a1b2
                        engine: google
                        type: ai_summary
                        text: Go is an open source programming language used for fast, reliable services.
                        links:
                          - title: The Go Programming Language
                            url: https://go.dev/
                        source_result_ids: [s_a1b2c3d4e5f6a1b2]
                        position:
                          absolute: 1
                        confidence: 0.95
                        extracted_at: "2026-04-24T12:00:00Z"
                    pagination:
                      page: 1
                      has_more: true
                      next_start: 25
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
            application/x-ndjson:
              schema:
                type: string
        "400":
          $ref: "#/components/responses/BadRequestError"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "429":
          $ref: "#/components/responses/TooManyRequestsError"
        "502":
          $ref: "#/components/responses/BadGatewayError"
        "503":
          $ref: "#/components/responses/ServiceUnavailableError"
        "504":
          $ref: "#/components/responses/GatewayTimeoutError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /{engine}/image:
    get:
      tags: [Search]
      operationId: searchImages
      summary: Search image results from a specific engine
      parameters:
        - $ref: "#/components/parameters/EnginePath"
        - $ref: "#/components/parameters/TextQuery"
        - $ref: "#/components/parameters/LangQuery"
        - $ref: "#/components/parameters/RegionQuery"
        - $ref: "#/components/parameters/DateQuery"
        - $ref: "#/components/parameters/FileQuery"
        - $ref: "#/components/parameters/SiteQuery"
        - $ref: "#/components/parameters/LimitQuery"
        - $ref: "#/components/parameters/StartQuery"
        - $ref: "#/components/parameters/FilterQuery"
        - $ref: "#/components/parameters/FeaturesQuery"
        - $ref: "#/components/parameters/FormatQuery"
        - $ref: "#/components/parameters/UseProxyHeader"
        - $ref: "#/components/parameters/ProxyURLHeader"
        - $ref: "#/components/parameters/ProxyCountryHeader"
        - $ref: "#/components/parameters/ProxyClassHeader"
        - $ref: "#/components/parameters/ProxyProviderHeader"
        - $ref: "#/components/parameters/ProxySessionIDHeader"
        - $ref: "#/components/parameters/TenantHeader"
      responses:
        "200":
          description: Image search results envelope
          headers:
            X-Request-ID:
              $ref: "#/components/headers/XRequestID"
            X-Cache:
              $ref: "#/components/headers/XCache"
            X-Fallback-Engine:
              $ref: "#/components/headers/XFallbackEngine"
            X-Proxy-Mode:
              $ref: "#/components/headers/XProxyMode"
            X-Proxy-Tag:
              $ref: "#/components/headers/XProxyTag"
            X-Proxy-Used:
              $ref: "#/components/headers/XProxyUsed"
            X-Network-Bytes:
              $ref: "#/components/headers/XNetworkBytes"
            X-Browser-Profile-Id:
              $ref: "#/components/headers/XBrowserProfileID"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageEnvelope"
        "400":
          $ref: "#/components/responses/BadRequestError"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "429":
          $ref: "#/components/responses/TooManyRequestsError"
        "502":
          $ref: "#/components/responses/BadGatewayError"
        "503":
          $ref: "#/components/responses/ServiceUnavailableError"
        "504":
          $ref: "#/components/responses/GatewayTimeoutError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /google/parse:
    post:
      tags: [Search]
      operationId: parseGoogleHTML
      summary: Parse a Google SERP HTML document into structured results
      description: >
        Accepts raw Google SERP HTML in the request body and returns a standard
        search envelope. Useful when an upstream provider delivers raw HTML
        rather than JSON. No browser is used; parsing is done with goquery.
        The body size limit is 10 MB.
      requestBody:
        required: true
        content:
          text/html:
            schema:
              type: string
              description: Raw Google SERP HTML page
      parameters:
        - $ref: "#/components/parameters/FormatQuery"
      responses:
        "200":
          description: Parsed search results envelope
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchEnvelope"
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
            application/x-ndjson:
              schema:
                type: string
        "400":
          $ref: "#/components/responses/BadRequestError"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /bing/parse:
    post:
      tags: [Search]
      operationId: parseBingHTML
      summary: Parse a Bing SERP HTML document into structured results
      description: >
        Accepts raw Bing SERP HTML in the request body and returns a standard
        search envelope. Useful when an upstream provider delivers raw HTML
        rather than JSON. No browser is used; parsing is done with goquery.
        The body size limit is 10 MB.
      requestBody:
        required: true
        content:
          text/html:
            schema:
              type: string
              description: Raw Bing SERP HTML page
      parameters:
        - $ref: "#/components/parameters/FormatQuery"
      responses:
        "200":
          description: Parsed search results envelope
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchEnvelope"
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
            application/x-ndjson:
              schema:
                type: string
        "400":
          $ref: "#/components/responses/BadRequestError"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /mega/search:
    get:
      tags: [Mega]
      operationId: megaSearch
      summary: Search across multiple engines with selectable execution mode
      description: >
        Mode controls engine execution strategy: `balanced` (default) queries all
        selected engines in parallel, `any` runs engines sequentially in requested
        order until first success, and `fast` queries only the fastest engine based
        on circuit-breaker average response time stats.
        In `balanced` mode, `dedupe` and `merge` tune aggregation behavior.
        Partial failures are surfaced in `meta.engines_failed` and
        `meta.engine_errors`. If all selected engines fail, the endpoint returns
        a 502 with per-engine error details. Use `?format=markdown|text|ndjson`
        for alternative output formats.
      parameters:
        - $ref: "#/components/parameters/TextQuery"
        - $ref: "#/components/parameters/LangQuery"
        - $ref: "#/components/parameters/RegionQuery"
        - $ref: "#/components/parameters/DateQuery"
        - $ref: "#/components/parameters/FileQuery"
        - $ref: "#/components/parameters/SiteQuery"
        - $ref: "#/components/parameters/LimitQuery"
        - $ref: "#/components/parameters/StartQuery"
        - $ref: "#/components/parameters/FilterQuery"
        - $ref: "#/components/parameters/FeaturesQuery"
        - $ref: "#/components/parameters/EnginesQuery"
        - $ref: "#/components/parameters/MegaModeQuery"
        - $ref: "#/components/parameters/MegaDedupeQuery"
        - $ref: "#/components/parameters/MegaMergeQuery"
        - $ref: "#/components/parameters/ExtractQuery"
        - $ref: "#/components/parameters/ExtractModeQuery"
        - $ref: "#/components/parameters/MinRunesQuery"
        - $ref: "#/components/parameters/FormatQuery"
        - $ref: "#/components/parameters/UseProxyHeader"
        - $ref: "#/components/parameters/ProxyURLHeader"
        - $ref: "#/components/parameters/ProxyCountryHeader"
        - $ref: "#/components/parameters/ProxyClassHeader"
        - $ref: "#/components/parameters/ProxyProviderHeader"
        - $ref: "#/components/parameters/ProxySessionIDHeader"
        - $ref: "#/components/parameters/TenantHeader"
      responses:
        "200":
          description: Aggregated envelope with clusters
          headers:
            X-Request-ID:
              $ref: "#/components/headers/XRequestID"
            X-Cache:
              $ref: "#/components/headers/XCache"
            X-Proxy-Mode:
              $ref: "#/components/headers/XProxyMode"
            X-Proxy-Tag:
              $ref: "#/components/headers/XProxyTag"
            X-Proxy-Used:
              $ref: "#/components/headers/XProxyUsed"
            X-Network-Bytes:
              $ref: "#/components/headers/XNetworkBytes"
            X-Browser-Profile-Id:
              $ref: "#/components/headers/XBrowserProfileID"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MegaSearchEnvelope"
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
            application/x-ndjson:
              schema:
                type: string
        "400":
          $ref: "#/components/responses/BadRequestError"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "429":
          $ref: "#/components/responses/TooManyRequestsError"
        "502":
          $ref: "#/components/responses/BadGatewayError"
        "503":
          $ref: "#/components/responses/ServiceUnavailableError"
        "504":
          $ref: "#/components/responses/GatewayTimeoutError"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /mega/image:
    get:
      tags: [Mega]
      operationId: megaImageSearch
      summary: Image search across multiple engines with selectable execution mode
      parameters:
        - $ref: "#/components/parameters/TextQuery"
        - $ref: "#/components/parameters/LangQuery"
        - $ref: "#/components/parameters/RegionQuery"
        - $ref: "#/components/parameters/DateQuery"
        - $ref: "#/components/parameters/FileQuery"
        - $ref: "#/components/parameters/SiteQuery"
        - $ref: "#/components/parameters/LimitQuery"
        - $ref: "#/components/parameters/StartQuery"
        - $ref: "#/components/parameters/FilterQuery"
        - $ref: "#/components/parameters/FeaturesQuery"
        - $ref: "#/components/parameters/EnginesQuery"
        - $ref: "#/components/parameters/MegaModeQuery"
        - $ref: "#/components/parameters/MegaDedupeQuery"
        - $ref: "#/components/parameters/MegaMergeQuery"
        - $ref: "#/components/parameters/FormatQuery"
        - $ref: "#/components/parameters/UseProxyHeader"
        - $ref: "#/components/parameters/ProxyURLHeader"
        - $ref: "#/components/parameters/ProxyCountryHeader"
        - $ref: "#/components/parameters/ProxyClassHeader"
        - $ref: "#/components/parameters/ProxyProviderHeader"
        - $ref: "#/components/parameters/ProxySessionIDHeader"
        - $ref: "#/components/parameters/TenantHeader"
      responses:
        "200":
          description: Aggregated image results envelope
          headers:
            X-Request-ID:
              $ref: "#/components/headers/XRequestID"
            X-Cache:
              $ref: "#/components/headers/XCache"
            X-Proxy-Mode:
              $ref: "#/components/headers/XProxyMode"
            X-Proxy-Tag:
              $ref: "#/components/headers/XProxyTag"
            X-Proxy-Used:
              $ref: "#/components/headers/XProxyUsed"
            X-Network-Bytes:
              $ref: "#/components/headers/XNetworkBytes"
            X-Browser-Profile-Id:
              $ref: "#/components/headers/XBrowserProfileID"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageEnvelope"
        "400":
          $ref: "#/components/responses/BadRequestError"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "429":
          $ref: "#/components/responses/TooManyRequestsError"
        "502":
          $ref: "#/components/responses/BadGatewayError"
        "503":
          $ref: "#/components/responses/ServiceUnavailableError"
        "504":
          $ref: "#/components/responses/GatewayTimeoutError"
        "500":
          $ref: "#/components/responses/InternalServerError"
  /mega/engines:
    get:
      tags: [Mega]
      operationId: listMegaEngines
      summary: List available engines and runtime state
      responses:
        "200":
          description: Engine list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MegaEnginesResponse"
  /extract:
    get:
      tags: [Search]
      operationId: extractURL
      summary: Extract clean content from one URL
      parameters:
        - $ref: "#/components/parameters/URLQuery"
        - $ref: "#/components/parameters/ExtractModeShortQuery"
        - $ref: "#/components/parameters/MinRunesQuery"
        - $ref: "#/components/parameters/LangQuery"
        - $ref: "#/components/parameters/CleanQuery"
        - $ref: "#/components/parameters/UseLLMSTxtQuery"
        - $ref: "#/components/parameters/FormatQuery"
        - $ref: "#/components/parameters/UseProxyHeader"
        - $ref: "#/components/parameters/ProxyURLHeader"
      responses:
        "200":
          description: Extracted URL content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtractResult"
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
            application/x-ndjson:
              schema:
                type: string
        "400":
          $ref: "#/components/responses/BadRequestError"
        "502":
          $ref: "#/components/responses/BadGatewayError"
    post:
      tags: [Search]
      operationId: extractURLPost
      summary: Extract clean content from one URL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [url]
              properties:
                url:
                  type: string
                  format: uri
                mode:
                  type: string
                  enum: [auto, fast, rendered]
                  default: auto
                clean:
                  type: boolean
                  default: true
                  description: >
                    Article-only extraction (default). Set `false` for
                    whole-readable-body extraction that keeps nav/feature/landing
                    content trafilatura would otherwise strip.
                use_llms_txt:
                  type: boolean
                  default: false
                  description: >
                    When the URL is a site root, probe `/llms-full.txt` then
                    `/llms.txt` and return that LLM-optimized markdown instead of
                    scraping HTML. Falls through to normal extraction when absent.
                min_runes:
                  type: integer
                  minimum: 0
                  description: >
                    Auto-mode escalation floor: if the fast (raw) pass yields fewer
                    extracted-text runes than this, escalate to a browser render.
                    `0` (default) uses the built-in floor. Ignored in `fast` and
                    `rendered` modes.
                lang:
                  type: string
                  description: >
                    Language hint sent as `Accept-Language` on the target fetch.
                    The `lang` query parameter works as a fallback.
      responses:
        "200":
          description: Extracted URL content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExtractResult"
        "400":
          $ref: "#/components/responses/BadRequestError"
        "502":
          $ref: "#/components/responses/BadGatewayError"

  /extract/batch:
    post:
      tags: [Search]
      operationId: extractBatch
      summary: Extract content from multiple URLs
      description: >
        Accepts up to 20 URLs (deduplicated) and returns a bare JSON array of
        `{page_content, metadata}` items - the shape Open WebUI's external web
        loader expects. A URL that fails validation or extraction yields an
        item with `metadata.error` and an empty `page_content` instead of
        failing the batch. `400` is reserved for malformed requests: empty or
        oversized `urls`, unknown `mode`, invalid proxy headers.
      parameters:
        - $ref: "#/components/parameters/UseProxyHeader"
        - $ref: "#/components/parameters/ProxyURLHeader"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchExtractRequest"
      responses:
        "200":
          description: Batch extraction results, one item per unique URL
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BatchExtractItem"
        "400":
          $ref: "#/components/responses/BadRequestError"

  /health:
    get:
      tags: [Health]
      operationId: healthCheck
      summary: Service health status
      responses:
        "200":
          description: Healthy or degraded service
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HealthStatus"
        "503":
          description: Unhealthy service
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HealthStatus"
  /ready:
    get:
      tags: [Health]
      operationId: readinessCheck
      summary: Service readiness status
      responses:
        "200":
          description: Instance is ready
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReadinessStatus"
        "503":
          description: Instance is draining
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReadinessStatus"
  /stats:
    get:
      tags: [Stats]
      operationId: getStats
      summary: Combined cache, proxy, and circuit-breaker stats
      responses:
        "200":
          description: Runtime statistics
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatsResponse"
  /stats/cache:
    get:
      tags: [Stats]
      operationId: getCacheStats
      summary: Cache statistics only
      responses:
        "200":
          description: Cache status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CacheStats"
  /stats/proxy:
    get:
      tags: [Stats]
      operationId: getProxyStats
      summary: Proxy pool and per-engine proxy policy statistics
      responses:
        "200":
          description: Proxy stats
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProxyStats"
  /stats/cb:
    get:
      tags: [Stats]
      operationId: getCircuitBreakerStats
      summary: Circuit breaker state per engine
      responses:
        "200":
          description: Circuit breaker stats
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CircuitBreakerStatsResponse"
  /openapi.yaml:
    get:
      tags: [Docs]
      operationId: getOpenAPISpec
      summary: Get raw OpenAPI YAML
      responses:
        "200":
          description: OpenAPI YAML
          content:
            application/yaml:
              schema:
                type: string
  /docs:
    get:
      tags: [Docs]
      operationId: getSwaggerUI
      summary: Swagger UI for interactive API docs
      responses:
        "200":
          description: HTML page loading Swagger UI from CDN
          content:
            text/html:
              schema:
                type: string
components:
  parameters:
    EnginePath:
      name: engine
      in: path
      required: true
      description: Search engine endpoint alias (`duck` is DuckDuckGo).
      schema:
        type: string
        enum: [google, yandex, baidu, bing, duck, ecosia]
    TextQuery:
      name: text
      in: query
      required: false
      description: >
        Search query text. At least one of `text`, `site`, or `file` must be non-empty.
      schema:
        type: string
      example: golang
    LangQuery:
      name: lang
      in: query
      required: false
      description: Language code (engine-specific behavior).
      schema:
        type: string
      example: EN
    RegionQuery:
      name: region
      in: query
      required: false
      description: >
        Market/location hint. Country or locale-style values such as `US`,
        `DE`, or `en-GB` are shared by engines that support them. Google also
        accepts city names such as `Berlin` or `New York` and sends them as
        `uule`. Yandex accepts numeric `lr` region IDs such as `213`; those IDs
        are engine-specific and are ignored by other engines.
      schema:
        type: string
      examples:
        yandex:
          value: "213"
        country:
          value: RU
        google_city:
          value: Berlin
    DateQuery:
      name: date
      in: query
      required: false
      description: Date interval in `YYYYMMDD..YYYYMMDD` format.
      schema:
        type: string
        pattern: "^[0-9]{8}\\.\\.[0-9]{8}$"
      example: 20250101..20250131
    FileQuery:
      name: file
      in: query
      required: false
      description: File extension filter (for engines that support it).
      schema:
        type: string
      example: PDF
    SiteQuery:
      name: site
      in: query
      required: false
      description: Site/domain filter.
      schema:
        type: string
      example: github.com
    LimitQuery:
      name: limit
      in: query
      required: false
      description: Maximum organic results to return (1-100). Ads may be returned in addition. Omitted or small limits (<=10) parse only the first SERP page; larger limits may paginate when an engine supports it.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
      example: 10
    StartQuery:
      name: start
      in: query
      required: false
      description: Pagination offset (must be >= 0).
      schema:
        type: integer
        minimum: 0
        default: 0
      example: 20
    FilterQuery:
      name: filter
      in: query
      required: false
      description: Duplicate filtering flag (primarily used by Google parser behavior).
      schema:
        type: boolean
        default: true
    FeaturesQuery:
      name: features
      in: query
      required: false
      description: >
        Populate the top-level serp_features array (AI summaries, answer boxes,
        people-also-ask, related searches) from the live browser search when
        supported by the engine.
      schema:
        type: boolean
        default: true
    EnginesQuery:
      name: engines
      in: query
      required: false
      description: >
        Comma-separated engine list for mega endpoints. If omitted, all available engines are used.
      schema:
        type: string
      example: google,bing,duckduckgo
    MegaModeQuery:
      name: mode
      in: query
      required: false
      description: >
        Mega execution mode. `balanced` (default) runs all selected engines in parallel.
        `any` runs selected engines sequentially in request order until first success.
        `fast` runs only one engine: the fastest by circuit-breaker average response time.
      schema:
        type: string
        enum: [balanced, any, fast]
        default: balanced
    MegaDedupeQuery:
      name: dedupe
      in: query
      required: false
      description: >
        Enable deduplication by normalized URL. Default `true`.
      schema:
        type: boolean
        default: true
    MegaMergeQuery:
      name: merge
      in: query
      required: false
      description: >
        Merge results from all successful engines into one flat list. Default `true`.
        When `false`, only the first requested engine that returned results is kept.
      schema:
        type: boolean
        default: true
    FormatQuery:
      name: format
      in: query
      required: false
      description: >
        Output format. `json` (default) returns the envelope. `markdown` returns a
        Markdown document suitable for Slack/email. `text` returns a minimal plain-text
        block optimised for LLM context windows. `ndjson` returns one result object per
        line with no envelope. The `Accept` header is also checked
        (`text/markdown`, `text/plain`, `application/x-ndjson`).
      schema:
        type: string
        enum: [json, markdown, text, ndjson]
        default: json
    URLQuery:
      name: url
      in: query
      required: true
      description: Absolute URL to fetch and extract.
      schema:
        type: string
        format: uri
    ExtractQuery:
      name: extract
      in: query
      required: false
      description: >
        Fetch and embed cleaned target-page content for the top web results.
        Accepts a boolean or an integer depth: `extract=0`/`false` disables
        extraction; `extract=true`/`1` enriches the top result; `extract=N`
        (1-5) enriches the top N results. The tuning params `extract_mode` and
        `min_runes` imply `extract=true` (top 1) when present, unless
        `extract=0` is set explicitly.
      schema:
        oneOf:
          - type: boolean
          - type: integer
            minimum: 0
            maximum: 5
        default: false
    ExtractModeQuery:
      name: extract_mode
      in: query
      required: false
      description: >
        Extraction strategy for target pages. Its presence implies
        `extract=true` unless `extract=0` is set explicitly.
      schema:
        type: string
        enum: [auto, fast, rendered]
        default: auto
    ExtractModeShortQuery:
      name: mode
      in: query
      required: false
      description: Extraction strategy for one URL.
      schema:
        type: string
        enum: [auto, fast, rendered]
        default: auto
    MinRunesQuery:
      name: min_runes
      in: query
      required: false
      description: >
        Auto-mode escalation floor: if the fast (raw) pass yields fewer
        extracted-text runes than this, escalate to a browser render. `0`
        (default) uses the built-in floor. Ignored in `fast` and `rendered`
        mo

# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/openserp/refs/heads/main/openapi/openserp-oss-openapi.yml