Get A Full List of Google Fonts
November 2025
This code gets produces two lists from the Google Fonts API.
-
The raw result from the request
-
A filtered down version with just the names of the families and their associated files.
You'll need to get an API key to get the data. It's been a while since I went through that process. You'll need to dig into that on your own.
import json
import keyring
import requests
import urllib.parse
output_root = "/Users/alan/Desktop"
full_list_path = f"{output_root}/google-fonts-full-list.json"
family_list_path = f"{output_root}/google-font-families.json"
api_key = keyring.get_password('alan--google-fonts-api--main', 'alan')
url = f"https://www.googleapis.com/webfonts/v1/webfonts?key={api_key}"
response = requests.get(url)
data = json.loads(response.content)
with open(full_list_path, "w") as _out:
json.dump(data, _out, sort_keys=True, indent=4)
font_families = {}
for font in data["items"]:
font_families[font["family"]] = {
"files": font["files"]
}
with open(family_list_path, "w") as _out:
json.dump(font_families, _out, sort_keys=True, indent=4)
print("done")