Autocomplete country and department

I am currently doing my application, I have a problem during registration … I would like that we can select the country (ex: France) and then that it shows me all the departments from this country … I look at the level of API, there are countries, I do not know how it works but for the departments I do not see … All countries or departments? Would it be better to put the area?

postal code better ?