+ Start a Discussion
Shubham KhajjepawarShubham Khajjepawar 

How to export state and country data using api

How to export data if I select country then export under all states 
SwethaSwetha (Salesforce Developers) 
HI Shubham,
You can use REST API with describeSObject . The below articles would be helpful



Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
David Zhu 🔥David Zhu 🔥
You use metadata API to retreive Country and State list. Please add the following to Package.xml file and retrieve all country and states picklist.


The retrieved file is called Address.setting-meta.xml under Settings folder.