> 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: queryScheduleItems() # Method package: wixEventsV2 # Method menu location: wixEventsV2 --> schedule --> queryScheduleItems # Method Link: https://dev.wix.com/docs/velo/apis/wix-events-v2/schedule/query-schedule-items.md # Method Description: Creates a query to retrieve a list of schedule items. The `queryScheduleItems( )` function builds a query to retrieve a list of schedule items and returns a [`ItemsQueryBuilder`](https://dev.wix.com/docs/velo/apis/wix-events-v2/schedule/items-query-builder/ascending.md) object. The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://www.wix.com/velo/reference/wix-events-v2/schedule/itemsquerybuilder/find) function. You can refine the query by chaining `ItemsQueryBuilder` functions onto the query. `ItemsQueryBuilder` functions enable you to sort, filter, and control the results `queryScheduleItems( )` returns. `queryScheduleItems( )` runs with these `ItemsQueryBuilder` defaults, which you can override: - [`limit(50)`](https://www.wix.com/velo/reference/wix-events-v2/schedule/itemsquerybuilder/limit) - [`descending("_createdDate")`](https://www.wix.com/velo/reference/wix-events-v2/schedule/itemsquerybuilder/descending) The functions that are chained to `queryScheduleItems( )` are applied in the order they're called. For example, if you apply `ascending('name')` and then `descending('stageName')`, the results are sorted first by the `name`, and then, if there are multiple results with the same `name`, the items are sorted by `stageName`. |PROPERTY |SUPPORTED FILTERS & SORTING |:---:|:---:| |`_id`|[`eq()`](/items-query-builder/eq),[`ne()`](/items-query-builder/ne),[`ascending()`](/items-query-builder/ascending),[`descending()`](/items-query-builder/descending)| |`name`|[`eq()`](/items-query-builder/eq),[`ne()`](/items-query-builder/ne),[`ascending()`](/items-query-builder/ascending),[`descending()`](/items-query-builder/descending)| |`description`|[`eq()`](/items-query-builder/eq),[`ne()`](/items-query-builder/ne),[`ascending()`](/items-query-builder/ascending),[`descending()`](/items-query-builder/descending)| |`stageName`|[`eq()`](/items-query-builder/eq),[`ne()`](/items-query-builder/ne),[`ascending()`](/items-query-builder/ascending),[`descending()`](/items-query-builder/descending)| |`_createdDate`|[`eq()`](/items-query-builder/eq),[`ne()`](/items-query-builder/ne),[`lt()`](/items-query-builder/lt),[`le()`](/items-query-builder/le),[`gt()`](/items-query-builder/gt),[`ge()`](/items-query-builder/ge),[`ascending()`](/items-query-builder/ascending),[`descending()`](/items-query-builder/descending)| |`_updatedDate`|[`eq()`](/items-query-builder/eq),[`ne()`](/items-query-builder/ne),[`lt()`](/items-query-builder/lt),[`le()`](/items-query-builder/le),[`gt()`](/items-query-builder/gt),[`ge()`](/items-query-builder/ge),[`ascending()`](/items-query-builder/ascending),[`descending()`](/items-query-builder/descending)| |`eventId`|[`eq()`](/items-query-builder/eq),[`ne()`](/items-query-builder/ne),[`ascending()`](/items-query-builder/ascending),[`descending()`](/items-query-builder/descending)| # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## queryScheduleItems example ```javascript import { schedule } from 'wix-events.v2'; async function queryScheduleItems() { const { items } = schedule.queryScheduleItems().find(); } ``` ## queryScheduleItems example for exporting from backend code ```javascript import { schedule } from 'wix-events.v2'; import { webMethod, Permissions } from 'wix-web-module'; export const queryScheduleItems = webMethod( Permissions.Anyone, async (options) => { try { const result = await schedule.queryScheduleItems(options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---