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

# CP: Extended Product Search



## OpenAPI

````yaml get /product_search
openapi: 3.0.0
info:
  title: ValueChecker API
  description: The ValueChecker Application Programming Interface.
  version: 0.150.1
  x-logo:
    url: >-
      https://files.valuechecker.net/images/default-category-images/Value-Checker_top_bar_logo.png
    backgroundColor: '#FFFFFF'
    altText: ValueChecker logo
  contact:
    name: Contact
    url: https://www.valuechecker.net/contact/
    email: support@valuechecker.net
servers:
  - url: https://api.valuechecker.net/
    description: ValueChecker API URL.
security:
  - apiKey: []
tags:
  - name: default
externalDocs:
  description: PDF Documentation (official)
  url: https://www.valuechecker.net/docs/api/pdf
paths:
  /product_search:
    get:
      tags:
        - default
      summary: 'CP: Extended Product Search'
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
          example: '{{query}}'
          description: >-
            User-input string. The **user** should enter the name of the product
            being claimed / searched for.
        - name: client_category_id
          in: query
          schema:
            type: string
          example: '{{client_category_id}}'
          description: Optional correlating ID of the category selected by the **user**.
        - name: client_category
          in: query
          schema:
            type: string
          example: '{{client_category}}'
          description: Optional category selected or defined by the **user**.
        - name: force_client_category
          in: query
          schema:
            type: boolean
          example: true
          description: Optional flag to force the use of the requested category.
        - name: claimed_amount
          in: query
          schema:
            type: number
          example: 800
          description: Optional claimed amount for the product.
        - name: price_min
          in: query
          schema:
            type: number
          example: 10
          description: Optional minimum price limit for the search.
        - name: price_max
          in: query
          schema:
            type: number
          example: 1000
          description: Optional maximum price limit for the search.
        - $ref: '#/components/parameters/client_id'
        - $ref: '#/components/parameters/session-id'
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 25 Jul 2023 10:35:35 GMT
            Content-Type:
              schema:
                type: string
                example: application/json
            Content-Length:
              schema:
                type: integer
                example: '16972'
            Connection:
              schema:
                type: string
                example: keep-alive
            x-request-id:
              schema:
                type: string
                example: 5823ed94-af9a-427d-b9e3-08f8bc70702f
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/SearchProduct'
                  metadata:
                    $ref: '#/components/schemas/SearchProductMetadata'
              example:
                results:
                  - pid: 1262830543
                    client_category_id: 4364
                    client_category: Cell Phones
                    product_name: Apple iPhone 14 128GB (2022)
                    pic_url: https://img.valuechecker.net/,---.jpg
                    product_picture_url: https://img.valuechecker.net/,---.jpg
                    specs:
                      - spec_id: 999
                        spec_value: '36'
                        spec_value_display: Apple
                        spec_value_numeric: 3
                        spec_name: Brand
                        spec_name_display: Brand
                      - spec_id: 1580
                        spec_value: '15.494'
                        spec_value_display: 6.1"
                        spec_value_numeric: 15.49
                        spec_name: Foldable Screen
                        spec_name_display: Foldable Screen
                      - spec_id: 8300
                        spec_value: '2022-07-01'
                        spec_value_display: '2022'
                        spec_value_numeric: 1656633600
                        spec_name: Release Year
                        spec_name_display: Release Year
                      - spec_id: 8000
                        spec_value: '128000'
                        spec_value_display: 128 GB
                        spec_value_numeric: 128000
                        spec_name: Storage Capacity
                        spec_name_display: Storage Capacity
                      - spec_id: 5000
                        spec_value: '15.494'
                        spec_value_display: 6.1"
                        spec_value_numeric: 15.49
                        spec_name: Screen Size
                        spec_name_display: Screen Size
                    price:
                      price_min: 850
                      price_max: 850
                      shop_count: 10
                      price_date: '2022-09-11 20:40:16'
                    PriceClusters:
                      low:
                        udc_id: 369929
                        pid: 1941916191
                        group: low
                        price: 147
                        count: 31
                        percentage: 0.76
                        min_price: 19
                        max_price: 364
                      medium:
                        udc_id: 369930
                        pid: 1941916191
                        group: medium
                        price: 158
                        count: 41
                        percentage: 1
                        min_price: 19
                        max_price: 1619
                      high:
                        udc_id: 369931
                        pid: 1941916191
                        group: high
                        price: 1491
                        count: 5
                        percentage: 0.12
                        min_price: 1289
                        max_price: 1619
                    child_products:
                      - Apple iPhone 14 Plus 128GB (PRODUCT)RED
                      - Apple iPhone 14 Plus 128GB (PRODUCT)RED Special Edition
                    child_product_contents: []
                  - pid: 1262830545
                    client_category_id: 4364
                    client_category: Cell Phones
                    product_name: Apple iPhone 14 Plus 128GB (2022)
                    product_picture_url: https://img.valuechecker.net/,---.jpg
                    specs:
                      - spec_id: 999
                        spec_value: '36'
                        spec_value_display: Apple
                        spec_value_numeric: 3
                        spec_name: Brand
                        spec_name_display: Brand
                      - spec_id: 8300
                        spec_value: '2022-07-01'
                        spec_value_display: '2022'
                        spec_value_numeric: 1656633600
                        spec_name: Release Year
                        spec_name_display: Release Year
                      - spec_id: 8000
                        spec_value: '128000'
                        spec_value_display: 128 GB
                        spec_value_numeric: 128000
                        spec_name: Storage Capacity
                        spec_name_display: Storage Capacity
                      - spec_id: 5000
                        spec_value: '17.018'
                        spec_value_display: 6.7"
                        spec_value_numeric: 17.02
                        spec_name: Screen Size
                        spec_name_display: Screen Size
                    price:
                      price_min: 700
                      price_max: 1200
                      shop_count: 134
                      price_date: '2023-07-20 03:41:22'
                    child_products: []
                    child_product_contents: []
                metadata:
                  used_query: iphone 14
                  category:
                    requested_client_category_id: 2740
                    requested_client_category: Mobile Phones
                    predicted_client_category_id: 2740
                    predicted_client_category: Mobile Phones
                    prediction_certainty: 1
                    category_switched: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  description:
                    type: string
              example:
                error: Missing parameter
                description: The "query" parameter is required.
        '401':
          $ref: '#/components/responses/401'
