> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# QueryProjects

# Package: marketplace

# Namespace: Projects

# Method link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/marketplace/project-v1/query-projects.md

## Permission Scopes:
Manage CRM and Marketplace: SCOPE.ARENA.MANAGE-LEADS

## Introduction

Retrieves a list of up to 100 projects, given the provided paging, filtering, and sorting.

Query Projects runs with these defaults, which you can override:

- `createdDate` is sorted in `DESC` order
- `cursorPaging.limit` is `50`

Supported filter and sort fields: `id`, `status`, `source`, `contactId`, `createdDate`, `updatedDate`, `expirationDate`.

To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).

---

## REST API

### Schema

```
 Method: queryProjects
 Description: Retrieves a list of up to 100 projects, given the provided paging, filtering, and sorting.  Query Projects runs with these defaults, which you can override:  - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `50`  Supported filter and sort fields: `id`, `status`, `source`, `contactId`, `createdDate`, `updatedDate`, `expirationDate`.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 URL: https://www.wixapis.com/partners/marketplace/v1/projects/query
 Method: POST
 Method parameters:
   param name: query | type: CursorQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object.  Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: source | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: expirationDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryProjectsResponse
  - name: projects | type: array<Project> | description: Retrieved projects.  
     - name: id | type: string | description: Project GUID.  | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the project is updated. To prevent conflicting changes, the current revision must be passed when updating the project.  | validation: format uint64
     - name: createdDate | type: string | description: Date and time the project was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the project was updated.  | read-only: true | validation: format date-time
     - name: serviceName | type: ServiceName | description: Marketplace service the project is attributed to.  To set this value, specify `serviceName` when calling Complete Project.  | read-only: true 
         - enum:
         -     UNKNOWN_SERVICE_NAME: No service, or an unrecognized service.
         -     DOMAIN: Connect or set up a domain.
         -     ACCESSIBILITY: Improve site accessibility.
         -     RESTAURANT_MENU_SETUP: Set up a restaurant menu.
         -     STORE_OPTIMIZATION: Optimize an online store.
         -     ADVANCED_WEBSITE: Build an advanced website.
         -     CUSTOM_INPUT_FORMS: Build custom input forms.
         -     SITE_GUIDANCE: Guidance on building a site.
         -     ECOMMERCE_SITE: Build an eCommerce site.
         -     ADS: Set up and manage ads.
         -     PROFESSIONAL_TRANSLATION: Professional content translation.
         -     BRAND_DEVELOPMENT: Develop a brand.
         -     EMAIL: Set up business email.
         -     CUSTOM_SITE_FUNCTIONALITIES: Build custom site functionalities.
         -     THIRD_PARTY_SERVICES: Integrate third-party services.
         -     VISUALS: Create visual assets.
         -     CODING_GUIDANCE: Guidance on custom code.
         -     EMAIL_MARKETING: Set up email marketing.
         -     WRITTEN: Written content.
         -     PHOTOS: Photography.
         -     STORE_SETTINGS: Configure store settings.
         -     ANALYTICS: Set up analytics.
         -     CLASSIC_WEBSITE: Build a classic website.
         -     PIXEL: Set up a tracking pixel.
         -     REDESIGN_SITE: Redesign an existing site.
         -     MOBILE_APP: Build a mobile app.
         -     CONTENT_WITH_DATABASE: Build content backed by a database.
         -     UPDATES: Site updates and maintenance.
         -     INSTALL_APPS: Install and set up apps.
         -     MOBILE_SITE: Optimize the mobile site.
         -     LOGO: Design a logo.
         -     CUSTOM_DESIGN: Custom design work.
         -     ADVANCED_STORE: Build an advanced store.
         -     SEO: Search engine optimization.
         -     MOVE_SITE: Move a site to Wix.
         -     EDIT_IMAGE: Edit images.
     - name: contactId | type: string | description: GUID of the contact representing the client in the provider's contact list.  Use this GUID to look up the client's details with the [Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction.md).  | validation: format GUID
     - name: status | type: Status | description: Current status of the engagement.  
         - enum:
         -     NEW: The project was created from the client's brief and no one has acted on it yet.
         -     IN_DISCUSSION: The provider and client are discussing the engagement.
         -     IN_PROGRESS: The provider has started work on the engagement.
         -     COMPLETED: The provider has delivered the engagement. Final status.
         -     CANCELED_BY_CLIENT: The client canceled the engagement. Final status.
         -     CANCELED_BY_PROVIDER: The provider canceled the engagement. Final status.
         -     EXPIRED: No one acted on the project before it reached its `expirationDate`. Final status.
         -     CONTACTED: The provider has messaged the client for the first time.
     - name: review | type: Review | description: Client's review of the completed project, together with the provider's reply.  Available only after the client submits a review, which they can do once the project's `status` is `COMPLETED`.  
        - name: overallScore | type: integer | description: Client's rating of the engagement, where 1 is the lowest and 5 is the highest.  | validation: minimum 1, maximum 5, format uint32
        - name: text | type: string | description: Client's written feedback on the engagement.  
        - name: date | type: string | description: Date and time the review was submitted.  | validation: format date-time
        - name: reply | type: Reply | description: Provider's reply to the review.  Add a reply by calling Reply to Project Review. A review supports a single reply, which can't be changed once submitted.  
           - name: text | type: string | description: Provider's response to the client's review.  | validation: minLength 1
           - name: date | type: string | description: Date and time the reply was submitted.  | validation: format date-time
     - name: metasiteId | type: string | description: GUID of the site delivered for the project.  Serves as proof of delivery when calling Complete Project.  | validation: format GUID
     - name: completedProjectSnapshot | type: string | description: URL of a visual snapshot of the delivered work, such as an uploaded thumbnail image or the URL of the delivered site.  Serves as proof of delivery when calling Complete Project.  | validation: format WEB_URL
     - name: statusTimeline | type: array<StatusTimelineItem> | description: NOT marked `readOnly`: the back-office console maintains this list itself and passes `statusTimeline` in the update mask, and a readOnly field in a mask is rejected outright. Remove this exemption once ProjectsBO.UpdateProject appends the timeline server-side and the BO client stops sending it.  
        - name: status | type: Status | description: Status the project held.  
        - name: date | type: string | description: Date and time the project held this status.  | validation: format date-time
     - name: budget | type: number | description: Agreed budget for the engagement.  To set this value, specify `budget` when calling Complete Project.  | validation: format double
     - name: cancellationInfo | type: CancellationInfo | description: Reason the project was canceled, with any additional details.  Returned only when `status` is `CANCELED_BY_PROVIDER` or `CANCELED_BY_CLIENT`.  
        - name: additionalInfo | type: string | description: Additional details about why the project was canceled.  
        - name: reason | type: CancellationReason | description: Reason the project was canceled.  
             - enum:
             -     OTHER: A reason not covered by the other values.
             -     CLIENT_NOT_RESPONDING: The client stopped responding.
             -     BUDGET_IS_TOO_LOW: The client's budget was too low for the work.
             -     DUPLICATE_REQUEST: The request duplicates another project.
             -     REPORT_AS_SPAM: The request was reported as spam.
             -     DOESNT_MATCH_MY_SKILLS: The work doesn't match the provider's skills.
     - name: expirationDate | type: string | description: Date and time the project expires if no one acts on it.  A project that's still in `NEW` status at this time moves to `EXPIRED` automatically. Once the project leaves `NEW` status, it no longer expires.  | read-only: true | validation: format date-time
     - name: source | type: Source | description: How the engagement originated.  
         - enum:
         -     MATCHING: The engagement originated from the marketplace matching flow. Also returned when the source is unknown.
         -     EXPLORE: The client found the provider in the Wix Marketplace and contacted them directly.
         -     AI_ASSISTANT: The engagement originated from an AI assistant conversation.
     - name: briefDescription | type: string | description: Client's request, copied from the brief the project was created from.  Read this field to see what the client asked for without retrieving the brief itself.  | read-only: true | validation: maxLength 5000
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query Projects
Retrieves the provider's projects that no one has acted on yet

```curl
curl -X POST \
'https://www.wixapis.com/partners/marketplace/v1/projects/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "query": {
    "filter": {
      "status": "NEW"
    },
    "sort": [
      {
        "fieldName": "createdDate",
        "order": "DESC"
      }
    ],
    "cursorPaging": {
      "limit": 10
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.marketplaceProjects.marketplaceProjects.queryProjects(query)
 Description: Retrieves a list of up to 100 projects, given the provided paging, filtering, and sorting.  Query Projects runs with these defaults, which you can override:  - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `50`  Supported filter and sort fields: `id`, `status`, `source`, `contactId`, `createdDate`, `updatedDate`, `expirationDate`.  To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: ProjectQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object.  Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  | validation: maxItems 5
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: source | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: expirationDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryProjectsResponse>
  - name: projects | type: array<Project> | description: Retrieved projects.  
     - name: _id | type: string | description: Project GUID.  | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the project is updated. To prevent conflicting changes, the current revision must be passed when updating the project.  | validation: format uint64
     - name: _createdDate | type: Date | description: Date and time the project was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the project was updated.  | read-only: true 
     - name: serviceName | type: ServiceName | description: Marketplace service the project is attributed to.  To set this value, specify `serviceName` when calling Complete Project.  | read-only: true 
         - enum:
         -     UNKNOWN_SERVICE_NAME: No service, or an unrecognized service.
         -     DOMAIN: Connect or set up a domain.
         -     ACCESSIBILITY: Improve site accessibility.
         -     RESTAURANT_MENU_SETUP: Set up a restaurant menu.
         -     STORE_OPTIMIZATION: Optimize an online store.
         -     ADVANCED_WEBSITE: Build an advanced website.
         -     CUSTOM_INPUT_FORMS: Build custom input forms.
         -     SITE_GUIDANCE: Guidance on building a site.
         -     ECOMMERCE_SITE: Build an eCommerce site.
         -     ADS: Set up and manage ads.
         -     PROFESSIONAL_TRANSLATION: Professional content translation.
         -     BRAND_DEVELOPMENT: Develop a brand.
         -     EMAIL: Set up business email.
         -     CUSTOM_SITE_FUNCTIONALITIES: Build custom site functionalities.
         -     THIRD_PARTY_SERVICES: Integrate third-party services.
         -     VISUALS: Create visual assets.
         -     CODING_GUIDANCE: Guidance on custom code.
         -     EMAIL_MARKETING: Set up email marketing.
         -     WRITTEN: Written content.
         -     PHOTOS: Photography.
         -     STORE_SETTINGS: Configure store settings.
         -     ANALYTICS: Set up analytics.
         -     CLASSIC_WEBSITE: Build a classic website.
         -     PIXEL: Set up a tracking pixel.
         -     REDESIGN_SITE: Redesign an existing site.
         -     MOBILE_APP: Build a mobile app.
         -     CONTENT_WITH_DATABASE: Build content backed by a database.
         -     UPDATES: Site updates and maintenance.
         -     INSTALL_APPS: Install and set up apps.
         -     MOBILE_SITE: Optimize the mobile site.
         -     LOGO: Design a logo.
         -     CUSTOM_DESIGN: Custom design work.
         -     ADVANCED_STORE: Build an advanced store.
         -     SEO: Search engine optimization.
         -     MOVE_SITE: Move a site to Wix.
         -     EDIT_IMAGE: Edit images.
     - name: contactId | type: string | description: GUID of the contact representing the client in the provider's contact list.  Use this GUID to look up the client's details with the [Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction.md).  | validation: format GUID
     - name: status | type: Status | description: Current status of the engagement.  
         - enum:
         -     NEW: The project was created from the client's brief and no one has acted on it yet.
         -     IN_DISCUSSION: The provider and client are discussing the engagement.
         -     IN_PROGRESS: The provider has started work on the engagement.
         -     COMPLETED: The provider has delivered the engagement. Final status.
         -     CANCELED_BY_CLIENT: The client canceled the engagement. Final status.
         -     CANCELED_BY_PROVIDER: The provider canceled the engagement. Final status.
         -     EXPIRED: No one acted on the project before it reached its `expirationDate`. Final status.
         -     CONTACTED: The provider has messaged the client for the first time.
     - name: review | type: Review | description: Client's review of the completed project, together with the provider's reply.  Available only after the client submits a review, which they can do once the project's `status` is `COMPLETED`.  
        - name: overallScore | type: integer | description: Client's rating of the engagement, where 1 is the lowest and 5 is the highest.  | validation: minimum 1, maximum 5, format uint32
        - name: text | type: string | description: Client's written feedback on the engagement.  
        - name: date | type: Date | description: Date and time the review was submitted.  
        - name: reply | type: Reply | description: Provider's reply to the review.  Add a reply by calling Reply to Project Review. A review supports a single reply, which can't be changed once submitted.  
           - name: text | type: string | description: Provider's response to the client's review.  | validation: minLength 1
           - name: date | type: Date | description: Date and time the reply was submitted.  
     - name: metasiteId | type: string | description: GUID of the site delivered for the project.  Serves as proof of delivery when calling Complete Project.  | validation: format GUID
     - name: completedProjectSnapshot | type: string | description: URL of a visual snapshot of the delivered work, such as an uploaded thumbnail image or the URL of the delivered site.  Serves as proof of delivery when calling Complete Project.  | validation: format WEB_URL
     - name: statusTimeline | type: array<StatusTimelineItem> | description: NOT marked `readOnly`: the back-office console maintains this list itself and passes `statusTimeline` in the update mask, and a readOnly field in a mask is rejected outright. Remove this exemption once ProjectsBO.UpdateProject appends the timeline server-side and the BO client stops sending it.  
        - name: status | type: Status | description: Status the project held.  
        - name: date | type: Date | description: Date and time the project held this status.  
     - name: budget | type: number | description: Agreed budget for the engagement.  To set this value, specify `budget` when calling Complete Project.  
     - name: cancellationInfo | type: CancellationInfo | description: Reason the project was canceled, with any additional details.  Returned only when `status` is `CANCELED_BY_PROVIDER` or `CANCELED_BY_CLIENT`.  
        - name: additionalInfo | type: string | description: Additional details about why the project was canceled.  
        - name: reason | type: CancellationReason | description: Reason the project was canceled.  
             - enum:
             -     OTHER: A reason not covered by the other values.
             -     CLIENT_NOT_RESPONDING: The client stopped responding.
             -     BUDGET_IS_TOO_LOW: The client's budget was too low for the work.
             -     DUPLICATE_REQUEST: The request duplicates another project.
             -     REPORT_AS_SPAM: The request was reported as spam.
             -     DOESNT_MATCH_MY_SKILLS: The work doesn't match the provider's skills.
     - name: expirationDate | type: Date | description: Date and time the project expires if no one acts on it.  A project that's still in `NEW` status at this time moves to `EXPIRED` automatically. Once the project leaves `NEW` status, it no longer expires.  | read-only: true 
     - name: source | type: Source | description: How the engagement originated.  
         - enum:
         -     MATCHING: The engagement originated from the marketplace matching flow. Also returned when the source is unknown.
         -     EXPLORE: The client found the provider in the Wix Marketplace and contacted them directly.
         -     AI_ASSISTANT: The engagement originated from an AI assistant conversation.
     - name: briefDescription | type: string | description: Client's request, copied from the brief the project was created from.  Read this field to see what the client asked for without retrieving the brief itself.  | read-only: true | validation: maxLength 5000
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### Query projects
Retrieves the provider's projects that no one has acted on yet, newest first

```javascript
import { marketplaceProjects } from "@wix/marketplace-projects";

async function queryProjects() {
  const response = await marketplaceProjects
    .queryProjects()
    .eq("status", "NEW")
    .descending("_createdDate")
    .limit(10)
    .find();
}

/* Promise resolves to:
 * {
 *   "items": [
 *     {
 *       "_id": "2f7c9a1b-8d3e-4a5f-9c6b-1e0d2f3a4b5c",
 *       "revision": "1",
 *       "_createdDate": "2024-01-15T10:30:00.000Z",
 *       "_updatedDate": "2024-01-15T10:30:00.000Z",
 *       "serviceName": "ADVANCED_WEBSITE",
 *       "contactId": "5c6d7e8f-9a1b-4c2d-9e3f-4a5b6c7d8e9f",
 *       "status": "NEW",
 *       "budget": 500,
 *       "expirationDate": "2024-01-19T10:30:00.000Z",
 *       "source": "MATCHING",
 *       "briefDescription": "Looking for a modern portfolio site with a blog and contact form."
 *     }
 *   ],
 *   "length": 1,
 *   "pageSize": 10,
 *   "hasNext": false,
 *   "hasPrev": false
 * }
 */

```

### queryProjects (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { marketplaceProjects } from '@wix/marketplace-projects';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { marketplaceProjects },
  // Include the auth strategy and host as relevant
});


async function queryProjects(query) {
  const response = await myWixClient.marketplaceProjects.queryProjects(query);
};
```

---