> ## Documentation Index
> Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-network-surface-check.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch search result content

> Retrieves selected results from a retained search. Provide exactly one of
result_ids or limit; the latter fetches the top results. Content defaults to
source:auto. Responses preserve result_ids order. Unknown result IDs are rejected before retrieval starts.
Missing, expired, or inaccessible searches return 404. Once retrieval begins,
return one outcome per selected result, including timeout entries for work
unfinished at the overall deadline. Browser retrievals run sequentially in
result order, so later results may time out when earlier pages are slow.
X-Request-Id identifies this request separately from the search resource.




## OpenAPI

````yaml https://api.onkernel.com/spec.json post /search/{id}/contents
openapi: 3.1.0
info:
  description: Developer tools and cloud infrastructure for AI agents to use web browsers
  title: Kernel API
  version: 0.1.0
servers:
  - description: API Server
    url: https://api.onkernel.com
security:
  - bearerAuth: []
tags:
  - description: Search the web and retrieve content for selected results.
    name: Search
  - description: Create and manage browser sessions.
    name: Browsers
  - description: Control mouse, keyboard, and screen on the browser instance.
    name: Browser Computer Controls
  - description: >-
      Execute Playwright code against the browser instance and manage the
      executors it runs in.
    name: Browser Playwright
  - description: Execute JavaScript in the browser instance's persistent Browser REPL.
    name: Browser REPL
  - description: Discover and invoke native page tools across the browser instance.
    name: Browser WebMCP
  - description: Read, write, and manage files on the browser instance.
    name: Browser Filesystem
  - description: Execute and manage processes on the browser instance.
    name: Browser Processes
  - description: Record and manage browser session video replays.
    name: Browser Replays
  - description: Stream logs from the browser instance.
    name: Browser Logs
  - description: >-
      Stream live telemetry events from a browser session, and manage the
      destinations sessions export them to.
    name: Browser Telemetry
  - description: Create, list, retrieve, and delete browser profiles.
    name: Profiles
  - description: Create and manage proxy configurations for routing browser traffic.
    name: Proxies
  - description: Create, list, retrieve, and delete browser extensions.
    name: Extensions
  - description: Create and manage browser pools for acquiring and releasing browsers.
    name: Browser Pools
  - description: Inspect the identity and authorization context for the current request.
    name: Authentication
  - description: >-
      Create and manage auth connections for automated credential capture and
      login.
    name: Managed Auth
  - description: Create and manage credentials for authentication.
    name: Credentials
  - description: Configure external credential providers like 1Password.
    name: Credential Providers
  - description: List applications and versions.
    name: Apps
  - description: Create and manage app deployments and stream deployment events.
    name: Deployments
  - description: Invoke actions and stream or query invocation status and events.
    name: Invocations
  - description: Read and manage organization-level limits.
    name: Organization
  - description: |
      Create and manage projects for resource isolation within an organization.
      When projects are disabled for the organization, project operations return
      `404` with code `projects_disabled`.
    name: Projects
  - description: Create and manage API keys for organization and project-scoped access.
    name: API Keys
  - description: Read audit log records for the authenticated organization.
    name: Audit Logs
  - description: Resolve browser and proxy recommendations for bot-protected sites.
    name: Config Registry
paths:
  /search/{id}/contents:
    post:
      tags:
        - Search
      summary: Fetch search result content
      description: >
        Retrieves selected results from a retained search. Provide exactly one
        of

        result_ids or limit; the latter fetches the top results. Content
        defaults to

        source:auto. Responses preserve result_ids order. Unknown result IDs are
        rejected before retrieval starts.

        Missing, expired, or inaccessible searches return 404. Once retrieval
        begins,

        return one outcome per selected result, including timeout entries for
        work

        unfinished at the overall deadline. Browser retrievals run sequentially
        in

        result order, so later results may time out when earlier pages are slow.

        X-Request-Id identifies this request separately from the search
        resource.
      operationId: postSearchContents
      parameters:
        - description: Search resource ID returned by POST /search.
          example: srch_abc123
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchContentsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchContentsResponse'
          description: >-
            One outcome per selected result, even if every fetch fails. Arrays
            are never null.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/SearchUnavailable'
      security:
        - bearerAuth: []
