API endpoints
The project's Flask REST API, kept with the same twelve endpoints and the same response format {"schema": …, "data": […]} (pandas orient="table"). They're now static JSON files, so they're always up: no server to sleep or database to expire. Running python3 app.py also serves them at the original paths (e.g. /searchbyyear).
Usage
// JavaScript
const res = await fetch('https://ermiasgelaye.github.io/Google-Health-Search-Project/static/data/searchbyyear.json');
const { data } = await res.json(); // [{ year: 2004, searches: 53457 }, …]
# Python
import pandas as pd, requests
url = "https://ermiasgelaye.github.io/Google-Health-Search-Project/static/data/allsearchrecord.json"
df = pd.DataFrame(requests.get(url).json()["data"])
Endpoints
Note: the "sum" endpoints add up 0–100 scores as the original API did. Because Google scales each condition and year separately, compare places within a condition rather than totals across conditions or years.