Name of properties in MAPI + pagination

Hello,

in this post New Mat Project API, search for materials with specific number of elements, keyword 'nelements' not known? , it was already pointed out how the properties names of the /materials/summary/ documentation (https://api.materialsproject.org/docs#/Materials%20Summary/search_materials_summary__get [1]) differ from those that can be actually used to query the MP database (i.e. this docstring: https://github.com/materialsproject/api/blob/bc5a9fb7309a7b5eb77bb1dc5956d2d6307df345/mp_api/client/routes/summary.py#L34-L170 [2]).

1- Does this mean that, when using the MAPI though python, we should completely disregard the list of properties of link [1]? Or there is a way to use them?

2- In particular, I was looking for a way to perform searches page by page (meaning: get the results from one page, elaborate/store them, get results from second page, etc.), but it seems not to be possible by only using the num_chunks and chunk_size options provided in the docstring [2]. Is there a way to perform this “page-by-page” search?

Many Thanks for your support,

Gabriele

Hi @MaterialGabri, the parameters you list are the raw query parameters that the client maps the input arguments of search to. These are what are used to construct the underlying query to the database, but may or may not be equivalent to the document fields. That is something we are working towards, but if you want a list of the document fields you can check available_fields(e.g. mpr.materials.summary.available_fields).

You can certainly use the raw query parameters, but will have to send HTTP GET requests yourself to the API endpoint with your API key in the header as X-API-KEY. If you want to iterate page-by-page, you will also have to do that as the client doesn’t support that pagination mode at the moment. If you do, you can use the _page and _per_page query parameters.

– Jason