Waymo doesn't have an API where you can get ride prices after entering pickup/dropoff points. This is an unofficial python api for Waymo that can be run locally to get realtime waymo ride prices.
This project was used to create a dataset of Waymo ride estimates
Single trip
uv run examples/demo/main.py --trip "Fort Mason" "Salesforce Tower"
Multiple trips
uv run examples/demo/main.py --trips examples/demo/trips.json
Getting the server and emulator setup is a little tedious. For now this setup works with MacOS/Linux.
Before you get started, you'll need the following installed on your machine:
- Android Studio
- uv (Python package manager)
- Python 3.12
- npm (for appium)
-
Install Android Studio on your device
-
Create a virtual android device
Projects > More Actions > Virtual Device Manager > Select a device
-
On the virtual device, install the the Waymo One application.
-
After the Waymo One application is installed, log into the application with your username and password.
For future uses, you can spin up the virtual device with the Waymo app through the terminal
You will need this for changing the device location
- For MacOS
brew install android-platform-tools
- For Linux (Ubuntu)
sudo apt install adb
-
Clone the repository
git clone git@github.com:puravparab/waymo-api.git
-
Change directory
cd waymo-api
-
Install uv if you don't have it
-
Install python dependencies
uv sync
Before you can use the API, you have to do three things
- Spin up the Android virtual device
- Start the appium server
- Change location to desired Waymo service area (eg. San Francisco)
Make sure you have succesfully set up the virtual device and Waymo one application before proceeding
-
Create a new terminal instance and enter the following:
export ANDROID_HOME=$HOME/Library/Android/sdk export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/emulator
-
Display list of devices in android studio
emulator -list-avds
-
Spin up the virtual android device with the installed Waymo One application
emulator -avd <device name>
-
After the device is started, change the device location to the desired Waymo service area. (Make sure you have downloaded adb)
This will take some time before the Waymo app changes the location (I recommend running this when the device is booting up)
// Select one of the following adb emu geo fix <longitude> <latitude> adb emu geo fix -122.431297 37.773972 // San Francisco adb emu geo fix -118.243683 34.052235 // Los Angeles adb emu geo fix -112.074036 33.448376 // Phoenix adb emu geo fix -97.733330 30.266666 // Austin
-
I would recommend opening the Waymo One app before using the API
We need appium so the API can talk to the virtual device
-
Create a new terminal instance and enter the following:
export ANDROID_HOME=$HOME/Library/Android/sdk export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
-
Install appium
npm install -g appium
-
Start appium
appium
See examples directory for usage examples or use the following commands
uv run examples/demo/main.py --trip "Fort Mason" "Salesforce Tower"
uv run examples/demo/main.py --trips examples/demo/trips.json
- You'll need adb for this
adb shell uiautomator dump && adb pull /sdcard/window_dump.xml
Feel free to create a pull request or an issue and i will try to review it
MIT (I'm not affiliated with Waymo or Google. This project is for educational purposes only)