Generating HTML from API results