Semantic Search
curl --request POST \
--url https://api.autosnap.com/v2/search \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"query": "<string>",
"dealership_id": 123,
"dealership_url": "<string>",
"condition": "<string>",
"make": "<string>",
"year_min": 123,
"year_max": 123,
"price_min": 123,
"price_max": 123,
"limit": 10,
"score_threshold": 0.3
}
'import requests
url = "https://api.autosnap.com/v2/search"
payload = {
"api_key": "<string>",
"query": "<string>",
"dealership_id": 123,
"dealership_url": "<string>",
"condition": "<string>",
"make": "<string>",
"year_min": 123,
"year_max": 123,
"price_min": 123,
"price_max": 123,
"limit": 10,
"score_threshold": 0.3
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
query: '<string>',
dealership_id: 123,
dealership_url: '<string>',
condition: '<string>',
make: '<string>',
year_min: 123,
year_max: 123,
price_min: 123,
price_max: 123,
limit: 10,
score_threshold: 0.3
})
};
fetch('https://api.autosnap.com/v2/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://api.autosnap.com/v2/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'query' => '<string>',
'dealership_id' => 123,
'dealership_url' => '<string>',
'condition' => '<string>',
'make' => '<string>',
'year_min' => 123,
'year_max' => 123,
'price_min' => 123,
'price_max' => 123,
'limit' => 10,
'score_threshold' => 0.3
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.autosnap.com/v2/search"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"query\": \"<string>\",\n \"dealership_id\": 123,\n \"dealership_url\": \"<string>\",\n \"condition\": \"<string>\",\n \"make\": \"<string>\",\n \"year_min\": 123,\n \"year_max\": 123,\n \"price_min\": 123,\n \"price_max\": 123,\n \"limit\": 10,\n \"score_threshold\": 0.3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.autosnap.com/v2/search")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"query\": \"<string>\",\n \"dealership_id\": 123,\n \"dealership_url\": \"<string>\",\n \"condition\": \"<string>\",\n \"make\": \"<string>\",\n \"year_min\": 123,\n \"year_max\": 123,\n \"price_min\": 123,\n \"price_max\": 123,\n \"limit\": 10,\n \"score_threshold\": 0.3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autosnap.com/v2/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"query\": \"<string>\",\n \"dealership_id\": 123,\n \"dealership_url\": \"<string>\",\n \"condition\": \"<string>\",\n \"make\": \"<string>\",\n \"year_min\": 123,\n \"year_max\": 123,\n \"price_min\": 123,\n \"price_max\": 123,\n \"limit\": 10,\n \"score_threshold\": 0.3\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Semantic Search
Search Vehicles
Semantic vehicle search.
Embeds the query string, searches internal service with optional metadata filters, hydrates full vehicle records from internal service.
POST
/
v2
/
search
Semantic Search
curl --request POST \
--url https://api.autosnap.com/v2/search \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"query": "<string>",
"dealership_id": 123,
"dealership_url": "<string>",
"condition": "<string>",
"make": "<string>",
"year_min": 123,
"year_max": 123,
"price_min": 123,
"price_max": 123,
"limit": 10,
"score_threshold": 0.3
}
'import requests
url = "https://api.autosnap.com/v2/search"
payload = {
"api_key": "<string>",
"query": "<string>",
"dealership_id": 123,
"dealership_url": "<string>",
"condition": "<string>",
"make": "<string>",
"year_min": 123,
"year_max": 123,
"price_min": 123,
"price_max": 123,
"limit": 10,
"score_threshold": 0.3
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
query: '<string>',
dealership_id: 123,
dealership_url: '<string>',
condition: '<string>',
make: '<string>',
year_min: 123,
year_max: 123,
price_min: 123,
price_max: 123,
limit: 10,
score_threshold: 0.3
})
};
fetch('https://api.autosnap.com/v2/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://api.autosnap.com/v2/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'query' => '<string>',
'dealership_id' => 123,
'dealership_url' => '<string>',
'condition' => '<string>',
'make' => '<string>',
'year_min' => 123,
'year_max' => 123,
'price_min' => 123,
'price_max' => 123,
'limit' => 10,
'score_threshold' => 0.3
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.autosnap.com/v2/search"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"query\": \"<string>\",\n \"dealership_id\": 123,\n \"dealership_url\": \"<string>\",\n \"condition\": \"<string>\",\n \"make\": \"<string>\",\n \"year_min\": 123,\n \"year_max\": 123,\n \"price_min\": 123,\n \"price_max\": 123,\n \"limit\": 10,\n \"score_threshold\": 0.3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.autosnap.com/v2/search")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"query\": \"<string>\",\n \"dealership_id\": 123,\n \"dealership_url\": \"<string>\",\n \"condition\": \"<string>\",\n \"make\": \"<string>\",\n \"year_min\": 123,\n \"year_max\": 123,\n \"price_min\": 123,\n \"price_max\": 123,\n \"limit\": 10,\n \"score_threshold\": 0.3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autosnap.com/v2/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"query\": \"<string>\",\n \"dealership_id\": 123,\n \"dealership_url\": \"<string>\",\n \"condition\": \"<string>\",\n \"make\": \"<string>\",\n \"year_min\": 123,\n \"year_max\": 123,\n \"price_min\": 123,\n \"price_max\": 123,\n \"limit\": 10,\n \"score_threshold\": 0.3\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Response
Successful Response
⌘I