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

# Scan the given folder request looking for matches



## OpenAPI

````yaml /api-reference/scanning-openapi.json post /v2/scanning/hfh/scan
openapi: 3.0.0
info:
  title: SCANOSS Scanning Service
  version: '2.0'
  contact:
    name: scanoss-scanning
    url: https://github.com/scanoss/scanning
    email: support@scanoss.com
servers: []
security: []
tags:
  - name: Scanning
paths:
  /v2/scanning/hfh/scan:
    post:
      tags:
        - Scanning
      summary: Scan the given folder request looking for matches
      operationId: Scanning_FolderHashScan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2HFHRequest'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2HFHResponse'
        '404':
          description: Returned when the resource does not exist.
          content:
            application/json:
              schema:
                type: string
                format: string
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    v2HFHRequest:
      type: object
      properties:
        root:
          $ref: '#/components/schemas/HFHRequestChildren'
        rank_threshold:
          type: integer
          format: int32
          description: >-
            Get results with rank below this threshold (e.g i only want to see
            results from rank 5 and below). Lower rank means better quality.
        category:
          type: string
          title: >-
            Filter results by category (e.g i only want to see results from
            github projects, npm, etc)
        query_limit:
          type: integer
          format: int32
          title: Maximum number of results to query
        recursive_threshold:
          type: number
          format: float
          title: Minimum score threshold to consider a match
        min_accepted_score:
          type: number
          format: float
          title: Minimum score threshold to accept a match
      title: High precision Folder Hashing scan request
    v2HFHResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/HFHResponseResult'
          title: List of folders containing unique components
        status:
          $ref: '#/components/schemas/v2StatusResponse'
      title: High precision Folder Hashing scan response
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    HFHRequestChildren:
      type: object
      properties:
        path_id:
          type: string
          title: Folder path (can be actual or obfuscated)
        sim_hash_names:
          type: string
          description: >-
            Proximity hash calculated from this nodes filenames (and their
            children).
        sim_hash_content:
          type: string
          description: >-
            Proximity hash calculated from this nodes file contents (and their
            children).
        children:
          type: array
          items:
            $ref: '#/components/schemas/HFHRequestChildren'
          title: Sub-folders inside this child
        sim_hash_dir_names:
          type: string
          description: >-
            Proximity hash calculated from this nodes directory names (and their
            children).
        lang_extensions:
          type: object
          additionalProperties:
            type: integer
            format: int32
          title: Language extensions count (dictionary) - language name -> count
      title: Child node from the folder structure
    HFHResponseResult:
      type: object
      properties:
        path_id:
          type: string
          title: Folder path (can be actual or obfuscated)
        components:
          type: array
          items:
            $ref: '#/components/schemas/HFHResponseComponent'
          title: List of matching components
      title: Result item, link a path with a list of components
    v2StatusResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/v2StatusCode'
        message:
          type: string
          title: Status message
        db:
          $ref: '#/components/schemas/StatusResponseDB'
        server:
          $ref: '#/components/schemas/StatusResponseServer'
      description: Detailed response details.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    HFHResponseComponent:
      type: object
      properties:
        purl:
          type: string
          title: Component PURL
        name:
          type: string
          title: Component name
        vendor:
          type: string
          title: Component vendor
        versions:
          type: array
          items:
            $ref: '#/components/schemas/HFHResponseVersion'
          title: Component match version (could be multiple)
        rank:
          type: integer
          format: int32
          description: >-
            Component Ranking from 1 to 9. 1 means official well known
            repository, 9 might be garbage.
        order:
          type: integer
          format: int32
          title: >-
            This is the order of the best match to worst match (1 is the best
            match)
      title: Matched component details
    v2StatusCode:
      type: string
      enum:
        - UNSPECIFIED
        - SUCCESS
        - SUCCEEDED_WITH_WARNINGS
        - WARNING
        - FAILED
      default: UNSPECIFIED
      description: Status code Enum.
    StatusResponseDB:
      type: object
      properties:
        schema_version:
          type: string
          title: Semantic schema version (e.g., 'v1.0.0')
        created_at:
          type: string
          title: When this DB was built (ISO 8601 format)
      description: Database version information.
    StatusResponseServer:
      type: object
      properties:
        version:
          type: string
          title: Semantic version (e.g., 'v1.0.0')
      description: Server information.
    HFHResponseVersion:
      type: object
      properties:
        version:
          type: string
          title: Component version
        score:
          type: number
          format: float
          title: Component score (0-1)
        licenses:
          type: array
          items:
            $ref: '#/components/schemas/HFHResponseVersionLicense'
          title: Licenses
      title: Component version details
    HFHResponseVersionLicense:
      type: object
      properties:
        name:
          type: string
          title: Full name of the license
        spdx_id:
          type: string
          title: SPDX license identifier. See https://spdx.org/licenses/
        is_spdx_approved:
          type: boolean
          title: Indicates whether this license is approved by the SPDX organization
        url:
          type: string
          title: URL pointing to the full license text
      title: Component license

````