---
title: Text Before
slug: text-before
docTags: 
createdAt: 2022-09-06T13:03:28.000Z
---

Returns the text that occurs before the specified pattern&#x20;





### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/text/before",
  "name": "Before API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "pzVSyji09iHeqPtALONoY",
        "code": "{\n\t\"output\": \"Text before the\"\n}",
        "language": "200"
      },
      {
        "id": "JAE2HuVSsON2Qkj3GHQxB",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "pzVSyji09iHeqPtALONoY"
  },
  "examples": {
    "languages": [
      {
        "id": "mKhhBPyPymue9piokQmlX",
        "code": "{\r\n\t\"input\": \"Text before the pattern\",\r\n\t\"searchPattern\": \"pattern\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "mKhhBPyPymue9piokQmlX"
  },
  "description": "Call the following API to switch multiple responses with a standard output",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




