specrom

specrom / Scraping_Car_Sale_Listings / 0.2.0

Scraping_Car_Sale_Listings

50 Credit Royalty
Scrape used and new car listings from cars.com
Language
Python 3.x
Metrics
API Calls - 12 Avg call duration - 6.08sec
Permissions
The Algorithm Platform License is the set of terms that are stated in the Software License section of the Algorithmia Application Developer and API License Agreement. It is intended to allow users to reserve as many rights as possible without limiting Algorithmia's ability to run it as a service. Learn More
This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.
This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks , however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls .

Run an Example

Input
Output
[
  {
    "bodystyle": "Coupe",
    "brand": "Mercedes-Benz",
    "condition": "Used",
    "listingId": 817895412,
    "miles": "94,550 mi.",
    "modelName": "",
    "modelTrim": "E 350 4MATIC",
    "modelYear": 2013,
    "price": 13999,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/817895412/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Crew Cab Pickup",
    "brand": "RAM",
    "condition": "Used",
    "listingId": 818276242,
    "miles": "14,083 mi.",
    "modelName": "1500 Classic",
    "modelTrim": "SLT",
    "modelYear": 2019,
    "price": 32950,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818276242/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Minivan",
    "brand": "Dodge",
    "condition": "Used",
    "listingId": 818288219,
    "miles": "35,369 mi.",
    "modelName": "Grand Caravan",
    "modelTrim": "GT",
    "modelYear": 2018,
    "price": 13599,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818288219/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "SUV",
    "brand": "Ford",
    "condition": "Used",
    "listingId": 818383963,
    "miles": "69,728 mi.",
    "modelName": "Explorer",
    "modelTrim": "XLT",
    "modelYear": 2011,
    "price": 13980,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818383963/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Sedan",
    "brand": "Volvo",
    "condition": "Used",
    "listingId": 814973338,
    "miles": "68,837 mi.",
    "modelName": "S60",
    "modelTrim": "T5",
    "modelYear": 2012,
    "price": 6599,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/814973338/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Sedan",
    "brand": "Nissan",
    "condition": "Used",
    "listingId": 814637300,
    "miles": "21,801 mi.",
    "modelName": "Altima",
    "modelTrim": "2.5 SL",
    "modelYear": 2019,
    "price": 15999,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/814637300/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Coupe",
    "brand": "Hyundai",
    "condition": "Used",
    "listingId": 818127593,
    "miles": "41,397 mi.",
    "modelName": "Genesis Coupe",
    "modelTrim": "3.8 R-Spec",
    "modelYear": 2013,
    "price": 9995,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818127593/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Sedan",
    "brand": "Honda",
    "condition": "Used",
    "listingId": 818679083,
    "miles": "58,455 mi.",
    "modelName": "Accord",
    "modelTrim": "Sport",
    "modelYear": 2014,
    "price": 9995,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818679083/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Hatchback",
    "brand": "Dodge",
    "condition": "Used",
    "listingId": 818481958,
    "miles": "114,893 mi.",
    "modelName": "Caliber",
    "modelTrim": "SXT",
    "modelYear": 2007,
    "price": 3495,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818481958/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Coupe",
    "brand": "Nissan",
    "condition": "Used",
    "listingId": 818187741,
    "miles": "26,987 mi.",
    "modelName": "GT-R",
    "modelTrim": "Premium",
    "modelYear": 2014,
    "price": 62995,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818187741/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "SUV",
    "brand": "Dodge",
    "condition": "Used",
    "listingId": 817962908,
    "miles": "64,826 mi.",
    "modelName": "Journey",
    "modelTrim": "Crew",
    "modelYear": 2011,
    "price": 7999,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/817962908/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "SUV",
    "brand": "Toyota",
    "condition": "Used",
    "listingId": 818344555,
    "miles": "48,782 mi.",
    "modelName": "RAV4",
    "modelTrim": "Limited",
    "modelYear": 2017,
    "price": 17834,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818344555/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Convertible",
    "brand": "Ferrari",
    "condition": "Used",
    "listingId": 818799204,
    "miles": "11,940 mi.",
    "modelName": "California",
    "modelTrim": "",
    "modelYear": 2017,
    "price": 149900,
    "state": "CT",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818799204/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Coupe",
    "brand": "Ferrari",
    "condition": "Used",
    "listingId": 818458001,
    "miles": "6,044 mi.",
    "modelName": "F430",
    "modelTrim": "",
    "modelYear": 2009,
    "price": 329900,
    "state": "CT",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818458001/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "SUV",
    "brand": "Ford",
    "condition": "New",
    "listingId": 793730435,
    "miles": "NA",
    "modelName": "EcoSport",
    "modelTrim": "Titanium",
    "modelYear": 2019,
    "price": 18989,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/793730435/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "SUV",
    "brand": "Buick",
    "condition": "New",
    "listingId": 778050657,
    "miles": "NA",
    "modelName": "Encore",
    "modelTrim": "Preferred",
    "modelYear": 2019,
    "price": 22739,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/778050657/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Convertible",
    "brand": "MINI",
    "condition": "Used",
    "listingId": 815550329,
    "miles": "9,805 mi.",
    "modelName": "Convertible",
    "modelTrim": "Cooper S",
    "modelYear": 2019,
    "price": 32383,
    "state": "NY",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/815550329/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Sedan",
    "brand": "Jaguar",
    "condition": "Used",
    "listingId": 818620670,
    "miles": "59,485 mi.",
    "modelName": "XJ8",
    "modelTrim": "Vanden Plas",
    "modelYear": 1999,
    "price": 9995,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818620670/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "Coupe",
    "brand": "Ford",
    "condition": "Used",
    "listingId": 818114508,
    "miles": "46,106 mi.",
    "modelName": "Mustang",
    "modelTrim": "V6 Premium",
    "modelYear": 2012,
    "price": 13999,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818114508/overview/",
    "zipcode": "10004"
  },
  {
    "bodystyle": "SUV",
    "brand": "Subaru",
    "condition": "Used",
    "listingId": 818112421,
    "miles": "45,267 mi.",
    "modelName": "Crosstrek",
    "modelTrim": "2.0i Limited",
    "modelYear": 2017,
    "price": 18977,
    "state": "NJ",
    "total_results": "128,652",
    "url": "https://www.cars.com/vehicledetail/detail/818112421/overview/",
    "zipcode": "10004"
  }
]

Install and Use

Install

Install the Algorithmia CLI client by running:

curl -sSLf https://algorithmia.com/install.sh | sh

Then authenticate by running:

$ algo auth
# When prompted for api endpoint, hit enter
# When prompted for API key, enter your key: YOUR_API_KEY
CLI Install Docs

Use



    algo run specrom/Scraping_Car_Sale_Listings/0.2.0 -d '{"location":"10004", "page":"1"}' --timeout 300
  
CLI Docs