---
url: /cube-functions/search.md
description: Returns the position of the needle argument in the haystack string argument.
---

# SEARCH

Returns the position of the needle argument in the haystack string argument. Returns -1 if the needle is not found in the haystack. The result is a zero based position.

```js
SEARCH(haystack, needle, start_position)
```

#### Parameters

* `haystack` - The string to search.
* `needle` - The string to find.
* `start_position` - The position to begin the search (zero based).

#### Examples

```js
SEARCH("Hello Business Users", "Users", 0)
```

**Result:** `15`
