--- title: "Geolocation" slug: "geolocation" updated: 2025-05-30T03:44:55Z published: 2025-05-30T03:44:55Z canonical: "helpcenter.autify.com/geolocation" --- > ## Documentation Index > Fetch the complete documentation index at: https://helpcenter.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Geolocation Some websites request access to your location. This is often used to show a map, find nearby stores, or check delivery availability. ![](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/New_design(1).png?sv=2026-02-06&spr=https&st=2026-11-08T17%3A07%3A37Z&se=2026-11-08T18%3A07%3A37Z&sr=c&sp=r&sig=iTe5btJxNRfGUTJZwBhj0WEk3zYG4DXFqqEtFGiYxMI%3D) ## How to set it up 1. **Grant permission to access location** Before simulating location data, allow the website to access the browser’s location. See [Granting permissions](/v1/docs/granting-permissions) for more information on how to do that. Use the following permissions: ```json {  "permissions": ["geolocation"] } ``` 2. **Set the test location** Determine the latitude and longitude coordinates of the location you want to simulate. To get the latitude and longitude, you can use a site like [https://plus.codes/map](https://plus.codes/map). For example, Tokyo Tower has these coordinates: ```json latitude: 35.658563 longitude: 139.745437 ``` 3. **Add a Playwright code step** Add the following Playwright code step **before** the website tries to detect the location: ```typescript await context.setGeolocation({ latitude: 35.658563, longitude: 139.745437 }); ``` ### Additional parameters - You can also include an `accuracy` value in meters if needed: ```typescript await context.setGeolocation({  latitude: 35.658563,  longitude: 139.745437,  accuracy: 100 }); ``` - To simulate the user’s location being unavailable (e.g., no GPS signal), you can pass in a value of `null` ```typescript await context.setGeolocation(null); ```