Is there any GraphQL Admin API to get Shipping Countries and their Provinces?
I need 3-digit country and 2-digit province code from that API.
In addition, Is there any API to get latitude and longitude from the Shipping address?
It’s actually really bad that Shopify in 2025 still does not let you easily get all the provinces for the countries that they have.
There is a way though.
You would need to create shipping zones in Shipping and delivery - General profile
Then using Admin API:
query CountriesWithProvinces {
deliveryProfiles(first: 1) {
nodes {
name
profileLocationGroups {
countriesInAnyZone {
country {
id
name
code {
countryCode
}
provinces {
code
id
name
}
}
}
}
}
}
}
You would need flat the arrays of countries and structure your data, but at least you can get the list of province mapped to countries.