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

# /onlinetrade/products/search

> Search the ONLINE TRADE.RU (onlinetrade.ru) catalogue by keyword for a named Russian city and return product cards with the current price in roubles, the pre-discount price where the product is discounted, the ON-bonus amount, whether the product can be bought right now, the customer rating and its vote count, the manufacturer code, the category the product sits in with its category path, the product image and the canonical product URL. Orders by popularity, price, novelty, title or number of reviews.

**Price:** 1 credit

**⚠️ Common errors:** 412: onlinetrade did not serve the search results for this session; a query nothing matches is not an error and comes back as 200 with an empty list, 422: The city is not one onlinetrade prices in, or a payload field is malformed



## OpenAPI

````yaml /openapi/e-commerce-marketplaces.json post /api/onlinetrade/products/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/onlinetrade/products/search:
    post:
      tags:
        - /onlinetrade
      summary: /onlinetrade/products/search
      description: >-
        Search the ONLINE TRADE.RU (onlinetrade.ru) catalogue by keyword for a
        named Russian city and return product cards with the current price in
        roubles, the pre-discount price where the product is discounted, the
        ON-bonus amount, whether the product can be bought right now, the
        customer rating and its vote count, the manufacturer code, the category
        the product sits in with its category path, the product image and the
        canonical product URL. Orders by popularity, price, novelty, title or
        number of reviews.


        **Price:** 1 credit


        **⚠️ Common errors:** 412: onlinetrade did not serve the search results
        for this session; a query nothing matches is not an error and comes back
        as 200 with an empty list, 422: The city is not one onlinetrade prices
        in, or a payload field is malformed
      operationId: __api_onlinetrade_products_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnlinetradeProductsSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OnlinetradeProductCard'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OnlinetradeProductsSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        query:
          type: string
          minLength: 1
        city:
          type: string
          minLength: 1
          default: Москва
        sort:
          $ref: '#/components/schemas/OnlinetradeSort'
          default: views-desc
        count:
          type: integer
          maximum: 570
          minimum: 1
      type: object
      required:
        - query
        - count
    OnlinetradeProductCard:
      properties:
        '@type':
          type: string
          default: OnlinetradeProductCard
        item_id:
          type: string
        model_id:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        images:
          items:
            type: string
          type: array
          default: []
        price:
          anyOf:
            - type: integer
            - type: 'null'
        old_price:
          anyOf:
            - type: integer
            - type: 'null'
        currency:
          type: string
          default: RUB
        discount_percent:
          anyOf:
            - type: integer
            - type: 'null'
        badges:
          items:
            type: string
          type: array
          default: []
        bonus:
          anyOf:
            - type: integer
            - type: 'null'
        in_stock:
          anyOf:
            - type: boolean
            - type: 'null'
        rating:
          anyOf:
            - type: number
            - type: 'null'
        rating_count:
          anyOf:
            - type: integer
            - type: 'null'
        mpn:
          anyOf:
            - type: string
            - type: 'null'
        category_id:
          anyOf:
            - type: integer
            - type: 'null'
        category_path:
          items:
            $ref: '#/components/schemas/OnlinetradeCategoryRef'
          type: array
          default: []
        modifications:
          items:
            $ref: '#/components/schemas/OnlinetradeModification'
          type: array
          default: []
        city:
          anyOf:
            - type: string
            - type: 'null'
        city_id:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - item_id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    OnlinetradeSort:
      type: string
      enum:
        - views-desc
        - price-asc
        - price-desc
        - time-desc
        - title-asc
        - title-desc
        - reviews-desc
        - reviews-asc
    OnlinetradeCategoryRef:
      properties:
        '@type':
          type: string
          default: OnlinetradeCategoryRef
        name:
          type: string
        id:
          anyOf:
            - type: integer
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - name
    OnlinetradeModification:
      properties:
        '@type':
          type: string
          default: OnlinetradeModification
        item_id:
          type: string
        label:
          type: string
        selected:
          type: boolean
          default: false
      type: object
      required:
        - item_id
        - label
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````