Skip to main content
POST
/
api
/
cargurus
/
dealers
/
listings
/cargurus/dealers/listings
curl --request POST \
  --url https://api.anysite.io/api/cargurus/dealers/listings \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "dealer": "<string>",
  "count": 2,
  "timeout": 300,
  "sort": "best_match"
}
'
import requests

url = "https://api.anysite.io/api/cargurus/dealers/listings"

payload = {
"dealer": "<string>",
"count": 2,
"timeout": 300,
"sort": "best_match"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({dealer: '<string>', count: 2, timeout: 300, sort: 'best_match'})
};

fetch('https://api.anysite.io/api/cargurus/dealers/listings', 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.anysite.io/api/cargurus/dealers/listings",
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([
'dealer' => '<string>',
'count' => 2,
'timeout' => 300,
'sort' => 'best_match'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);

$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.anysite.io/api/cargurus/dealers/listings"

payload := strings.NewReader("{\n \"dealer\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"sort\": \"best_match\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("access-token", "<api-key>")
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.anysite.io/api/cargurus/dealers/listings")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dealer\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"sort\": \"best_match\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.anysite.io/api/cargurus/dealers/listings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dealer\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"sort\": \"best_match\"\n}"

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "@type": "CargurusListing",
    "url": "<string>",
    "vin": "<string>",
    "make": "<string>",
    "model": "<string>",
    "year": 123,
    "trim": "<string>",
    "body_type": "<string>",
    "price": 123,
    "total_price": 123,
    "imv": 123,
    "deal_rating": "<string>",
    "deal_score": 123,
    "mileage": 123,
    "drivetrain": "<string>",
    "transmission": "<string>",
    "engine": "<string>",
    "doors": 123,
    "exterior_color": "<string>",
    "interior_color": "<string>",
    "fuel_type": "<string>",
    "city_mpg": 123,
    "highway_mpg": 123,
    "combined_mpg": 123,
    "ev_battery": {
      "@type": "CargurusEvBattery",
      "capacity_kwh": 123,
      "range_mi": 123,
      "charge_time_240v_hr": 123
    },
    "is_cpo": false,
    "is_new": false,
    "safety_rating": 123,
    "days_on_market": 123,
    "distance": 123,
    "stock_number": "<string>",
    "price_drop": 123,
    "original_price": 123,
    "image": "<string>",
    "image_count": 123,
    "options": [],
    "seller_id": "<string>",
    "seller_name": "<string>",
    "seller_city": "<string>",
    "seller_state": "<string>"
  }
]
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
dealer
string
required
Minimum string length: 1
count
integer
required
Required range: x >= 1
timeout
integer
default:300
Required range: 20 <= x <= 1500
sort
enum<string>
default:best_match
Available options:
best_match,
best_deal,
price_low,
price_high,
mileage_low,
mileage_high,
distance,
year_new,
year_old,
newest_listed,
oldest_listed

Response

Successful Response

id
string
required
@type
string
default:CargurusListing
url
string | null
vin
string | null
make
string | null
model
string | null
year
integer | null
trim
string | null
body_type
string | null
price
number | null
total_price
number | null
imv
number | null
deal_rating
string | null
deal_score
number | null
mileage
number | null
drivetrain
string | null
transmission
string | null
engine
string | null
doors
integer | null
exterior_color
string | null
interior_color
string | null
fuel_type
string | null
city_mpg
number | null
highway_mpg
number | null
combined_mpg
number | null
ev_battery
object | null
is_cpo
boolean
default:false
is_new
boolean
default:false
safety_rating
integer | null
days_on_market
integer | null
distance
number | null
stock_number
string | null
price_drop
number | null
original_price
number | null
image
string | null
image_count
integer | null
options
string[]
seller_id
string | null
seller_name
string | null
seller_city
string | null
seller_state
string | null