Flask API implementation for ADS metrics