Auto.dev API Integration Setup
Guides you through adding an Auto.dev API key to a CarFinder Streamlit app and explains live data vs. fallback behavior.
What this file does
Guides you through adding an Auto.dev API key to a CarFinder Streamlit app and explains live data vs. fallback behavior.
When to use it
- You need to integrate a real vehicle listings API into a Streamlit app
- You want a toggle between live API data and local mock data
- You are setting up Auto.dev for the first time in a project
- You need a clear fallback strategy when an external API is unavailable
Assumes this stack
Auto.dev API Integration Setup
šÆ Quick Setup
Your CarFinder application is now ready for Auto.dev integration! Follow these simple steps:
1. Get Your API Key
- Visit auto.dev and sign up/sign in
- Go to your dashboard to get your API key
- The Starter plan includes 1,000 free API calls per month
2. Add Your API Key
Open the .env file in your CarFinder directory and replace:
AUTO_DEV_API_KEY=your_api_key_here
With your actual API key:
AUTO_DEV_API_KEY=sk-your-actual-api-key-here
3. Restart the Application
After adding your API key:
- Stop the current Streamlit app (Ctrl+C in terminal)
- Restart it:
python -m streamlit run app/main_live.py
š How It Works
With Live Data Toggle ON:
- Auto.dev API Available: Uses real vehicle listings from Auto.dev
- Auto.dev API Unavailable: Falls back to mock data sources (Cars.com, AutoTrader, CarGurus)
With Live Data Toggle OFF:
- Uses local database with sample vehicles
- Perfect for testing and offline use
š API Features
The Auto.dev integration provides:
- Real-time vehicle listings from US dealers
- Advanced filtering by make, model, year, price, mileage
- Detailed vehicle information including specifications, features, images
- Dealer contact information and listing URLs
- Geographic filtering by ZIP code and radius
š Supported Parameters
The integration supports Auto.dev's full API parameters:
vehicle.make- Vehicle manufacturervehicle.model- Vehicle modelvehicle.year- Model year (single year or range)retailListing.price- Price range (e.g., "10000-30000")vehicle.mileage- Mileage range (e.g., "0-50000")zip- ZIP code for location filteringdistance- Radius in miles from ZIP codelimit- Number of results (max 100 per request)
šļø UI Indicators
The application shows clear indicators:
- "š¢ Auto.dev API Active" when using real Auto.dev data
- "š“ Using Mock Data Sources" when falling back to mock sources
- "š Local Database Only" when live data is disabled
š Troubleshooting
API Key Issues
- Ensure no extra spaces in the API key
- Verify the key starts with appropriate prefix (usually
sk-) - Check your Auto.dev dashboard for API usage and limits
Connection Issues
- Check internet connection
- Verify Auto.dev service status
- API may have rate limits - check your plan limits
Data Issues
- Auto.dev returns real market data, so results vary by location and availability
- Use the ZIP code filter for location-specific results
- Mock data sources provide consistent test data when Auto.dev is unavailable
š Performance Notes
- Auto.dev API calls count against your monthly limit
- Mock data sources are always available as fallback
- Local database provides instant responses for testing
- The application caches results to minimize API calls
ā Current Status
- ā Auto.dev API integration code complete
- ā Proper error handling and fallbacks implemented
- ā Mock data sources working as backup
- ā Local database integration functional
- š Waiting for your API key to activate Auto.dev
Once you add your API key, you'll have access to millions of real vehicle listings!
What's inside
6 sections: quick setup, how it works, API features, supported parameters, UI indicators, troubleshooting, plus status checklist.
Change this for your project
- Replace
AUTO_DEV_API_KEY=your_api_key_herewith your own Auto.dev key - Replace
app/main_live.pywith your own Streamlit entry point - Replace
CarFinderreferences with your own project name
Where it goes
Keep in docs/ or alongside the feature. Agents read it to implement against a defined contract.
Worth borrowing
- Toggle between live API and local mock data with a UI switch
- Fallback to mock sources when the API is unavailable
- Cache API results to reduce usage against monthly limits
Related Documents
GPU Selection Guide for Large Language Models (LLMs)
Guides GPU selection for LLM inference, fine-tuning, and training by mapping model sizes, precision levels, and budgets to VRAM requirements.
Community AI Agent Skills Discovery Sources
Catalogs 50+ platforms, repositories, directories, and communities for discovering and sharing AI agent skills across multiple coding tools.
ReleaseKit - Technical Requirements Document
Specifies a Go library and CLI for release automation with conventional commit parsing, validation checks, and workflow orchestration.
api_llm Specification
Defines a workspace of thin HTTP API clients for major LLM providers with no abstraction layer and explicit developer control.