Issue with API Access for Element Database Retrieval

I am encountering a problem when trying to access the Materials Project database via the REST API… My team and I have developed software that generates API requests based on user input to fetch data from the Materials Project.

For instance, when a user inputs “Si” (for Silicon), our software constructs the following API call:

www.materialsproject.org/rest/v2/materials/Si/vasp=actual_user_api_key

However, this request is not returning the expected results. Here are the details and steps we’ve followed:

  1. API Key: We are using a valid API key provided by the user.
  2. Request Format: The request URL is structured based on our understanding of the Materials Project API documentation.
  3. Expected Behavior: On inputting an element like “Si”, the software should retrieve relevant data from the Materials Project database.
  4. Actual Behavior: The API call does not retrieve any data, or it results in an error (message: “no route matched with these values”).
  5. I am also attaching the screenshot of the error message it is showing.

We have checked the API key for validity, and the same structure has been working previously. Is there any recent change in the API endpoint, parameters, or policy that might be affecting this functionality? Also, are there alternative methods or endpoints we should use for such queries?

Any guidance or assistance in resolving this issue would be greatly appreciated. Thank you in advance for your help!

Best regards,

Right

Hi @Right_Here,

looks like you’re trying to use the outdated legacy API. I’d recommend switching to the new “next-gen” API and use the summary endpoint: https://api.materialsproject.org/docs#/Materials%20Summary/search_materials_summary__get

Also see https://materialsproject.org/api for more info, and https://materialsproject.org/about/terms for our terms, as well as our docs at https://docs.materialsproject.org

HTH