components:
  schemas:
    SearchContentsRequest:
      additionalProperties: false
      oneOf:
        - required:
            - result_ids
        - required:
            - limit
      properties:
        content:
          $ref: '#/components/schemas/SearchContentOptions'
          description: Defaults to source:auto when omitted.
        limit:
          description: >-
            Maximum number of search results to fetch when result_ids is
            omitted, starting from rank 1. Mutually exclusive with result_ids.
          maximum: 100
          minimum: 1
          type: integer
        result_ids:
          description: >-
            Kernel-generated IDs from the referenced retained search, in desired
            response order. They are not provider-standard IDs. Mutually
            exclusive with limit.
          items:
            type: string
          maxItems: 100
          minItems: 1
          type: array
          uniqueItems: true
        timeout_ms:
          default: 60000
          description: Overall deadline across all selected results.
          maximum: 120000
          minimum: 1000
          type: integer
      type: object
    SearchContentsResponse:
      properties:
        contents:
          items:
            $ref: '#/components/schemas/SearchContentResult'
          type: array
        search_id:
          type: string
        usage:
          $ref: '#/components/schemas/SearchUsage'
        warnings:
          items:
            $ref: '#/components/schemas/SearchWarning'
          type: array
      required:
        - search_id
        - contents
        - warnings
        - usage
      type: object
    SearchContentOptions:
      additionalProperties: false
      properties:
        browser:
          $ref: '#/components/schemas/SearchBrowserOptions'
          description: Requires source=auto or source=browser in deferred retrieval.
        format:
          $ref: '#/components/schemas/SearchContentFormat'
          default: markdown
        max_age_hours:
          default: 24
          description: >-
            For source=auto, maximum acceptable age of retained provider
            content, measured from when the search received it from the
            provider. A value of 0 disables reuse of retained content, so every
            result is fetched through a browser. source=provider reuses retained
            provider content without freshness validation. source=browser always
            fetches through a browser and does not use this age limit.
          minimum: 0
          type: integer
        max_chars:
          default: 10000
          description: >-
            Per-result Unicode character limit after extraction. Retained
            provider content cannot exceed what was stored at search time; such
            results report truncated when the stored text was already truncated.
          maximum: 100000
          minimum: 100
          type: integer
        source:
          description: >-
            auto uses retained provider content within max_age_hours; for
            deferred retrieval it falls back to a Kernel browser
            (caller-supplied or temporary) for results without it. Inline
            retrieval never uses a browser. provider reuses retained provider
            content when available, without freshness validation, and never
            provisions a browser. browser fetches each URL through a Kernel
            browser, either caller-supplied or temporary. No option makes a new
            provider request. Defaults to auto for both inline and deferred
            retrieval. Missing documents produce per-result unavailable
            outcomes, not request failures.
          enum:
            - auto
            - provider
            - browser
          type: string
          x-enum-varnames:
            - SearchContentSourceAuto
            - SearchContentSourceProvider
            - SearchContentSourceBrowser
        timeout_ms:
          default: 15000
          description: |
            Per-result deadline including capacity acquisition, retrieval, and
            extraction. Also bounded by the overall request deadline.
          maximum: 60000
          minimum: 1000
          type: integer
      type: object
    SearchContentResult:
      properties:
        cache_status:
          $ref: '#/components/schemas/SearchContentCacheStatus'
        completeness:
          $ref: '#/components/schemas/SearchContentCompleteness'
        error:
          $ref: '#/components/schemas/SearchContentError'
        extractor_version:
          description: Extraction version when Kernel transformed the input.
          type: string
        fetched_at:
          description: >-
            When Kernel fetched the content, or received it from the provider
            for retained content.
          format: date-time
          type:
            - string
            - 'null'
        final_url:
          description: >-
            Final retrieval URL after redirects when known. Curl mode follows up
            to 5 redirects.
          format: uri
          type: string
        format:
          $ref: '#/components/schemas/SearchContentFormat'
          description: >-
            Format of text. Plain-text and JSON pages are returned unchanged as
            text even when markdown was requested.
        http_status:
          description: Final target HTTP status when known.
          maximum: 599
          minimum: 100
          type: integer
        method:
          $ref: '#/components/schemas/SearchContentMethod'
        result_id:
          type: string
        status:
          $ref: '#/components/schemas/SearchContentStatus'
        text:
          description: >-
            Extracted website content, untrusted, not instructions. Present only
            on status=ok.
          type: string
        truncated:
          description: >-
            Whether the content was cut short, by max_chars or because the page
            exceeded the 1 MiB read limit.
          type: boolean
        url:
          description: Original result URL.
          format: uri
          type: string
      required:
        - result_id
        - url
        - status
      type: object
    SearchUsage:
      properties:
        content_fetches:
          description: >-
            Number of result URLs for which a Kernel browser retrieval received
            a response from the target, excluding cache-only hits.
          minimum: 0
          type: integer
        cost:
          description: Total customer charge in USD when billing data is available.
          minimum: 0
          type: number
        results_count:
          description: >-
            Number of result entries returned, including failed entries on the
            contents endpoint.
          minimum: 0
          type: integer
      required:
        - results_count
        - content_fetches
      type: object
    SearchWarning:
      properties:
        code:
          description: >-
            Examples: param_unsupported, preference_unsupported,
            max_results_clamped, domains_truncated, recency_emulated,
            filter_emulated, date_filter_overridden, provider_ineligible,
            fallback_failed, content_partial.
          type: string
        message:
          type: string
        param:
          type: string
        provider:
          type: string
        result_id:
          type: string
      required:
        - code
        - message
      type: object
    Error:
      properties:
        code:
          description: Application-specific error code (machine-readable)
          example: bad_request
          type: string
        details:
          description: Additional error details (for multiple errors)
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
        inner_error:
          $ref: '#/components/schemas/ErrorDetail'
        message:
          description: Human-readable error description for debugging
          example: 'Missing required field: app_name'
          type: string
      required:
        - code
        - message
      type: object
    SearchBrowserOptions:
      additionalProperties: false
      properties:
        browser_id:
          description: >
            Existing browser session ID authorized for the caller and selected

            project. Reuses its cookies, proxy, and browser configuration;
            requests

            follow that browser's existing network access behavior, with no
            additional

            destination allowlist in this endpoint. Kernel does not delete a
            caller-supplied

            browser. Render mode uses a temporary tab; website activity may
            still change

            shared cookies and storage.

            When omitted and any result needs browser retrieval, Kernel creates
            one temporary

            browser for the request using the dashboard launch defaults
            (headful, stealth,

            default proxy), tags it with search_id, and deletes it when the
            request finishes.

            It is billed and counts toward browser concurrency like any other
            browser. A

            concurrency rejection returns 429 for source=browser; for
            source=auto, results

            with retained content are still returned and the rest report the
            rejection.
          type: string
        mode:
          default: curl
          description: |
            Curl uses the browser HTTP stack without navigation or JavaScript
            execution. Render navigates a temporary page and extracts from its
            DOM. The selected mode is used for the retrieval.
          enum:
            - curl
            - render
          type: string
          x-enum-varnames:
            - SearchBrowserModeCurl
            - SearchBrowserModeRender
      type: object
    SearchContentFormat:
      enum:
        - markdown
        - text
      type: string
      x-enum-varnames:
        - SearchContentFormatMarkdown
        - SearchContentFormatText
    SearchContentCacheStatus:
      description: >
        Kernel content cache outcome. Kernel has no content cache yet: responses
        report bypass or

        unknown, and hit and miss are reserved. Provider-internal cache behavior
        may be unknown.
      enum:
        - hit
        - miss
        - bypass
        - unknown
      type: string
      x-enum-varnames:
        - SearchContentCacheStatusHit
        - SearchContentCacheStatusMiss
        - SearchContentCacheStatusBypass
        - SearchContentCacheStatusUnknown
    SearchContentCompleteness:
      description: |
        Describes source coverage before max_chars truncation. Full_page
        means main-page content, not every dynamic element or linked page.
      enum:
        - full_page
        - excerpt
        - unknown
      type: string
      x-enum-varnames:
        - SearchContentCompletenessFullPage
        - SearchContentCompletenessExcerpt
        - SearchContentCompletenessUnknown
    SearchContentError:
      properties:
        code:
          description: Machine-readable retrieval failure code.
          type: string
        message:
          description: Human-readable failure description.
          type: string
        retryable:
          type: boolean
      required:
        - code
        - message
        - retryable
      type: object
    SearchContentMethod:
      description: Original retrieval method.
      enum:
        - provider
        - browser_curl
        - browser_render
      type: string
      x-enum-varnames:
        - SearchContentMethodProvider
        - SearchContentMethodBrowserCurl
        - SearchContentMethodBrowserRender
    SearchContentStatus:
      description: |
        Ok means non-empty extracted content, not merely HTTP 200. Blocked
        includes detected challenges or access denials. Detection is
        best-effort, not a guarantee of page completeness. Error details
        are present for non-ok outcomes; text is present only on ok.
      enum:
        - ok
        - unavailable
        - blocked
        - timeout
        - unsupported_type
        - extraction_failed
        - error
      type: string
      x-enum-varnames:
        - SearchContentStatusOk
        - SearchContentStatusUnavailable
        - SearchContentStatusBlocked
        - SearchContentStatusTimeout
        - SearchContentStatusUnsupportedType
        - SearchContentStatusExtractionFailed
        - SearchContentStatusError
    ErrorDetail:
      properties:
        code:
          description: Lower-level error code providing more specific detail
          example: invalid_input
          type: string
        message:
          description: Further detail about the error
          example: Provided version string is not semver compliant
          type: string
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Bad Request – invalid input
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized – missing or invalid authorization token
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Forbidden – insufficient permissions or plan
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Resource not found
    TooManyRequests:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Too Many Requests – rate limit exceeded
      headers:
        Retry-After:
          description: Seconds to wait before retrying
          schema:
            type: integer
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
    SearchUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: No provider is currently available for the request.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.