Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy

Set IP Geolocation

BrowserStack’s IP Geolocation feature allows you to simulate website and mobile behavior from different locations by using IP addresses hosted in 45+ countries around the world. By incorporating IP geolocation into your tests, you can verify scenarios such as localized pricing, languages, product listings and much more.

With IP geolocation enabled, traffic from your mobile app will originate from an IP address hosted in the country you have chosen. With over 45+ countries to choose from, you can now test how your mobile app behaves across the world.

Note: IP geolocation is an Enterprise plan feature on BrowserStack. Contact sales for details

In order to specify the location, you need to pass the geoLocation parameter in the REST API request to start XCUITest test execution. You will be required to pass a two-letter country code for the desired location.

REST API endpoint:

 POST /app-automate/xcuitest/build
Parameter Description Value
geoLocation Test how your app behaves in specific countries <Two letter country code>
Example: CN for China, FR for France, IN for India and US for United States of America

Example cURL request :

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" \
-d '{"geoLocation" : "FR", "devices": ["iPhone 8 Plus-11.0"], "app": "bs://f5L3azt9pLzE995f49376eb1fa3c284dc321f8d", "testSuite": "bs://6eb1fa3c284ddbe9971b2d1aee0d52943b9c081"}' \
-H "Content-Type: application/json"


We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy