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

# Fetch search result content

> Deferred result-content retrieval is reserved but not available in this release.
Requests return 404 until the retrieval implementation is shipped.
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.
    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: >
        Deferred result-content retrieval is reserved but not available in this
        release.

        Requests return 404 until the retrieval implementation is shipped.

        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:
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      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:
          default: 10
          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
          type: array
          uniqueItems: true
        timeout_ms:
          default: 60000
          description: Overall deadline across all selected results.
          maximum: 120000
          minimum: 1000
          type: integer
      type: object
    SearchContentOptions:
      additionalProperties: false
      properties:
        browser:
          $ref: '#/components/schemas/SearchBrowserOptions'
          description: |
            Invalid with source=provider. Supplying browser_id requires
            source=browser so the chosen identity is not bypassed.
        format:
          $ref: '#/components/schemas/SearchContentFormat'
          default: markdown
        max_age_hours:
          default: 24
          description: >-
            Maximum acceptable age of cached page content, measured from origin
            retrieval. 0 forces a live fetch. Governs the Kernel content cache,
            which is scoped to the caller organization and project and separated
            by retrieval context; fetches through a caller-supplied browser_id
            bypass that cache. Mapped to the provider freshness control when
            source is provider and the provider supports one; otherwise provider
            content age is reported as unknown via fetched_at.
          minimum: 0
          type: integer
        max_chars:
          default: 10000
          description: Per-result Unicode character limit after extraction.
          maximum: 100000
          minimum: 100
          type: integer
        source:
          description: >-
            provider uses the search provider's native content retrieval;
            browser fetches each URL through a Kernel browser; auto prefers
            Kernel browser retrieval and falls back to provider-native content
            when browser retrieval is unavailable or unsuitable. Defaults to
            auto for both inline and deferred retrieval. Deferred provider
            retrieval requires post_hoc capability; an explicit provider source
            without it is a 400. 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
    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.
            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, Kernel obtains isolated browser capacity in the
            caller's account and releases it after retrieval. That capacity is
            not retained for later interaction. Existing browser quotas apply.
          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
    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
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````