How to extract the chemical formulas of all OPTIMADE entries?

Would you recommend against this approach?
(The following is based on the OptimadeRester tutorial notebook via e.g. Google Colab)
install dependencies

pip install pymatgen pybtex retrying

Instantiate OptimadeRester and get results

from pymatgen.ext.optimade import OptimadeRester
opt = OptimadeRester(timeout=3600)
opt.refresh_aliases()
results = opt.get_structures()

filter results

import pandas as pd
records = []
for provider, structures in results.items():
    for identifier, structure in structures.items():
        records.append({
            "provider": provider,
            "identifier": identifier,
            "formula": structure.composition.reduced_formula,
        })
df = pd.DataFrame(records)

See also [SUGGESTION] Implement limiting OptimadeRester results to specific properties