> 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: query() # Method package: wixLocationFrontend # Method menu location: wixLocationFrontend --> query # Method Link: https://dev.wix.com/docs/velo/apis/wix-location-frontend/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 Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get the query of the current page's URL ```javascript import wixLocationFrontend from 'wix-location-frontend'; // 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 = wixLocationFrontend.query; // {"species": "african-elephant"} ``` ## Add, update, remove, and get URL query parameters ```javascript import wixLocationFrontend from 'wix-location-frontend'; $w.onReady(function () { $w("#addButton").onClick((event) => { const key = $w('#addKey').value; const value = $w('#addValue').value; if (key && value) { const toAdd = { [key]: value }; wixLocationFrontend.queryParams.add(toAdd); $w('#addKey').value = undefined; $w('#addValue').value = undefined; } }); $w("#removeButton").onClick((event) => { const paramToRemove = [$w('#removeKey').value]; wixLocationFrontend.queryParams.remove(paramToRemove); $w('#removeKey').value = undefined; }); $w("#getButton").onClick((event) => { const query = wixLocationFrontend.query; if (query) { $w('#getText').value = JSON.stringify(query, null, 2); } }); }); ``` ---