Search published variants: filters, facets, sort, paging
curl --request GET \
--url https://api.truckaurbus.com/v1/variantsimport requests
url = "https://api.truckaurbus.com/v1/variants"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.truckaurbus.com/v1/variants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.truckaurbus.com/v1/variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truckaurbus.com/v1/variants"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.truckaurbus.com/v1/variants")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truckaurbus.com/v1/variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"engine": "meilisearch",
"facets": {},
"hits": [
{
"body_types": [
"<string>"
],
"lifecycle": "<string>",
"manufacturer": {
"name": "<string>",
"slug": "<string>"
},
"model": {
"name": "<string>",
"slug": "<string>"
},
"name": "<string>",
"slug": "<string>",
"vehicle_class": "<string>",
"axle_config": "<string>",
"fuel": "<string>",
"gvw_kg": 123,
"image": "<string>",
"is_sample": false,
"payload_kg": 123,
"power_hp": 123,
"price_as_of": "2023-12-25",
"price_from_inr": 123,
"price_kind": "<string>",
"price_state": "<string>",
"price_to_inr": 123,
"published_at": "2023-12-25",
"segment": "<string>",
"torque_nm": 123,
"tyre_size": "<string>",
"tyres_count": 123,
"verified_at": "2023-12-25",
"battery_ah": 123,
"battery_volts": 123,
"launched_at": "2023-12-25"
}
],
"limit": 123,
"offset": 123,
"query": "<string>",
"total": 123,
"processing_ms": 123,
"sort": "price_asc"
}v1
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.
GET
/
v1
/
variants
Search published variants: filters, facets, sort, paging
curl --request GET \
--url https://api.truckaurbus.com/v1/variantsimport requests
url = "https://api.truckaurbus.com/v1/variants"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.truckaurbus.com/v1/variants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.truckaurbus.com/v1/variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truckaurbus.com/v1/variants"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.truckaurbus.com/v1/variants")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truckaurbus.com/v1/variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"engine": "meilisearch",
"facets": {},
"hits": [
{
"body_types": [
"<string>"
],
"lifecycle": "<string>",
"manufacturer": {
"name": "<string>",
"slug": "<string>"
},
"model": {
"name": "<string>",
"slug": "<string>"
},
"name": "<string>",
"slug": "<string>",
"vehicle_class": "<string>",
"axle_config": "<string>",
"fuel": "<string>",
"gvw_kg": 123,
"image": "<string>",
"is_sample": false,
"payload_kg": 123,
"power_hp": 123,
"price_as_of": "2023-12-25",
"price_from_inr": 123,
"price_kind": "<string>",
"price_state": "<string>",
"price_to_inr": 123,
"published_at": "2023-12-25",
"segment": "<string>",
"torque_nm": 123,
"tyre_size": "<string>",
"tyres_count": 123,
"verified_at": "2023-12-25",
"battery_ah": 123,
"battery_volts": 123,
"launched_at": "2023-12-25"
}
],
"limit": 123,
"offset": 123,
"query": "<string>",
"total": 123,
"processing_ms": 123,
"sort": "price_asc"
}Query Parameters
Response
200 - application/json
OK
Available options:
meilisearch, database Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
price_asc, price_desc, gvw_asc, gvw_desc, power_desc, newest 
