> 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: limit(limit: number) # Method package: wixPricingPlansBackend # Method menu location: wixPricingPlansBackend --> PublicPlansQueryBuilder --> limit # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-backend/public-plans-query-builder/limit.md # Method Description: Limits the number of items the query returns. The `limit()` function defines the number of results a query returns in each page. Only one page of results is retrieved at a time. The [`next()`](wix-pricing-plans-backend.PublicPlansQueryResult.html#next) and [`prev()`](wix-pricing-plans-backend.PublicPlansQueryResult.html#prev) functions are used to navigate the pages of a query result. By default, `limit` is set to `50`. The maximum value that `limit()` can accept is `1000`. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Add a limit to a query ```javascript const query = wixPricingPlansBackend.queryPublicPlans().limit(10); ``` ## Create a query, add a limit, and run it ```javascript import wixPricingPlansBackend from 'wix-pricing-plans-backend'; // ... wixPricingPlansBackend.queryPublicPlans() .limit(10) .find() .then((results) => { if (results.items.length > 0) { const items = results.items; const firstItem = items[0]; const totalCount = results.totalCount; const pageSize = results.pageSize; const currentPage = results.currentPage; const totalPages = results.totalPages; const hasNext = results.hasNext(); const hasPrev = results.hasPrev(); const length = results.length; const query = results.query; } else { // handle case where no matching items found } }) .catch((error) => { const queryError = error; }); ``` ---