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

# /korea_customs/trades/search

> Korean export and import totals from the Korea Customs Service, grouped by HS commodity, partner country, customs office, port, continent, economic bloc, transaction type or the Korean nature classification, for a year or month range

**Price:** 20 credits



## OpenAPI

````yaml /openapi/finance-markets.json post /api/korea_customs/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/korea_customs/trades/search:
    post:
      tags:
        - /korea_customs
      summary: /korea_customs/trades/search
      description: >-
        Korean export and import totals from the Korea Customs Service, grouped
        by HS commodity, partner country, customs office, port, continent,
        economic bloc, transaction type or the Korean nature classification, for
        a year or month range


        **Price:** 20 credits
      operationId: __api_korea_customs_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/KoreaCustomsTradesSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KoreaCustomsTrade'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    KoreaCustomsTradesSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        breakdown:
          $ref: '#/components/schemas/KoreaCustomsBreakdown'
          default: item
        period_type:
          $ref: '#/components/schemas/KoreaCustomsPeriodType'
          default: annual
        period_from:
          type: string
          maxLength: 6
          minLength: 4
        period_to:
          anyOf:
            - type: string
              maxLength: 6
              minLength: 4
            - type: 'null'
        statistics_basis:
          $ref: '#/components/schemas/KoreaCustomsStatisticsBasis'
          default: clearance_date
        weight_unit:
          $ref: '#/components/schemas/KoreaCustomsWeightUnit'
          default: ton
        hs_codes:
          anyOf:
            - type: string
            - type: 'null'
        hs_level:
          anyOf:
            - $ref: '#/components/schemas/KoreaCustomsHsLevel'
            - type: 'null'
        countries:
          anyOf:
            - type: string
            - type: 'null'
        continent:
          anyOf:
            - $ref: '#/components/schemas/KoreaCustomsContinent'
            - type: 'null'
        economic_bloc:
          anyOf:
            - $ref: '#/components/schemas/KoreaCustomsEconomicBloc'
            - type: 'null'
        customs_office_code:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        customs_office_level:
          $ref: '#/components/schemas/KoreaCustomsOfficeLevel'
          default: head_office
        port_code:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        flow:
          $ref: '#/components/schemas/KoreaCustomsFlow'
          default: export
        transaction_type_code:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        category_codes:
          anyOf:
            - type: string
            - type: 'null'
        include_category_detail:
          type: boolean
          default: false
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - period_from
        - count
    KoreaCustomsTrade:
      properties:
        '@type':
          type: string
          default: KoreaCustomsTrade
        record_key:
          type: string
        period:
          type: string
        breakdown:
          $ref: '#/components/schemas/KoreaCustomsBreakdown'
        hs_code:
          anyOf:
            - type: string
            - type: 'null'
        hs_name:
          anyOf:
            - type: string
            - type: 'null'
        country_code:
          anyOf:
            - type: string
            - type: 'null'
        country_name:
          anyOf:
            - type: string
            - type: 'null'
        region_group_name:
          anyOf:
            - type: string
            - type: 'null'
        customs_office_code:
          anyOf:
            - type: string
            - type: 'null'
        customs_office_name:
          anyOf:
            - type: string
            - type: 'null'
        customs_branch_code:
          anyOf:
            - type: string
            - type: 'null'
        customs_branch_name:
          anyOf:
            - type: string
            - type: 'null'
        port_name:
          anyOf:
            - type: string
            - type: 'null'
        category_code:
          anyOf:
            - type: string
            - type: 'null'
        category_name:
          anyOf:
            - type: string
            - type: 'null'
        category_level:
          anyOf:
            - type: integer
            - type: 'null'
        flow:
          anyOf:
            - $ref: '#/components/schemas/KoreaCustomsFlow'
            - type: 'null'
        export_weight:
          anyOf:
            - type: number
            - type: 'null'
        export_value_thousand_usd:
          anyOf:
            - type: number
            - type: 'null'
        export_declarations:
          anyOf:
            - type: integer
            - type: 'null'
        import_weight:
          anyOf:
            - type: number
            - type: 'null'
        import_value_thousand_usd:
          anyOf:
            - type: number
            - type: 'null'
        import_declarations:
          anyOf:
            - type: integer
            - type: 'null'
        trade_balance_thousand_usd:
          anyOf:
            - type: number
            - type: 'null'
        weight_unit:
          anyOf:
            - $ref: '#/components/schemas/KoreaCustomsWeightUnit'
            - type: 'null'
      type: object
      required:
        - record_key
        - period
        - breakdown
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    KoreaCustomsBreakdown:
      type: string
      enum:
        - item
        - item_country
        - nature
        - nature_country
        - new_nature
        - new_nature_country
        - country
        - customs_office
        - continent
        - economic_bloc
        - port
        - transaction_type
    KoreaCustomsPeriodType:
      type: string
      enum:
        - annual
        - monthly
    KoreaCustomsStatisticsBasis:
      type: string
      enum:
        - clearance_date
        - departure_date
    KoreaCustomsWeightUnit:
      type: string
      enum:
        - ton
        - kg
    KoreaCustomsHsLevel:
      type: string
      enum:
        - chapter
        - heading
        - subheading
        - tariff_line
    KoreaCustomsContinent:
      type: string
      enum:
        - asia
        - north_america
        - latin_america
        - europe
        - middle_east
        - africa
        - oceania
        - daeyangju
    KoreaCustomsEconomicBloc:
      type: string
      enum:
        - APEC
        - ASEAN
        - ASEM
        - CIS
        - eastern_europe
        - EFTA
        - EU
        - EU28
        - GCC
        - MERCOSUR
        - NAFTA
        - OECD
        - southeast_asia
    KoreaCustomsOfficeLevel:
      type: string
      enum:
        - head_office
        - branch
    KoreaCustomsFlow:
      type: string
      enum:
        - export
        - import
    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

````