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

# Opensosdata Business Lookup: Inputs, Cost & CLI Example

> Find the registered officer name for a business entity using its state SOS record. Includes inputs, outputs, costs, and Deepline CLI examples.

## 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=opensosdata_business_lookup:{"entity_name":"{{entity_name}}","state":"AL"}' --json
```

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

## Input Schema

| Name                  | Type                                                                                                                                                                                                                                                                                                                                                                                                                           | Required | Default | Description                                                                                                                                                                                                                                          |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.entity_name` | `string`                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes      |         | Business or restaurant name to look up (e.g. 'Noble Beast Brewing'). Fuzzy matching is applied by OpenSOSData.                                                                                                                                       |
| `payload.state`       | `"AL" \| "AK" \| "AZ" \| "AR" \| "CA" \| "CO" \| "CT" \| "DE" \| "FL" \| "GA" \| "HI" \| "ID" \| "IL" \| "IN" \| "IA" \| "KS" \| "KY" \| "LA" \| "ME" \| "MD" \| "MA" \| "MI" \| "MN" \| "MS" \| "MO" \| "MT" \| "NE" \| "NV" \| "NH" \| "NJ" \| "NM" \| "NY" \| "NC" \| "ND" \| "OH" \| "OK" \| "OR" \| "PA" \| "RI" \| "SC" \| "SD" \| "TN" \| "TX" \| "UT" \| "VT" \| "VA" \| "WA" \| "WV" \| "WI" \| "WY" \| "DC" \| "PR"` | Yes      |         | Two-letter US state code (e.g. 'OH', 'FL'). All currently active OpenSOSData jurisdictions are supported. Note: OH, CA, MI, WA do NOT expose officer names in their SOS records. The entity is found but officers\[] will be empty for these states. |

### Allowed values

| Field           | Allowed values                                                                                                                                                                                                                                                                                                         |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.state` | `AL`, `AK`, `AZ`, `AR`, `CA`, `CO`, `CT`, `DE`, `FL`, `GA`, `HI`, `ID`, `IL`, `IN`, `IA`, `KS`, `KY`, `LA`, `ME`, `MD`, `MA`, `MI`, `MN`, `MS`, `MO`, `MT`, `NE`, `NV`, `NH`, `NJ`, `NM`, `NY`, `NC`, `ND`, `OH`, `OK`, `OR`, `PA`, `RI`, `SC`, `SD`, `TN`, `TX`, `UT`, `VT`, `VA`, `WA`, `WV`, `WI`, `WY`, `DC`, `PR` |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Look up a registered business entity and its officers/registered agent via OpenSOSData. Covers the currently active OpenSOSData jurisdictions. CA, MA, NV, OR, WA require async polling (handled automatically). FL officer names are returned as 'LASTNAME, FIRSTNAME'; use reverseOfficerName() to fix. OH/CA/MI/WA find the entity but return empty officers[].",
    "properties": {
      "entity_name": {
        "type": "string",
        "description": "Business or restaurant name to look up (e.g. 'Noble Beast Brewing'). Fuzzy matching is applied by OpenSOSData.",
        "minLength": 2,
        "maxLength": 200
      },
      "state": {
        "type": "string",
        "description": "Two-letter US state code (e.g. 'OH', 'FL'). All currently active OpenSOSData jurisdictions are supported. Note: OH, CA, MI, WA do NOT expose officer names in their SOS records. The entity is found but officers[] will be empty for these states.",
        "enum": [
          "AL",
          "AK",
          "AZ",
          "AR",
          "CA",
          "CO",
          "CT",
          "DE",
          "FL",
          "GA",
          "HI",
          "ID",
          "IL",
          "IN",
          "IA",
          "KS",
          "KY",
          "LA",
          "ME",
          "MD",
          "MA",
          "MI",
          "MN",
          "MS",
          "MO",
          "MT",
          "NE",
          "NV",
          "NH",
          "NJ",
          "NM",
          "NY",
          "NC",
          "ND",
          "OH",
          "OK",
          "OR",
          "PA",
          "RI",
          "SC",
          "SD",
          "TN",
          "TX",
          "UT",
          "VT",
          "VA",
          "WA",
          "WV",
          "WI",
          "WY",
          "DC",
          "PR"
        ]
      }
    },
    "required": [
      "entity_name",
      "state"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name                           | Type      | Required | Default | Description |
| ------------------------------ | --------- | -------- | ------- | ----------- |
| `result.success`               | `boolean` | Yes      |         |             |
| `result.data`                  | `object`  | Yes      |         |             |
| `result.state_scraper_version` | `string`  | Yes      |         |             |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "success": {
        "type": "boolean"
      },
      "data": {
        "type": "object",
        "properties": {
          "entityName": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "formationDate": {
            "type": "string"
          },
          "registeredAgentName": {
            "type": "string"
          },
          "registeredAgentAddress": {
            "type": "string"
          },
          "registeredAgentCity": {
            "type": "string"
          },
          "registeredAgentState": {
            "type": "string"
          },
          "registeredAgentZip": {
            "type": "string"
          },
          "officers": {
            "type": "array",
            "items": {}
          },
          "sosUrl": {
            "type": "string"
          },
          "scrapedAt": {
            "type": "string"
          }
        },
        "required": [
          "entityName",
          "entityType",
          "entityId",
          "status",
          "formationDate",
          "registeredAgentName",
          "registeredAgentAddress",
          "registeredAgentCity",
          "registeredAgentState",
          "registeredAgentZip",
          "officers",
          "sosUrl",
          "scrapedAt"
        ],
        "additionalProperties": true
      },
      "state_scraper_version": {
        "type": "string"
      }
    },
    "required": [
      "success",
      "data",
      "state_scraper_version"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute opensosdata_business_lookup --payload '{
  "entity_name": "string",
  "state": "AL"
}' --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.44` per pricing unit.
* Billing mode: `post_deduct`.
