> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: siteLocation.query() # Method Link: https://dev.wix.com/docs/sdk/frontend-modules/location/query.md # Method Description: Gets an object that represents the query segment of the current page's URL. Premium sites: ![Premium site query](https://wixmp-833713b177cebf373f611808.wixmp.com/images/velo-images/media_url_premium_query.png "Premium site query") Free sites: ![Free site query](https://wixmp-833713b177cebf373f611808.wixmp.com/images/velo-images/media_url_free_query.png "Free site query") # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Get the query of the current page's URL ```javascript import { location } from '@wix/site-location'; // Premium site URL: "https://www.domain.com/animals/elephant?species=african-elephant#desc" // Free site URL: "https://user_name.wixsite.com/zoo/animals/elephant?species=african-elephant#desc" let query = await location.query(); // {"species": "african-elephant"} ``` ## Add, update, remove, and get URL query parameters ```javascript import {location, queryParams} from '@wix/site-location'; $w.onReady(function () { $w("#addButton").onClick((event) => { const key = $w('#addKey').value; const value = $w('#addValue').value; if (key && value) { const toAdd = { [key]: value }; queryParams().add(toAdd); $w('#addKey').value = undefined; $w('#addValue').value = undefined; } }); $w("#removeButton").onClick((event) => { const paramToRemove = [$w('#removeKey').value]; queryParams().remove(paramToRemove); $w('#removeKey').value = undefined; }); $w("#getButton").onClick(async (event) => { const query = await location.query(); if (query) { $w('#getText').value = location.stringify(query, null, 2); } }); }); ```