---
title: "REST - NLPSearch"
canonical: "https://help.agiloft.com/space/HELP/119799848/REST+-+NLPSearch"
format: markdown
---
<span style="color: #292a2e">EWNLPSearch is a REST endpoint designed</span> to support semantic, NLP-driven searches<span style="color: #001028"> in whichever tables the corresponding chat search function is configured to work with during implementation. </span>The endpoint is primarily designed for use with chatbots, and for handing natural language requests such as "Show me open, high-priority contracts" or "Show me requests submitted last week over $10,000."

- Accepts natural language search queries only, without the ability to add structured field-based filters or specify a table. Despite the difference in input, this endpoint returns records in the same format as [REST - Search](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43717730).
- Supported Content-Types:
  - application/json
  - application/x-www-form-urlencoded
- Returns: the number of records found, and for each record, it returns an encoded set of field values. If pagination is being used, the number of records is in the context of the current page and the specified page size. Each set of field values includes the ID and the fields used to define record ownership.

# Query Parameters

| **Parameter** | **Type** | **Required** | **Description** |
| --- | --- | --- | --- |
| `$KB` | string | Yes | Knowledgebase name |
| `$login` | string | Yes | Login name |
| `$password` | string | Yes | Password |
| `$lang` | string | No | Language (2-letter code) |
| `field` | string[] | Yes | List of fields to return |
| `nlp_query` | string | Yes | The natural language query string |
| `page` | int | No | Page number (default 0) |
| `limit` | int | No | Records per page when using pagination |


# Example Request

##### **JSON**

```
{
   "field": ["company_name","id", "contract_title1"],
   "nlp_query": "Active NDAs submitted last month"
}
```

# Example Return

```
{"success":true,"message":"","result":[{"company_name":"Company_1.","id":31,"contract_title1":"EXAMPLE_TITLE"},{"company_name":"Company_2.","id":32,"contract_title1":"MASTER SERVICES AGREEMENT"},{"company_name":"Company_3.","id":33,"contract_title1":"SaaS Agreement with Example Corp."},{"company_name":"Agiloft, Inc.","id":34,"contract_title1":"Example Maintenance Service Contract"},{"company_name":"Example Corp.","id":35,"contract_title1":"Hosted service subscription for one year"},{"company_name":"Company_4.","id":36,"contract_title1":"Company Name Inc for Annual Support for Agiloft software"},{"company_name":"Company 5, Inc.","id":40,"contract_title1":"Master Service Agreement"}]}
```

<span style="color: #292a2e"> </span>