New MPRester timing out (504) even with small queries

When querying data with the new API, the request times out 80% of the time. Even with relatively small queries. Additionally, this seems to be a new issue. I ran similar queries a week ago with no issues.


    element_set = {'Zr','O'}
    with MPRester(MAPI_KEY) as mpr:
        mp_results =, num_elements=len(element_set),  energy_above_hull=(0, 0.01),
            fields=['material_id', 'formula_pretty', 'structure','energy_above_hull'],

Error Message
REST query returned with error status code 504 on URL with message:
Server timed out trying to obtain data. Try again with a smaller request.

Hi @kdmiller,

thanks for reaching out and bringing this up. We’ve indeed been having issues with our database deployment since Saturday. We’ve identified the source(s) of the issue and are trying to get a fix out in the next couple of days. I’ll post a response here once I have an update.

sorry about the inconvenience,

1 Like

Hi @kdmiller, we should be back to normal now. Please let me know if you still experience unexpected issues with the API or the website. Thanks, Patrick

Looks to be working. Thanks!