Production-Ready E-commerce Price Tracker API: A Xano AI Challenge Submission
Source: Dev.to
Overview
I recently took on the Xano AI Challenge to build a production‑ready e‑commerce price tracker backend. While the Xano AI assistant provided an excellent starting foundation, the core logic for real‑world functionality—such as live price scraping and production‑level security—required human refinement. This post details how I refined the AI‑generated backend to create a robust and functional Price Tracking API.
AI‑Generated Foundation
Database Schema
The AI created the necessary tables, including:
- product – stores basic product information.
- product_price_history – tracks price changes over time.
Core Endpoints
Basic CRUD (Create, Read, Update, Delete) endpoints were generated for managing product data.
Human Refinements
Live Price Scraping
The major gap left by the AI was the ability to fetch live prices from external e‑commerce websites. I solved this by adding a dedicated public endpoint.
New Endpoint
GET /get_product_details_live
Implementation Details
- Web Scraping – Within the Function Stack, an External API Request function fetches the raw HTML of the supplied product URL.
- Data Extraction – The HTML is parsed to extract the current price.
- Data Storage – A subsequent Database Request function saves the extracted price and a timestamp into the
product_price_historytable.
Security & Validation
- Input Validation – The endpoint requires a mandatory
urlinput of typetext, preventing calls without a target URL. - Rate Limiting – Applied to the
get_product_details_liveendpoint to prevent abuse and protect infrastructure from excessive scraping requests.
API Documentation
You can view the full documentation and test the get_product_details_live endpoint using the links below.
| Resource | Link |
|---|---|
| API Base URL | https://x8ki-letl-twmt.n7.xano.io/api:Kqp69FYE |
| Swagger Docs (OpenAPI) | Swagger Documentation |
Conclusion
This challenge was a fantastic opportunity to merge the power of AI‑generated architecture with the detailed logic of human refinement, resulting in a truly production‑ready backend for e‑commerce price tracking.