How to get new inventory vehicles (non CPO)
Opened this issue · 1 comments
I noticed that when I replace 'used' with 'new' the API only returns 100 results... anyway around this?
Looks like a serverside limit. This didn't use to be an issue since the inventory was smaller but now it looks like 100 is a pretty severe cap. I tried a variety of the usual query params for response size (limit, offset, etc) and they have no effect so I doubt pagination has been implemented for this API.
For lack of a better solution, I would split the request into filters that return <100 results by iterating over price ranges.
E.g. firing https://www.tesla.com/cpo_tool/ajax?exteriors=all&model=&priceRange=0%2C90000&city=San%20Mateo&state=CA&country=US&sort=featured%7Casc&titleStatus=new&zip= and iterating over 10k price ranges til 200k