Nice If I get a little more time I want to automatically look up the latitude and longitude from the zipcode. This is what the Volvo website does.
I just looked at the requests my browser was making as I used the features on the Volvo website.
It looks like it:
curl 'https://cpo.volvocars.us/soap/kfz/?gw=search_form&mkey=37-11113-5&allow_no_price=0&noAvTs=1&show_extras=all&locale=enus&language=27&xsl=%2Fuserdata%2F11111%2Flayout%2Fxhr%2Fxml2json_searchform.xsl&warrantyProgram=31&radius=100&country=224&lat=40.1702&lon=-76.4168&unitSystem=customary¤cy=USD&model=1323&price_type_switch=price&zip=17545&manufacturer=64&atBottom=dkey%5B41-90536-28709%5DnoRadialSearch&allModels=1&multipleSelect=trim%2CengineDescription' \
-H 'authority: cpo.volvocars.us' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36' \
-H 'accept: */*' \
-H 'sec-fetch-site: same-origin' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
-H 'referer: https://cpo.volvocars.us/enus/used-cars/volvo/s90?country=us&lat=40.1702&lon=-76.4168&customer=&unitSystem=customary¤cy=USD&allow_no_price=0&sort=distance%3AASC%7C%7Cprice%3AASC&model=1323&price_type_switch=price&price_from=&price_to=&km_from=&km_to=&modelYear_from=&modelYear_to=&gas=&color=&zip=17545&radius=100&manufacturer=64&atBottom=dkey%5B41-90536-28709%5DnoRadialSearch&warrantyProgram=31' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'cookie: _ga=GA1.2.131352541.1606741237; _gid=GA1.2.1759298771.1606741237; _ga=GA1.3.131352541.1606741237; _gid=GA1.3.1759298771.1606741237; _pk_ref.4.09fe=%5B%22%22%2C%22%22%2C1606741238%2C%22https%3A%2F%2Fwww.google.com%2F%22%5D; _pk_ses.4.09fe=1; _pk_ref.5.09fe=%5B%22%22%2C%22%22%2C1606741238%2C%22https%3A%2F%2Fwww.google.com%2F%22%5D; _pk_ses.5.09fe=1; _gcl_au=1.1.2035105197.1606741240; OptanonAlertBoxClosed=2020-11-30T13:00:39.849Z; _gat_UA-76007021-2=1; _gat_UA-76007021-1=1; _pk_id.4.09fe=1d40c7c6478983be.1606741238.1.1606741348.1606741238.; _pk_id.5.09fe=01c776dbb5c4cca9.1606741238.1.1606741348.1606741238.; OptanonConsent=isIABGlobal=false&datestamp=Mon+Nov+30+2020+08%3A02%3A29+GMT-0500+(Eastern+Standard+Time)&version=6.7.0&landingPath=NotLandingPage&groups=1%3A1%2C2%3A1%2C3%3A1%2C4%3A1%2C0_223898%3A1%2C9%3A1&AwaitingReconsent=false; mdx_cookie_zip=17545; mdx_landing_version_ucl=1' \
--compressed
returns
{"mdx_form":{"found":{"#":"16"},"manufacturer":{"option":[{"#":"Volvo","@value":"64","@found":"16","@selected":"yes"}]},"model":{"option":[{"#":"S60","@value":"1320","@found":"48","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"S60 Cross Country","@value":"2183","@found":"2","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"S80","@value":"1322","@found":"1","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"S90","@value":"1323","@found":"16","@selected":"yes","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"V60","@value":"1540","@found":"2","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"V60 Cross Country","@value":"2182","@found":"5","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"V90 Cross Country","@value":"2544","@found":"3","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"XC40","@value":"2761","@found":"15","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"XC60","@value":"1477","@found":"66","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"XC70","@value":"1328","@found":"1","@manufacturer":"64","@level":"M","@parent":"0"},{"#":"XC90","@value":"2198","@found":"56","@manufacturer":"64","@level":"M","@parent":"0"}]},"dealerModkey":{"option":[{"#":"Stillman Volvo Cars","@value":"37-11316-4214","@found":"1"},{"#":"Stadel Motors, Inc.","@value":"37-11331-4501","@found":"3"},{"#":"Koons Volvo Cars White Marsh","@value":"37-11334-4566","@found":"2"},{"#":"Lehman Motors","@value":"37-11335-4583","@found":"5"},{"#":"Performance Volvo Cars","@value":"37-11336-4595","@found":"2"},{"#":"Lehman Volvo Cars","@value":"37-11338-4636","@found":"3"}]},"build":{"option":[{"#":"Sedan","@value":"6","@found":"16","@ctype":"1"}]},"color":{"option":[{"#":"Blue","@value":"3","@found":"1"},{"#":"Gray","@value":"7","@found":"2"},{"#":"Black","@value":"11","@found":"5"},{"#":"Silver","@value":"12","@found":"2"},{"#":"White","@value":"14","@found":"6"}]},"gas":{"option":[{"#":"Gasoline","@value":"1||7","@found":"16"}]},"gears":{"option":[{"#":"Automatic","@value":"1||7","@found":"14"},{"#":"Not specified","@value":"6","@found":"2"}]},"selltype":{"option":[{"#":"Pre Owned Vehicle","@value":"2","@found":"16"}]},"doors":{"option":[{"#":"4","@value":"4","@found":"16"}]},"radio":{"option":[{"#":"Radio DAB","@value":"8","@found":"16"}]},"ctype":{"option":[{"#":"Passenger car","@value":"1","@found":"16"}]},"rims":{"option":[{"#":"standard","@value":"1","@found":"1"},{"#":"aluminium","@value":"2","@found":"15"}]},"drive":{"option":[{"#":"AWD/4WD","@value":"3","@found":"14"}]},"km_from":{"option":[{"#":"10,000 mi","@value":"10000","@found":""},{"#":"11,000 mi","@value":"11000","@found":""},{"#":"12,000 mi","@value":"12000","@found":""},{"#":"13,000 mi","@value":"13000","@found":""},{"#":"14,000 mi","@value":"14000","@found":""},{"#":"15,000 mi","@value":"15000","@found":""},{"#":"16,000 mi","@value":"16000","@found":""},{"#":"17,000 mi","@value":"17000","@found":""},{"#":"18,000 mi","@value":"18000","@found":""},{"#":"19,000 mi","@value":"19000","@found":""},{"#":"20,000 mi","@value":"20000","@found":""},{"#":"25,000 mi","@value":"25000","@found":""},{"#":"30,000 mi","@value":"30000","@found":""},{"#":"40,000 mi","@value":"40000","@found":""}]},"km_to":{"option":[{"#":"11,000 mi","@value":"11000","@found":""},{"#":"12,000 mi","@value":"12000","@found":""},{"#":"13,000 mi","@value":"13000","@found":""},{"#":"14,000 mi","@value":"14000","@found":""},{"#":"15,000 mi","@value":"15000","@found":""},{"#":"16,000 mi","@value":"16000","@found":""},{"#":"17,000 mi","@value":"17000","@found":""},{"#":"18,000 mi","@value":"18000","@found":""},{"#":"19,000 mi","@value":"19000","@found":""},{"#":"20,000 mi","@value":"20000","@found":""},{"#":"21,000 mi","@value":"21000","@found":""},{"#":"26,000 mi","@value":"26000","@found":""},{"#":"31,000 mi","@value":"31000","@found":""},{"#":"41,000 mi","@value":"41000","@found":""},{"#":"49,000 mi","@value":"49000","@found":""}]},"price_from":{"option":[{"#":"$26,000","@value":"26000","@found":""},{"#":"$27,000","@value":"27000","@found":""},{"#":"$28,000","@value":"28000","@found":""},{"#":"$29,000","@value":"29000","@found":""},{"#":"$30,000","@value":"30000","@found":""},{"#":"$31,000","@value":"31000","@found":""},{"#":"$32,000","@value":"32000","@found":""},{"#":"$33,000","@value":"33000","@found":""},{"#":"$34,000","@value":"34000","@found":""},{"#":"$35,000","@value":"35000","@found":""},{"#":"$36,000","@value":"36000","@found":""},{"#":"$41,000","@value":"41000","@found":""},{"#":"$46,000","@value":"46000","@found":""}]},"price_to":{"option":[{"#":"$27,000","@value":"27000","@found":""},{"#":"$28,000","@value":"28000","@found":""},{"#":"$29,000","@value":"29000","@found":""},{"#":"$30,000","@value":"30000","@found":""},{"#":"$31,000","@value":"31000","@found":""},{"#":"$32,000","@value":"32000","@found":""},{"#":"$33,000","@value":"33000","@found":""},{"#":"$34,000","@value":"34000","@found":""},{"#":"$35,000","@value":"35000","@found":""},{"#":"$36,000","@value":"36000","@found":""},{"#":"$37,000","@value":"37000","@found":""},{"#":"$42,000","@value":"42000","@found":""},{"#":"$47,000","@value":"47000","@found":""},{"#":"$54,000","@value":"54000","@found":""}]},"engineDescription":{"option":[{"#":"4-Cylinder, Direct-Injected Turbo Charged/Super Charged Engi","@value":"4-Cylinder, Direct-Injected Turbo Charged/Super Charged Engi","@found":"6"},{"#":"T5","@value":"T5","@found":"3"},{"#":"T6","@value":"T6","@found":"5"},{"#":"T8","@value":"T8","@found":"2"}]},"currency":{"option":[{"#":"USD","@value":"USD","@found":"16","@selected":"yes"}]},"warrantyProgram":{"option":[{"#":"31","@value":"31","@found":"16","@selected":"yes"}]},"dealerCountry":{"option":[{"#":"United States","@value":"224","@found":"16"}]},"airbags":{"option":[{"#":"4 - side airbag","@value":"4","@found":"6"},{"#":"6 - head airbags","@value":"5","@found":"5"}]},"modelYear_from":{"option":[{"#":"2017","@value":"2017","@found":""},{"#":"2018","@value":"2018","@found":""},{"#":"2019","@value":"2019","@found":""}]},"modelYear_to":{"option":[{"#":"2017","@value":"2017","@found":""},{"#":"2018","@value":"2018","@found":""},{"#":"2019","@value":"2019","@found":""}]},"cylinders":{"option":[{"#":"4","@value":"4","@found":"8"}]},"unitSystem":{"option":[{"#":"US customary","@value":"customary","@found":"16","@selected":"yes"}]},"soundSystem":{"option":[{"#":"Harman Kardon","@value":"5","@found":"2"}]},"smartphoneIntegration":{"option":[{"#":"Apple Car Play","@value":"3","@found":"4"},{"#":"Android Auto & Apple Car Play","@value":"4","@found":"1"}]},"reverseCamera":{"option":[{"#":"Reversing camera","@value":"1","@found":"14"},{"#":"360 Camera","@value":"2","@found":"2"}]},"carFax":{"option":[{"#":"CarFax","@value":"2","@found":"7"},{"#":"CarFax 1 Owner","@value":"3","@found":"9"}]},"cylinderCapacity_from":{"option":[{"#":"2,000 cm³","@value":"2000","@found":""}]},"cylinderCapacity_to":{"option":[{"#":"2,000 cm³","@value":"2000","@found":""}]},"trim":{"option":[{"#":"Inscription","@value":"Inscription","@found":"8"},{"#":"Momentum","@value":"Momentum","@found":"8"}]},"cylinderCapacityLiters":{"option":[{"#":"2.0","@value":"2.0","@found":"16"}]},"headlights":{"option":[{"#":"Full LED headlights","@value":"4","@found":"13"}]},"extras":{"extra":[{"#":"Crashed vehicle","@value":"1","@found":"0","@id":"accident","@disabled":"yes"},{"#":"repaired accident vehicle","@value":"1","@found":"0","@id":"accidentRepaired","@disabled":"yes"},{"#":"automatic","@value":"1","@found":"14","@id":"automatic"},{"#":"Approved service history","@value":"1","@found":"0","@id":"hasHistory","@disabled":"yes"},{"#":"Special offer","@value":"1","@found":"0","@id":"hasOffer","@disabled":"yes"},{"#":"with image","@value":"1","@found":"16","@id":"has_pic"},{"#":"Hybrid","@value":"1","@found":"2","@id":"hybrid"},{"#":"metallic","@value":"1","@found":"16","@id":"metallic"},{"#":"all ads","@value":"1","@found":"0","@id":"private_ad","@disabled":"yes"},{"#":"7 seats","@value":"1","@found":"0","@id":"seven_seats","@disabled":"yes"},{"#":"Side airbags","@value":"1","@found":"11","@id":"sideairbags"},{"#":"VAT recl.","@value":"1","@found":"0","@id":"vat","@disabled":"yes"},{"#":"Air condition","@value":"1","@found":"16","@id":"aircondition"},{"#":"ABS","@value":"1","@found":"7","@id":"abs"},{"#":"All-wheel","@value":"1","@found":"6","@id":"allwheel"},{"#":"Handicapped accessible","@value":"1","@found":"0","@id":"handicappedAccessible","@disabled":"yes"},{"#":"Daily offer","@value":"1","@found":"0","@id":"dailyOffer","@disabled":"yes"},{"#":"Electric windows","@value":"1","@found":"7","@id":"windowlifter"},{"#":"Navigation system","@value":"1","@found":"16","@id":"navi"},{"#":"Electric seats","@value":"1","@found":"16","@id":"electricSeats"},{"#":"Sliding sunroof","@value":"1","@found":"15","@id":"sunroof"},{"#":"Seat heating","@value":"1","@found":"13","@id":"seat_heater"},{"#":"Xenon headlamps","@value":"1","@found":"0","@id":"xenon","@disabled":"yes"},{"#":"Central locking","@value":"1","@found":"12","@id":"central_locking"},{"#":"Alarm device","@value":"1","@found":"16","@id":"alarm"},{"#":"Traction control","@value":"1","@found":"7","@id":"traction_control"},{"#":"Tuning","@value":"1","@found":"0","@id":"tuning","@disabled":"yes"},{"#":"On-board computer","@value":"1","@found":"7","@id":"boardcomputer"},{"#":"Park Distance Control","@value":"1","@found":"16","@id":"parkDistanceControl"},{"#":"Fog lamp","@value":"1","@found":"16","@id":"frontFogLamps"},{"#":"Servo steering","@value":"1","@found":"16","@id":"servo"},{"#":"Auxiliary heating","@value":"1","@found":"0","@id":"aux_heating","@disabled":"yes"},{"#":"Cruise control","@value":"1","@found":"16","@id":"speed_control"},{"#":"Service check book","@value":"1","@found":"0","@id":"service_book","@disabled":"yes"},{"#":"Certified Pre-owned","@value":"1","@found":"16","@id":"warranty"},{"#":"TB (tow bar)","@value":"1","@found":"6","@id":"coupling"},{"#":"suspension control","@value":"1","@found":"0","@id":"adaptiveSuspension","@disabled":"yes"},{"#":"Centre arm rest","@value":"1","@found":"10","@id":"armRest"},{"#":"Leather","@value":"1","@found":"16","@id":"leather"},{"#":"sport seat","@value":"1","@found":"0","@id":"sportSeats","@disabled":"yes"},{"#":"Tachometer","@value":"1","@found":"2","@id":"tachometer"},{"#":"Multifunctional steering wheel","@value":"1","@found":"10","@id":"multifunctionSteeringWheel"},{"#":"Top offer","@value":"1","@found":"0","@id":"top_offer","@disabled":"yes"},{"#":"Smoke filter","@value":"1","@found":"0","@id":"particle_filter","@disabled":"yes"},{"#":"Third seat row","@value":"1","@found":"0","@id":"thirdSeatRow","@disabled":"yes"},{"#":"Company car","@value":"1","@found":"0","@id":"companyCar","@disabled":"yes"},{"#":"Certified Pre-owned","@value":"1","@found":"16","@id":"approved_used_vehicle"},{"#":"ISOFIX Child seat fastener","@value":"1","@found":"6","@id":"isofix"},{"#":"Eight-wheeled","@value":"1","@found":"0","@id":"eightWheeled","@disabled":"yes"},{"#":"DVD player","@value":"1","@found":"0","@id":"dvdPlayer","@disabled":"yes"},{"#":"Sport packet","@value":"1","@found":"0","@id":"sportPack","@disabled":"yes"},{"#":"Tinted windows","@value":"1","@found":"0","@id":"tintedGlass","@disabled":"yes"},{"#":"Electronic tailgate","@value":"1","@found":"0","@id":"electronicTailgate","@disabled":"yes"},{"#":"Keyless Start/Go","@value":"1","@found":"15","@id":"keylessStart"},{"#":"Hands-free equipment","@value":"1","@found":"0","@id":"handsFreeEquipment","@disabled":"yes"},{"#":"Electronically retractable wing mirror","@value":"1","@found":"0","@id":"electricFoldingMirrors","@disabled":"yes"},{"#":"Car Pass","@value":"1","@found":"0","@id":"carPass","@disabled":"yes"},{"#":"Auction vehicle","@value":"1","@found":"0","@id":"bidVehicle","@disabled":"yes"},{"#":"Head Up Display","@value":"1","@found":"1","@id":"headUpDisplay"},{"#":"Corner-illuminating lights","@value":"1","@found":"0","@id":"adaptiveHeadlights","@disabled":"yes"},{"#":"Panoramic roof","@value":"1","@found":"0","@id":"panoramicRoof","@disabled":"yes"},{"#":"Leasable","@value":"1","@found":"0","@id":"leasable","@disabled":"yes"},{"#":"Bluetooth","@value":"1","@found":"16","@id":"bluetooth"},{"#":"Parkassistance front","@value":"1","@found":"0","@id":"pdcFront","@disabled":"yes"},{"#":"Board briefcase","@value":"1","@found":"0","@id":"briefcase","@disabled":"yes"},{"#":"Entitled to deduct VAT","@value":"1","@found":"0","@id":"vatDeduct","@disabled":"yes"},{"#":"Licence-free","@value":"1","@found":"0","@id":"licenceFree","@disabled":"yes"},{"#":"Rear seat entertainment","@value":"1","@found":"0","@id":"rearSeatEntertainment","@disabled":"yes"},{"#":"Can be financed","@value":"1","@found":"0","@id":"financable","@disabled":"yes"},{"#":"PCS (Pre Collision System)","@value":"1","@found":"0","@id":"preCollisionSystem","@disabled":"yes"},{"#":"Online reservation","@value":"1","@found":"0","@id":"onlineReservation","@disabled":"yes"},{"#":"Plugin hybrid","@value":"1","@found":"1","@id":"plugIn"},{"#":"Lumbar support","@value":"1","@found":"0","@id":"lumbarSupport","@disabled":"yes"},{"#":"BlueMotion technologies","@value":"1","@found":"0","@id":"blueMotion","@disabled":"yes"},{"#":"Through loading system","@value":"1","@found":"0","@id":"throughLoadingSystem","@disabled":"yes"},{"#":"Convenience pack","@value":"1","@found":"0","@id":"conveniencePack","@disabled":"yes"},{"#":"iPod preparation","@value":"1","@found":"5","@id":"iPodPreparation"},{"#":"Efficient Dynamics","@value":"1","@found":"0","@id":"efficientDynamics","@disabled":"yes"},{"#":"Adaptive cruise control","@value":"1","@found":"16","@id":"adaptiveCruiseControl"},{"#":"Active brake assist","@value":"1","@found":"6","@id":"activeBrakeAssist"},{"#":"Emergency call system","@value":"1","@found":"10","@id":"emergencyCallSystem"},{"#":"Lane changing assistant","@value":"1","@found":"11","@id":"laneChangingAssistant"},{"#":"Electronic Air Suspension","@value":"1","@found":"0","@id":"electronicAirSuspension","@disabled":"yes"},{"#":"Blind spot monitor","@value":"1","@found":"0","@id":"blindSpotMonitor","@disabled":"yes"}]},"zip":{"#":"17545"},"radius":{"#":"100"}}}
In a nutshell, this is all I am doing:
- Go to Volvo page but don’t do the search yet and don’t put in zipcode
- Open Developer Tools in chrome
- Go to the network tab
- Do the search
- Show only XHR requests
- Look for responses that contain JSON
When you find one, you can then right click on it, go to copy, and copy the request as a curl command (or something else).