A device trade-in value estimator built with vanilla JavaScript. Demonstrates how to combine MobileAPI device data with custom business logic.
- Search for any device with autocomplete
- View key specifications (display, storage, battery, chipset)
- Select device condition (excellent, good, fair, poor)
- Instant trade-in value estimate with price range
- Breakdown showing how the estimate was calculated
- Clean, responsive dark-themed UI
- Zero dependencies
- Get a free API key at mobileapi.dev/signup
- Open
index.htmlin your browser - Paste your API key into the input bar
No build step required.
The estimator uses a simplified algorithm based on device specifications:
- Base value -- determined by device tier (flagship, mid-range, budget) using name and chipset hints
- Age depreciation -- value decreases based on how many years since release
- Storage bonus -- higher storage configurations add value
- Condition multiplier -- applied last based on user-selected condition
| Condition | Multiplier |
|---|---|
| Excellent | 100% |
| Good | 80% |
| Fair | 60% |
| Poor | 35% |
This is a demonstration algorithm. Real trade-in platforms use market data, historical pricing, supply/demand signals, and more sophisticated valuation models.
This example shows how MobileAPI data can power:
- Trade-in platforms -- estimate device values for buyback programs
- Resale marketplaces -- suggest listing prices
- Insurance tools -- calculate replacement values
- Retail tools -- offer trade-in credit toward new purchases
| File | Description |
|---|---|
index.html |
Main HTML page |
style.css |
Styles (dark theme, responsive) |
app.js |
Search, spec display, and pricing logic |