Is there a free API to get the population of every country ?
I've searched on the World Bank Open Data but I didn't find the API for it.
Yes, the World Bank offers an API access for free, and you can retrieve this kind of data quite easily. The API documentation is available here: https://datahelpdesk.worldbank.org/knowledgebase/topics/125589
In the "API Basic Call Structures" section, they give a very simple example of how to get the population of all countries in the year 2000, in XML format:
Don't forget to follow their recommendations when using the API: https://datahelpdesk.worldbank.org/knowledgebase/articles/902064-development-best-practices
Austrian non-profit population.io has an API link on its homepage but I haven't signed up for it and thus not used it.