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

# Search Data Record

The `search-data-record` function type searches records in a data collection using a text query.

## Usage

This function type is used in Actions to provide access to data collection search functionality.

## Configuration Example

```yaml theme={null}
name: Search Tasks
key: search-tasks
type: search-data-record
config:
  dataSource:
    collectionKey: tasks
  fieldMapping:
    importValue:
      title:
        $var: $.summary
  # Required: search query
  query:
    $var: $.input.searchText
  cursor:
    $var: $.input.pageToken
```

## Configuration Parameters

* `dataSource` - Data source configuration
  * `collectionKey` - Identifier of the data collection to operate on
  * `collectionParameters` - Parameters passed to the collection methods
  * `udm` - (for universal integrations only) Universal Data Model to read
* `fieldMapping` - Field mapping configuration
  * `importValue` - Maps fields from external app to your app format
* `query` - Search query string
* `cursor` - Pagination cursor

## Output Schema

```yaml theme={null}
type: object
properties:
  cursor:
    type: string
  records:
    type: array
    items:
      type: object
```
