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

# Search published variants: filters, facets, sort, paging

> Every filter the site's own search takes: `vehicle_class` (truck, bus, three_wheeler and the rest), `lifecycle` (`on_sale` or `discontinued`), `launched_since` (a date, for the new-launch tracker), weights, price, power, tyre size, sort and paging. `on_road` figures in a sheet are by state; the ex-showroom figure is national.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/variants
openapi: 3.1.0
info:
  title: Truckaurbus API
  version: v1
  description: >-
    The public v1 API at https://api.truckaurbus.com/v1. Authenticate with an
    API key in the Authorization header: Bearer tab_live_...
servers:
  - url: https://api.truckaurbus.com
security: []
paths:
  /v1/variants:
    get:
      tags:
        - v1
      summary: 'Search published variants: filters, facets, sort, paging'
      description: >-
        Every filter the site's own search takes: `vehicle_class` (truck, bus,
        three_wheeler and the rest), `lifecycle` (`on_sale` or `discontinued`),
        `launched_since` (a date, for the new-launch tracker), weights, price,
        power, tyre size, sort and paging. `on_road` figures in a sheet are by
        state; the ex-showroom figure is national.
      operationId: identity_api_v1_variants
      parameters:
        - in: query
          name: q
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Q
        - in: query
          name: vehicle_class
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Vehicle Class
        - in: query
          name: segment
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Segment
        - in: query
          name: body_type
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Body Type
        - in: query
          name: fuel
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Fuel
        - in: query
          name: axle_config
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Axle Config
        - in: query
          name: manufacturer
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Manufacturer
        - in: query
          name: model
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Model
        - in: query
          name: lifecycle
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Lifecycle
        - in: query
          name: gvw_min
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Gvw Min
        - in: query
          name: gvw_max
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Gvw Max
        - in: query
          name: price_min
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Price Min
        - in: query
          name: price_max
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Price Max
        - in: query
          name: power_min
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Power Min
        - in: query
          name: tyre_size
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tyre Size
        - in: query
          name: launched_since
          required: false
          schema:
            anyOf:
              - format: date
                type: string
              - type: 'null'
            title: Launched Since
        - in: query
          name: limit
          required: false
          schema:
            default: 20
            title: Limit
            type: integer
        - in: query
          name: offset
          required: false
          schema:
            default: 0
            title: Offset
            type: integer
        - in: query
          name: sort
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchOut'
          description: OK
components:
  schemas:
    SearchOut:
      properties:
        engine:
          enum:
            - meilisearch
            - database
          title: Engine
          type: string
        facets:
          additionalProperties:
            additionalProperties:
              type: integer
            type: object
          title: Facets
          type: object
        hits:
          items:
            $ref: '#/components/schemas/VariantSummaryOut'
          title: Hits
          type: array
        limit:
          title: Limit
          type: integer
        offset:
          title: Offset
          type: integer
        processing_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Processing Ms
        query:
          title: Query
          type: string
        sort:
          anyOf:
            - enum:
                - price_asc
                - price_desc
                - gvw_asc
                - gvw_desc
                - power_desc
                - newest
              type: string
            - type: 'null'
          title: Sort
        total:
          title: Total
          type: integer
      required:
        - query
        - hits
        - total
        - offset
        - limit
        - facets
        - engine
      title: SearchOut
      type: object
    VariantSummaryOut:
      properties:
        axle_config:
          anyOf:
            - type: string
            - type: 'null'
          title: Axle Config
        body_types:
          items:
            type: string
          title: Body Types
          type: array
        fuel:
          anyOf:
            - type: string
            - type: 'null'
          title: Fuel
        gvw_kg:
          anyOf:
            - type: integer
            - type: 'null'
          title: Gvw Kg
        image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image
        is_sample:
          default: false
          title: Is Sample
          type: boolean
        lifecycle:
          title: Lifecycle
          type: string
        manufacturer:
          $ref: '#/components/schemas/RefOut'
        model:
          $ref: '#/components/schemas/RefOut'
        name:
          title: Name
          type: string
        payload_kg:
          anyOf:
            - type: integer
            - type: 'null'
          title: Payload Kg
        power_hp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Power Hp
        price_as_of:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Price As Of
        price_from_inr:
          anyOf:
            - type: integer
            - type: 'null'
          title: Price From Inr
        price_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Price Kind
        price_state:
          anyOf:
            - type: string
            - type: 'null'
          title: Price State
        price_to_inr:
          anyOf:
            - type: integer
            - type: 'null'
          title: Price To Inr
        published_at:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Published At
        segment:
          anyOf:
            - type: string
            - type: 'null'
          title: Segment
        slug:
          title: Slug
          type: string
        torque_nm:
          anyOf:
            - type: integer
            - type: 'null'
          title: Torque Nm
        tyre_size:
          anyOf:
            - type: string
            - type: 'null'
          title: Tyre Size
        tyres_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tyres Count
        vehicle_class:
          title: Vehicle Class
          type: string
        verified_at:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Verified At
        battery_ah:
          anyOf:
            - type: integer
            - type: 'null'
          title: Battery Ah
        battery_volts:
          anyOf:
            - type: integer
            - type: 'null'
          title: Battery Volts
        launched_at:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Launched At
      required:
        - slug
        - name
        - manufacturer
        - model
        - vehicle_class
        - body_types
        - lifecycle
      title: VariantSummaryOut
      type: object
    RefOut:
      properties:
        name:
          title: Name
          type: string
        slug:
          title: Slug
          type: string
      required:
        - slug
        - name
      title: RefOut
      type: object

````