> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipedrive: Search Item By Field

> Perform a search using a specific field from an item type. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Perform a search using a specific field from an item type.

<Info>
  Tool ID: `pipedrive_search_item_by_field`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'pipedrive_search_item_by_field',
  {
    "term": "software companies hiring engineers",
    "entity_type": "deal",
    "field": "email"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute pipedrive_search_item_by_field --input '{
  "term": "software companies hiring engineers",
  "entity_type": "deal",
  "field": "email"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "success": true,
    "data": [
      {
        "result_score": 123,
        "item": {}
      }
    ],
    "additional_data": {
      "next_cursor": "cursor_123"
    }
  }
}
```

Use `deepline tools get pipedrive_search_item_by_field --json` for the latest machine-readable contract.

## Input reference

Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).

| Name                  | Type                                                                       | Required | Default   | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------------------- | -------------------------------------------------------------------------- | -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.term`        | `string`                                                                   | Yes      | —         | The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded.                                                                                                                                                                                                                                                                                                                                     |
| `payload.entity_type` | `"deal" \| "lead" \| "person" \| "organization" \| "product" \| "project"` | Yes      | —         | The type of the field to perform the search from Allowed: `deal`, `lead`, `person`, `organization`, `product`, `project`.                                                                                                                                                                                                                                                                                                                                                   |
| `payload.match`       | `"exact" \| "beginning" \| "middle"`                                       | No       | `"exact"` | The type of match used against the term. The search is case sensitive. E.g. in case of searching for a value `monkey`, with `exact` match, you will only find it if term is `monkey` with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey` with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke` . Allowed: `exact`, `beginning`, `middle`. |
| `payload.field`       | `string`                                                                   | Yes      | —         | The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields here .                                                                                                    |
| `payload.limit`       | `integer`                                                                  | No       | —         | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.                                                                                                                                                                                                                                                                                                                       |
| `payload.cursor`      | `string`                                                                   | No       | —         | For pagination, the marker (an opaque string value) representing the first item on the next page                                                                                                                                                                                                                                                                                                                                                                            |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).",
    "properties": {
      "term": {
        "type": "string",
        "description": "The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded."
      },
      "entity_type": {
        "type": "string",
        "description": "The type of the field to perform the search from",
        "enum": [
          "deal",
          "lead",
          "person",
          "organization",
          "product",
          "project"
        ]
      },
      "match": {
        "type": "string",
        "description": "The type of match used against the term. The search is case sensitive. E.g. in case of searching for a value `monkey`, with `exact` match, you will only find it if term is `monkey` with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey` with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke` .",
        "default": "exact",
        "enum": [
          "exact",
          "beginning",
          "middle"
        ]
      },
      "field": {
        "type": "string",
        "description": "The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields here ."
      },
      "limit": {
        "type": "integer",
        "description": "For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed."
      },
      "cursor": {
        "type": "string",
        "description": "For pagination, the marker (an opaque string value) representing the first item on the next page"
      }
    },
    "required": [
      "term",
      "entity_type",
      "field"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                      | Type      | Required | Default | Details                                                                                                                                                                   |
| ----------------------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result.data`                             | `object`  | Yes      | —       | Provider response payload.                                                                                                                                                |
| `result.data.success`                     | `boolean` | No       | —       | If the response is successful or not                                                                                                                                      |
| `result.data.data`                        | `array`   | No       | —       | The array of found fields                                                                                                                                                 |
| `result.data.data[].result_score`         | `number`  | No       | —       | Search result relevancy                                                                                                                                                   |
| `result.data.data[].item`                 | `record`  | No       | —       | Item                                                                                                                                                                      |
| `result.data.additional_data`             | `object`  | No       | —       | Pagination related data                                                                                                                                                   |
| `result.data.additional_data.next_cursor` | `string`  | No       | —       | The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned. |
| `result.meta`                             | `object`  | No       | —       | Additional response metadata (status, paging).                                                                                                                            |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "If the response is successful or not"
          },
          "data": {
            "type": "array",
            "description": "The array of found fields",
            "items": {
              "type": "object",
              "properties": {
                "result_score": {
                  "type": "number",
                  "description": "Search result relevancy"
                },
                "item": {
                  "type": "object",
                  "description": "Item"
                }
              },
              "additionalProperties": false
            }
          },
          "additional_data": {
            "type": "object",
            "description": "Pagination related data",
            "properties": {
              "next_cursor": {
                "type": "string",
                "description": "The first item on the next page. The value of the `next_cursor` field will be `null` if you have reached the end of the dataset and there’s no more pages to be returned."
              }
            },
            "additionalProperties": false
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Pipedrive provider guide](/docs/providers/pipedrive/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
