> ## 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.

# Openmart: Search Brands

> Search local businesses at the brand level, returning one row per brand or company instead of one per store. Includes SDK V2 examples, schemas, and cost.

Search local businesses at the brand level, returning one row per brand or company instead of one per store.

> [!NOTE]
>
> Tool ID: `openmart_search_brands`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'openmart_search_brands',
  {
    "search_param": {
      "search_term": "software companies hiring engineers",
      "location": [
        {
          "country": "US"
        }
      ],
      "num_stores": [
        {
          "ge": 123,
          "gt": 123,
          "le": 123
        }
      ]
    },
    "pagination": {
      "limit": 100,
      "encoded_cursor": "cursor_123",
      "order_by": [
        {
          "field": "email",
          "asc": true
        }
      ]
    },
    "estimate_total": true
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run openmart_search_brands --input '{
  "search_param": {
    "search_term": "software companies hiring engineers",
    "location": [
      {
        "country": "US"
      }
    ],
    "num_stores": [
      {
        "ge": 123,
        "gt": 123,
        "le": 123
      }
    ]
  },
  "pagination": {
    "limit": 100,
    "encoded_cursor": "cursor_123",
    "order_by": [
      {
        "field": "email",
        "asc": true
      }
    ]
  },
  "estimate_total": true
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": [
      {
        "brand_id": "brand_123",
        "business_name": "Example",
        "business_type": "example"
      }
    ]
  }
}
```

Use `deepline describe openmart_search_brands --json` for the latest machine-readable contract.

## Input reference

Brand-level search returning one row per brand/company. Contact fields come back locked: each row has contacts\_locked true and empty business\_phones and business\_emails arrays. Every row is billed: rows with contacts locked at a lower per-record rate, rows with contacts unlocked at a higher rate. Use openmart\_lookup\_business\_email for company emails.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.search_param` | `object` | No | — | — |
| `payload.pagination` | `object` | No | — | — |
| `payload.estimate_total` | `boolean` | No | — | — |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Brand-level search returning one row per brand/company. Contact fields come back locked: each row has contacts_locked true and empty business_phones and business_emails arrays. Every row is billed: rows with contacts locked at a lower per-record rate, rows with contacts unlocked at a higher rate. Use openmart_lookup_business_email for company emails.",
    "properties": {
      "search_param": {
        "type": "object",
        "properties": {
          "search_term": {
            "type": "string"
          },
          "location": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "country": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                }
              },
              "required": [
                "country"
              ],
              "additionalProperties": false
            }
          },
          "num_stores": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ge": {
                  "type": "integer"
                },
                "gt": {
                  "type": "integer"
                },
                "le": {
                  "type": "integer"
                },
                "lt": {
                  "type": "integer"
                }
              },
              "additionalProperties": false
            }
          },
          "ownership_type": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "INDEPENDENT",
                "FAMILY",
                "FRANCHISE",
                "CHAIN"
              ]
            }
          },
          "has_staff_info": {
            "type": "boolean"
          },
          "has_business_email": {
            "type": "boolean"
          },
          "has_business_phone_number": {
            "type": "boolean"
          },
          "website_url": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string"
            }
          },
          "exclude_website_url": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string"
            }
          },
          "social_media_link": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "pagination": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 100,
            "minimum": 1,
            "maximum": 500
          },
          "encoded_cursor": {
            "type": "string"
          },
          "order_by": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "asc": {
                  "type": "boolean"
                }
              },
              "required": [
                "field",
                "asc"
              ],
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "estimate_total": {
        "type": "boolean"
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.total` | `integer` | No | — | — |
| `result.data.encoded_cursor` | `string` | No | — | — |
| `result.data.data` | `array` | Yes | — | — |
| `result.data.data[].brand_id` | `string` | No | — | — |
| `result.data.data[].business_name` | `string` | No | — | — |
| `result.data.data[].business_type` | `string` | No | — | — |
| `result.data.data[].website_url` | `string` | No | — | — |
| `result.data.data[].business_emails` | `array \| null` | No | — | — |
| `result.data.data[].business_phones` | `array \| null` | No | — | — |
| `result.data.data[].domain_ident` | `string` | No | — | — |
| `result.data.data[].num_stores` | `integer` | No | — | — |
| `result.data.data[].contacts_locked` | `boolean` | No | — | True when Openmart withholds the contact values on this row. business\_phones and business\_emails are then empty. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "total": {
            "type": "integer"
          },
          "encoded_cursor": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "brand_id": {
                  "type": "string"
                },
                "business_name": {
                  "type": "string"
                },
                "business_type": {
                  "type": "string"
                },
                "website_url": {
                  "type": "string"
                },
                "business_emails": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  }
                },
                "business_phones": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  }
                },
                "domain_ident": {
                  "type": "string"
                },
                "num_stores": {
                  "type": "integer"
                },
                "contacts_locked": {
                  "type": "boolean",
                  "description": "True when Openmart withholds the contact values on this row; business_phones and business_emails are then empty."
                }
              },
              "additionalProperties": true
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.13` per pricing unit.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.