> ## 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: Inputs, Cost & CLI Example

> Search one row per brand/company instead of one row per physical store. Includes inputs, outputs, costs, and Deepline CLI examples for GTM automation.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=openmart_search_brands:{}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                     | Type      | Required | Default | Description |
| ------------------------ | --------- | -------- | ------- | ----------- |
| `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={null}
  {
    "type": "object",
    "description": "Brand-level search returning one row per brand/company.",
    "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 Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `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": {
          "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"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute openmart_search_brands --payload '{}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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