The Shopify API gives you access to a list of all countries listed in your 'Regions and Taxes' tab. You can find a detailed explanation of the API on the Shopify API page. This list includes all configured parameters for a country (taxes, shipping_rates).
There's one gotcha: this API is not 'public' accessible. If you want to use the output of this JSON within your shop, you have to make it 'public' first. You could for example create an App or proxy to accomplish this.
If you're only interested in Shipping rates, you can also use the Shopify's AJAX API GET /cart/shipping_rates.json
to get an estimated shipping rate.