How to extract "country" information from IMDB

For a university project I’d like to add the “country” info to a list of IMDB IDs (4800). This could be achieved through a script that uses the IMDB api. Anyone familiar with this approach or able to point to another (legal) solution?

This is the documentation for the API: https://developer.imdb.com/