Autocomplete Search
curl --request GET \
--url https://listings.vin/searchimport requests
url = "https://listings.vin/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://listings.vin/search', 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://listings.vin/search",
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://listings.vin/search"
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://listings.vin/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://listings.vin/search")
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{
"data": [
{
"text": "<b>Audi</b> <b>Q5</b> Prestige",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
},
{
"text": "<b>Audi</b> <b>Q5</b> Premium",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
},
{
"text": "<b>Audi</b> <b>Q5</b> Premium Plus",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
}
]
}
API Reference
Autocomplete Search
GET
/
search
Autocomplete Search
curl --request GET \
--url https://listings.vin/searchimport requests
url = "https://listings.vin/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://listings.vin/search', 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://listings.vin/search",
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://listings.vin/search"
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://listings.vin/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://listings.vin/search")
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{
"data": [
{
"text": "<b>Audi</b> <b>Q5</b> Prestige",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
},
{
"text": "<b>Audi</b> <b>Q5</b> Premium",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
},
{
"text": "<b>Audi</b> <b>Q5</b> Premium Plus",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
}
]
}
string
The string that you wish to autocomplete for. This can be a partial or full string. e.g. “audi”, “for”, “bmw 3”
Response
The response will be an array of search results. Each result will contain the text of the search result and the filter object of the search result.array
required
Array of search results.
string
The text of the search result. Uses
<b></b> to highlight the matching part of the string.
e.g. <b>Audi</b> <b>Q5</b> Prestige{
"data": [
{
"text": "<b>Audi</b> <b>Q5</b> Prestige",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
},
{
"text": "<b>Audi</b> <b>Q5</b> Premium",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
},
{
"text": "<b>Audi</b> <b>Q5</b> Premium Plus",
"filter": {
"year": 2018,
"make": "Audi",
"model": "Q5"
}
}
]
}
⌘I