Automates a Toyota inventory search using a web browser and exports a single query of inventory data into a structured format.
This project is not affiliated with or endorsed by Toyota.
Toyota has made it virtually impossible to call their GraphQL APIs directly (via WAF with intelligent threat detection), understandably, to prevent unauthorized scraping. But that makes it difficult for motivated buyers to analyze and keep up on inventory for high-demand models, as the website is extremely cumbersome to point-and-click through (especially if you're looking for a specific option) and doesn't provide an option to be noified when new vehicles are added.
This tool is intended for personal use to automate a single query of inventory data and export it into a JSON or CSV format for analysis. It does so via web browser so as not to circumvent Toyota's intended use for their APIs.
- Node.js
npm install
npm run start
npm run start -- --model corolla --zipcode 97204 --distance 100 --csv ./out/inventory.csv --json ./out/inventory.json
Running via container (hidden browser)
- Docker
make build
make run
MODEL=corolla ZIPCODE=97204 DISTANCE=100 CSV=out/inventory.csv JSON=out/inventory.json make run
The app is published as a multi-arch image to Docker hub here.
docker run -it \
-e MODEL=corolla \
-e ZIPCODE=97204 \
-e DISTANCE=100 \
-e CSV=/tmp/yota-search/inventory.csv \
-e JSON=/tmp/yota-search/inventory.json \
-v /tmp/yota-search:/tmp/yota-search \
rtomac/yota-search:latest
This project is licensed under the MIT License. See the LICENSE file for more details.