> 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: queryLabels() # Method package: wixRestaurantsV2 # Method menu location: wixRestaurantsV2 --> itemLabels --> queryLabels # Method Link: https://dev.wix.com/docs/velo/apis/wix-restaurants-v2/menus/item-labels/query-labels.md # Method Description: Creates a query to retrieve a list of item labels. The `queryLabels()` function builds a query to retrieve a list of item labels and returns a `LabelsQueryBuilder` object. The returned object contains the query definition, which is used to run the query using the [`find()`](/item-labels/labels-query-builder/find) function. You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns. `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override: * [`limit(100)`](/item-labels/labels-query-builder/limit) The following `LabelsQueryBuilder` functions are supported for `queryLabels()`. For a full description of the item label object, see the object returned for the [`items`](/item-labels/labels-query-result/items) property in `LabelsQueryResult`. |PROPERTY |SUPPORTED FILTERS & SORTING |:---:|:---:| |`_id`|[`eq()`](/labels-query-builder/eq),[`ne()`](/labels-query-builder/ne),[`in()`](/labels-query-builder/in)| |`_createdDate`|[`eq()`](/labels-query-builder/eq),[`ne()`](/labels-query-builder/ne),[`gt()`](/labels-query-builder/gt),[`ge()`](/labels-query-builder/ge),[`lt()`](/labels-query-builder/lt),[`le()`](/labels-query-builder/le)| |`_updatedDate`|[`eq()`](/labels-query-builder/eq),[`ne()`](/labels-query-builder/ne),[`gt()`](/labels-query-builder/gt),[`ge()`](/labels-query-builder/ge),[`lt()`](/labels-query-builder/lt),[`le()`](/labels-query-builder/le)| |`name`|[`eq()`](/labels-query-builder/eq),[`ne()`](/labels-query-builder/ne),[`in()`](/labels-query-builder/in),[`startsWith()`](/labels-query-builder/starts-with)| |`icon`|[`exists()`](/labels-query-builder/exists)| # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## queryLabels example ```javascript import { itemLabels } from 'wix-restaurants.v2'; async function queryLabels() { const { items } = itemLabels.queryLabels().find(); } ``` ## queryLabels example for exporting from backend code ```javascript import { itemLabels } from 'wix-restaurants.v2'; import { webMethod, Permissions } from 'wix-web-module'; export const queryLabels = webMethod( Permissions.Anyone, async (options) => { try { const result = await itemLabels.queryLabels(options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---