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

# Parse script

> Extracts the values every sensor for a site needs from the site's Akamai script. Send the script body as text. The result stays valid until the site changes its script, so cache it and pass it to `/sensor` as `scriptData`.



## OpenAPI

````yaml api-reference/openapi/akamai-web.yaml POST /parse
openapi: 3.1.1
info:
  title: Roolink Akamai Web API
  summary: >-
    Bypass Akamai Bot Manager on the web — sensor (`_abck`), SBSD, Pixel
    (`ak_bmsc`), SEC-CPT, and script parsing.
  description: >-
    Endpoints for websites behind Akamai Bot Manager. Send your key in
    `X-Api-Key`, JSON in and out. The Akamai Web guides show the order to call
    them in.
  version: 1.0.0
  contact:
    name: Roolink Support
    url: https://roolink.io
    email: support@roolink.io
servers:
  - url: https://web.roolink.io/api/v1
    description: Production
security:
  - apiKey: []
paths:
  /parse:
    post:
      summary: Parse script
      description: >-
        Extracts the values every sensor for a site needs from the site's Akamai
        script. Send the script body as text. The result stays valid until the
        site changes its script, so cache it and pass it to `/sensor` as
        `scriptData`.
      operationId: parseAkamaiScript
      requestBody:
        required: true
        content:
          text/plain:
            schema:
              type: string
              description: >-
                Raw JavaScript source, or its base64 encoding (single-line, no
                `data:` prefix).
              example: var _ac=function(){...};
      responses:
        '200':
          description: Script parsed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseResponse'
              example:
                ver: '1'
                key: 1234567890
                dvc: abc123
                din:
                  - 12
                  - 7
                  - 18
                  - 19
                  - 5
                  - 11
        '400':
          description: Empty body or a script the parser could not read.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Script body too large.
          content:
            text/plain:
              schema:
                type: string
        '429':
          $ref: '#/components/responses/QuotaExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ParseResponse:
      type: object
      required:
        - ver
        - key
        - dvc
        - din
      description: >-
        The values `/sensor` needs from the site's script. Pass the whole object
        as `scriptData`.
      properties:
        ver:
          type: string
          minLength: 1
          description: Script version tag.
          example: '1'
        key:
          type: integer
          format: int64
          description: Script key used in sensor signing.
          example: 1234567890
        dvc:
          type: string
          minLength: 1
          description: Device key derived from the script.
          example: abc123
        din:
          type: array
          minItems: 1
          items:
            type: integer
            minimum: 0
            maximum: 22
          description: Integer array from the script.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
  responses:
    Unauthorized:
      description: Missing or invalid `X-Api-Key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    QuotaExceeded:
      description: The key has no quota or balance left for this product.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: quota exhausted
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
        text/plain:
          schema:
            type: string
          example: internal server error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Customer API key issued from the Roolink dashboard.

````