> ## 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.

# /comtrade/trades/search

> Search UN Comtrade international trade records by reporter, partner, commodity, flow and period

**Price:** 5 credits per 500 results



## OpenAPI

````yaml /openapi/finance-markets.json post /api/comtrade/trades/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/comtrade/trades/search:
    post:
      tags:
        - /comtrade
      summary: /comtrade/trades/search
      description: >-
        Search UN Comtrade international trade records by reporter, partner,
        commodity, flow and period


        **Price:** 5 credits per 500 results
      operationId: __api_comtrade_trades_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComtradeTradesSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ComtradeTrade'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ComtradeTradesSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        type_code:
          $ref: '#/components/schemas/ComtradeTypeCode'
          default: C
        freq_code:
          $ref: '#/components/schemas/ComtradeFreqCode'
          default: A
        classification:
          $ref: '#/components/schemas/ComtradeClassification'
          default: HS
        reporter_code:
          anyOf:
            - type: string
            - type: 'null'
        partner_code:
          anyOf:
            - type: string
            - type: 'null'
        partner2_code:
          anyOf:
            - type: string
            - type: 'null'
        cmd_code:
          anyOf:
            - type: string
            - type: 'null'
        flow_code:
          anyOf:
            - $ref: '#/components/schemas/ComtradeFlowCode'
            - type: 'null'
        customs_code:
          anyOf:
            - type: string
            - type: 'null'
        mot_code:
          anyOf:
            - type: string
            - type: 'null'
        period:
          anyOf:
            - type: string
            - type: 'null'
        count:
          type: integer
          maximum: 500
          minimum: 1
      type: object
      required:
        - count
    ComtradeTrade:
      properties:
        '@type':
          type: string
          default: ComtradeTrade
        type_code:
          type: string
        freq_code:
          type: string
        period:
          type: string
        ref_year:
          anyOf:
            - type: integer
            - type: 'null'
        ref_month:
          anyOf:
            - type: integer
            - type: 'null'
        reporter_code:
          anyOf:
            - type: integer
            - type: 'null'
        reporter_iso:
          anyOf:
            - type: string
            - type: 'null'
        reporter_desc:
          anyOf:
            - type: string
            - type: 'null'
        flow_code:
          anyOf:
            - type: string
            - type: 'null'
        flow_desc:
          anyOf:
            - type: string
            - type: 'null'
        partner_code:
          anyOf:
            - type: integer
            - type: 'null'
        partner_iso:
          anyOf:
            - type: string
            - type: 'null'
        partner_desc:
          anyOf:
            - type: string
            - type: 'null'
        partner2_code:
          anyOf:
            - type: integer
            - type: 'null'
        partner2_iso:
          anyOf:
            - type: string
            - type: 'null'
        partner2_desc:
          anyOf:
            - type: string
            - type: 'null'
        classification_code:
          anyOf:
            - type: string
            - type: 'null'
        classification_search_code:
          anyOf:
            - type: string
            - type: 'null'
        is_original_classification:
          anyOf:
            - type: boolean
            - type: 'null'
        cmd_code:
          anyOf:
            - type: string
            - type: 'null'
        cmd_desc:
          anyOf:
            - type: string
            - type: 'null'
        aggr_level:
          anyOf:
            - type: integer
            - type: 'null'
        is_leaf:
          anyOf:
            - type: boolean
            - type: 'null'
        customs_code:
          anyOf:
            - type: string
            - type: 'null'
        customs_desc:
          anyOf:
            - type: string
            - type: 'null'
        mos_code:
          anyOf:
            - type: string
            - type: 'null'
        mot_code:
          anyOf:
            - type: integer
            - type: 'null'
        mot_desc:
          anyOf:
            - type: string
            - type: 'null'
        qty_unit_code:
          anyOf:
            - type: integer
            - type: 'null'
        qty_unit_abbr:
          anyOf:
            - type: string
            - type: 'null'
        qty:
          anyOf:
            - type: number
            - type: 'null'
        is_qty_estimated:
          anyOf:
            - type: boolean
            - type: 'null'
        alt_qty_unit_code:
          anyOf:
            - type: integer
            - type: 'null'
        alt_qty_unit_abbr:
          anyOf:
            - type: string
            - type: 'null'
        alt_qty:
          anyOf:
            - type: number
            - type: 'null'
        is_alt_qty_estimated:
          anyOf:
            - type: boolean
            - type: 'null'
        net_wgt:
          anyOf:
            - type: number
            - type: 'null'
        is_net_wgt_estimated:
          anyOf:
            - type: boolean
            - type: 'null'
        gross_wgt:
          anyOf:
            - type: number
            - type: 'null'
        is_gross_wgt_estimated:
          anyOf:
            - type: boolean
            - type: 'null'
        cif_value:
          anyOf:
            - type: number
            - type: 'null'
        fob_value:
          anyOf:
            - type: number
            - type: 'null'
        primary_value:
          anyOf:
            - type: number
            - type: 'null'
        legacy_estimation_flag:
          anyOf:
            - type: integer
            - type: 'null'
        is_reported:
          anyOf:
            - type: boolean
            - type: 'null'
        is_aggregate:
          anyOf:
            - type: boolean
            - type: 'null'
      type: object
      required:
        - type_code
        - freq_code
        - period
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    ComtradeTypeCode:
      type: string
      enum:
        - C
        - S
    ComtradeFreqCode:
      type: string
      enum:
        - A
        - M
    ComtradeClassification:
      type: string
      enum:
        - HS
        - H0
        - H1
        - H2
        - H3
        - H4
        - H5
        - H6
        - SITC
        - S1
        - S2
        - S3
        - S4
        - ST
        - BEC
        - B4
        - B5
        - EB
        - EB02
        - EB10
        - EB10S
    ComtradeFlowCode:
      type: string
      enum:
        - M
        - X
        - DX
        - FM
        - MIP
        - MOP
        - RM
        - RX
        - XIP
        - XOP
    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

````