components:
  parameters:
    client_id:
      name: client_id
      in: query
      schema:
        type: integer
      example: '10'
      description: >-
        The client ID for the request. It's required if you have access to
        multiple clients with your API key. Otherwise, it's optional.
    session-id:
      name: session-id
      in: query
      schema:
        type: string
      example: a1b2c3d4e5f6g7h8i9j0
      description: Optional session identifier of the user.
  schemas:
    SearchProduct:
      type: object
      properties:
        product_name:
          type: string
        pic_url:
          type: string
        product_picture_url:
          type: string
        pid:
          type: integer
        cid:
          type: integer
        client_category:
          type: string
        client_category_id:
          type: integer
        specs:
          type: array
          items:
            $ref: '#/components/schemas/Spec'
        price:
          $ref: '#/components/schemas/PriceRange'
        price_clusters:
          $ref: '#/components/schemas/PriceClusters'
        child_products:
          type: array
          items:
            type: string
        child_product_contents:
          type: array
          items:
            $ref: '#/components/schemas/SearchSuggestionProduct'
    SearchProductMetadata:
      type: object
      properties:
        used_query:
          type: string
        category:
          type: object
          properties:
            requested_client_category_id:
              type: integer
            requested_client_category:
              type: string
            predicted_client_category_id:
              type: integer
            predicted_client_category:
              type: string
            predicted_certainty:
              type: number
            category_switched:
              type: boolean
    Spec:
      type: object
      properties:
        spec_id:
          type: integer
        spec_value:
          type: string
        spec_value_display:
          type: string
        spec_value_numeric:
          type: number
        spec_name:
          type: string
        spec_name_display:
          type: string
    PriceRange:
      type: object
      properties:
        price_min:
          type: number
          multipleOf: 0.01
        price_max:
          type: number
          multipleOf: 0.01
        shop_count:
          type: integer
        price_date:
          type: string
    PriceClusters:
      type: object
      properties:
        low:
          $ref: '#/components/schemas/PriceClusterValue'
        medium:
          $ref: '#/components/schemas/PriceClusterValue'
        high:
          $ref: '#/components/schemas/PriceClusterValue'
    SearchSuggestionProduct:
      type: object
      properties:
        product_name:
          type: string
        pic_url:
          type: string
        product_pic_url:
          type: string
        pid:
          type: integer
        cid:
          type: integer
        specs:
          type: array
          items:
            $ref: '#/components/schemas/Spec'
        price:
          $ref: '#/components/schemas/PriceRange'
    PriceClusterValue:
      type: object
      properties:
        udc_id:
          type: integer
        pid:
          type: integer
        group:
          type: string
        price:
          type: number
          multipleOf: 0.01
        count:
          type: integer
        percentage:
          type: number
        min_price:
          type: number
          multipleOf: 0.01
        max_price:
          type: number
          multipleOf: 0.01
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              event_code:
                type: string
              event_dict:
                type: object
                properties:
                  event_severity:
                    type: string
                  title:
                    type: string
                  description:
                    type: string
          example:
            error: Invalid Authorization header
            event_code: ERIT00
            event_dict:
              event_severity: ERROR
              title: Invalid Authorization header
              description: Please provide the right authorization token
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Note! Prefix your <api-key> with `apiKey `. Note the space after "apiKey
        ".

````