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

# Run Extract Template

> Execute Extract Template Realtime Endpoint



## OpenAPI

````yaml /api-reference/openapi.json post /v2/extract/templates/run
openapi: 3.1.0
info:
  title: Nimble SDK
  version: 1.0.0
  description: The AI-Native SDK for Real-Time Web Data at scale
servers:
  - url: https://sdk.nimbleway.com
security: []
paths:
  /v2/extract/templates/run:
    post:
      tags:
        - Extract Templates API
      summary: Run Extract Template
      description: Execute Extract Template Realtime Endpoint
      operationId: runExtractTemplate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractionTemplateBody'
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      browser_actions:
                        additionalProperties: false
                        description: >-
                          Browser actions execution results. Present only when
                          browser_actions were specified in the request.
                        properties:
                          results:
                            items:
                              additionalProperties: false
                              properties:
                                duration:
                                  minimum: 0
                                  type: number
                                error:
                                  type: string
                                name:
                                  enum:
                                    - goto
                                    - wait
                                    - wait_for_element
                                    - wait_for_navigation
                                    - click
                                    - fill
                                    - press
                                    - scroll
                                    - auto_scroll
                                    - screenshot
                                    - get_cookies
                                    - eval
                                    - fetch
                                  type: string
                                result: {}
                                status:
                                  enum:
                                    - no-run
                                    - in-progress
                                    - done
                                    - error
                                    - skipped
                                  type: string
                              required:
                                - name
                                - status
                                - duration
                              type: object
                            readOnly: true
                            type: array
                          success:
                            type: boolean
                          total_duration:
                            minimum: 0
                            type: number
                        required:
                          - success
                          - results
                          - total_duration
                        type: object
                      cookies:
                        description: >-
                          The cookies collected from browser actions during the
                          task.
                        items: {}
                        type: array
                      eval:
                        description: >-
                          The evaluation results from browser actions during the
                          task.
                        items: {}
                        type: array
                      fetch:
                        description: >-
                          The http requests from browser actions made during the
                          task.
                        items: {}
                        type: array
                      headers:
                        additionalProperties:
                          type: string
                        description: The headers received during the task.
                        propertyNames:
                          type: string
                        type: object
                      html:
                        description: The HTML content of the page.
                        type: string
                      links:
                        description: List of all unique URLs found on the page.
                        items:
                          type: string
                        type: array
                      markdown:
                        description: The Markdown version of the HTML content.
                        type: string
                      network_capture:
                        description: The network capture data collected during the task.
                        items:
                          additionalProperties: false
                          properties:
                            errorMessage:
                              type: string
                            filter:
                              additionalProperties: false
                              properties:
                                method:
                                  enum:
                                    - GET
                                    - HEAD
                                    - POST
                                    - PUT
                                    - DELETE
                                    - CONNECT
                                    - OPTIONS
                                    - TRACE
                                    - PATCH
                                  type: string
                                resource_type:
                                  anyOf:
                                    - description: >-
                                        Resource type for network capture
                                        filtering
                                      enum:
                                        - document
                                        - stylesheet
                                        - image
                                        - media
                                        - font
                                        - script
                                        - texttrack
                                        - xhr
                                        - fetch
                                        - prefetch
                                        - eventsource
                                        - websocket
                                        - manifest
                                        - signedexchange
                                        - ping
                                        - cspviolationreport
                                        - preflight
                                        - other
                                        - fedcm
                                      examples:
                                        - document
                                        - script
                                        - xhr
                                        - fetch
                                      type: string
                                    - items:
                                        description: >-
                                          Resource type for network capture
                                          filtering
                                        enum:
                                          - document
                                          - stylesheet
                                          - image
                                          - media
                                          - font
                                          - script
                                          - texttrack
                                          - xhr
                                          - fetch
                                          - prefetch
                                          - eventsource
                                          - websocket
                                          - manifest
                                          - signedexchange
                                          - ping
                                          - cspviolationreport
                                          - preflight
                                          - other
                                          - fedcm
                                        examples:
                                          - document
                                          - script
                                          - xhr
                                          - fetch
                                        type: string
                                      minItems: 1
                                      type: array
                                status_code:
                                  anyOf:
                                    - maximum: 599
                                      minimum: 100
                                      type: number
                                    - items:
                                        maximum: 599
                                        minimum: 100
                                        type: number
                                      minItems: 1
                                      type: array
                                url:
                                  additionalProperties: false
                                  properties:
                                    type:
                                      default: exact
                                      enum:
                                        - exact
                                        - contains
                                      type: string
                                    value:
                                      type: string
                                  required:
                                    - type
                                    - value
                                  type: object
                                validation:
                                  default: false
                                  type: boolean
                                wait_for_requests_count:
                                  default: 0
                                  minimum: 0
                                  type: number
                                wait_for_requests_count_timeout:
                                  exclusiveMinimum: 0
                                  maximum: 300000
                                  type: number
                              required:
                                - validation
                                - wait_for_requests_count
                              type: object
                            results:
                              items:
                                additionalProperties: false
                                properties:
                                  request:
                                    additionalProperties: false
                                    properties:
                                      body:
                                        type: string
                                      headers:
                                        additionalProperties:
                                          type: string
                                        propertyNames:
                                          type: string
                                        type: object
                                      method:
                                        type: string
                                      resource_type:
                                        description: >-
                                          Resource type for network capture
                                          filtering
                                        enum:
                                          - document
                                          - stylesheet
                                          - image
                                          - media
                                          - font
                                          - script
                                          - texttrack
                                          - xhr
                                          - fetch
                                          - prefetch
                                          - eventsource
                                          - websocket
                                          - manifest
                                          - signedexchange
                                          - ping
                                          - cspviolationreport
                                          - preflight
                                          - other
                                          - fedcm
                                        examples:
                                          - document
                                          - script
                                          - xhr
                                          - fetch
                                        type: string
                                      url:
                                        type: string
                                    required:
                                      - resource_type
                                      - method
                                      - url
                                      - headers
                                    type: object
                                  response:
                                    additionalProperties: false
                                    properties:
                                      body:
                                        type: string
                                      headers:
                                        additionalProperties:
                                          type: string
                                        propertyNames:
                                          type: string
                                        type: object
                                      serialization:
                                        enum:
                                          - none
                                          - base64
                                        type: string
                                      status:
                                        type: number
                                      status_text:
                                        type: string
                                    required:
                                      - status
                                      - status_text
                                      - headers
                                      - serialization
                                      - body
                                    type: object
                                required:
                                  - request
                                  - response
                                type: object
                              type: array
                          required:
                            - filter
                            - results
                          type: object
                        readOnly: true
                        type: array
                      pages_html:
                        description: >-
                          Individual HTML content of each pagination page,
                          before merging.
                        items:
                          type: string
                        type: array
                      parsing:
                        anyOf:
                          - $ref: '#/components/schemas/ParsingSuccessResult'
                          - $ref: '#/components/schemas/ParsingErrorResult'
                          - additionalProperties: {}
                            propertyNames:
                              type: string
                            type: object
                        description: >-
                          The parsing results extracted from the HTML & network
                          content.
                      redirects:
                        description: The list of redirects that occurred during the task.
                        items:
                          additionalProperties: false
                          properties:
                            status_code:
                              maximum: 599
                              minimum: 100
                              type: number
                            url:
                              type: string
                          required:
                            - status_code
                            - url
                          type: object
                        type: array
                      screenshots:
                        description: >-
                          Screenshots taken during the task, from browser
                          actions, or the screenshot format.
                        items: {}
                        type: array
                    type: object
                  debug:
                    additionalProperties: false
                    properties:
                      performance_metrics:
                        additionalProperties:
                          type: number
                        description: Performance metrics collected during the task.
                        propertyNames:
                          type: string
                        type: object
                      proxy_total_bytes_usage:
                        description: Total bytes used by the proxy during the task.
                        minimum: 0
                        type: number
                      transformed_output:
                        description: >-
                          The transformed output after applying any
                          transformations.
                      userbrowser:
                        description: The userbrowser instance using during the task.
                    type: object
                  metadata:
                    additionalProperties: false
                    properties:
                      agent:
                        description: The name of the agent used for the query.
                        type: string
                      driver:
                        description: The driver used for the task.
                        type: string
                      localization_id:
                        description: The localization identifier for the query.
                        type: string
                      query_duration:
                        description: The duration in milliseconds of the query processing.
                        type: number
                      query_time:
                        description: The time when the query was received.
                        type: string
                      response_parameters:
                        description: Additional response parameters.
                      tag:
                        description: A tag associated with the query.
                        type: string
                    type: object
                  pagination:
                    anyOf:
                      - additionalProperties: false
                        properties:
                          next_page_params:
                            additionalProperties: {}
                            properties: {}
                            type: object
                        required:
                          - next_page_params
                        type: object
                      - items:
                          additionalProperties: false
                          properties:
                            next_page_params:
                              additionalProperties: {}
                              properties: {}
                              type: object
                          required:
                            - next_page_params
                          type: object
                        type: array
                    description: Pagination information if applicable.
                  status:
                    description: The status of the task.
                    enum:
                      - success
                      - skipped
                      - fatal
                      - error
                      - postponed
                      - ignored
                      - rejected
                      - blocked
                    type: string
                  status_code:
                    description: The HTTP status code of the task.
                    type: number
                  task_id:
                    description: Unique identifier for the task.
                    type: string
                  url:
                    description: The final URL.
                    type: string
                  warnings:
                    description: List of warnings generated during the task.
                    items:
                      type: string
                    type: array
                required:
                  - task_id
                  - url
                  - status
                  - data
                  - metadata
                type: object
          description: Successful Response
        '404':
          content:
            application/json:
              schema:
                additionalProperties: {}
                properties:
                  msg:
                    examples:
                      - Template not found
                    type: string
                  status:
                    const: failed
                    type: string
                required:
                  - status
                  - msg
                type: object
          description: Template Not Found
      security:
        - BearerAuth: []
components:
  schemas:
    ExtractionTemplateBody:
      description: Request body for executing an Extraction Template
      properties:
        formats:
          description: Response formats to include. All disabled by default.
          examples:
            - - html
              - markdown
          items:
            enum:
              - html
              - markdown
              - screenshot
              - headers
              - links
            type: string
          minItems: 1
          type: array
        localization:
          default: false
          type: boolean
        params:
          additionalProperties: {}
          properties: {}
          type: object
        template:
          type: string
      required:
        - params
        - template
      type: object
    ParsingSuccessResult:
      additionalProperties: false
      properties:
        entities:
          additionalProperties: {}
          propertyNames:
            type: string
          type: object
        status:
          const: success
          type: string
      required:
        - status
        - entities
      type: object
    ParsingErrorResult:
      additionalProperties: false
      properties:
        error:
          type: string
        status:
          const: error
          type: string
      required:
        - status
        - error
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````