Unable to acquire complete dataset from Materials project

Hello all,\I’m trying to acquire complete dataset using the following Api code:

import pymatgen
from pymatgen.ext.matproj import MPRester
m = MPRester(Nik_API)
data = m.query(criteria={}, properties=[“task_id”])

I end up getting ‘error status code 403’

I passed the api_key from the website related to my login ID. It still doesn’t work.

Not sure if it’s a copy-paste issue or if your code is really as you show here. If the latter then the problem is you’re using “smart” quotes. If you replace “task_id” with "task_id", it works on my end:

from pymatgen.ext.matproj import MPRester

data = MPRester().query(criteria={}, properties=["task_id"])
1 Like