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

# Use Opensosdata in Deepline

> Use opensosdata_business_lookup to find business officer names from SOS records across currently active OpenSOSData jurisdictions.

[Human guide: work with your agent →](https://deepline.com/docs/human/providers/opensosdata/guide.md)
Inspect one Opensosdata action before starting provider-backed work. Your first result is a verified input and output contract.

## Provider-specific requirements

US Secretary of State business entity lookup across currently active OpenSOSData jurisdictions.

### When to use

Use `opensosdata_business_lookup` to find the registered officer name for a business entity.
This is the bridge between "I have a restaurant name" and "I have an owner name to skip-trace."

Typical flow:

1. `opensosdata_business_lookup` → get officer name from SOS
2. `enformion_contact_enrich` → get mobile phone from officer name + city/state

### State-by-state officer data coverage

| Coverage | States | Notes |
| - | - | - |
| **Full** (name + address + title) | FL, TX (franchise tax), CO, PA, MN, NY, WI, KY, SC, RI | FL is best — full officer list with addresses |
| **Name only** | IL, IN, TN, CT, MA, GA, NV, ND, AL, AR, IA, MO | |
| **Entity found, no officers** | OH, CA, MI, WA, NJ | SOS shields member names — use other methods |

### Critical gotchas

#### 1. FL officer name format — ALWAYS reverse

FL SOS returns `"LASTNAME, FIRSTNAME MIDDLE"`. Use `reverseOfficerName()` from `opensosdata-shared.ts`:

* `"SMITH, JOHN EDWARD"` → `"John Smith"`
* `"DE LA CRUZ, MARIA"` → `"Maria De La Cruz"`

Other states that use this format: LA, SC, sometimes GA.

#### 2. Async states (CA, MA, NV, OR, WA)

These states return HTTP 202 with a `jobId`. The action **automatically polls** every 3 seconds
until complete (up to 90s). No special handling needed by the caller.

#### Native bulk jobs

`opensosdata_bulk_lookup` submits up to 1,000 entities in one provider request.
It waits at most 30 seconds, then returns the provider-issued `job_id` for
`opensosdata_get_bulk_result`. Calls to `opensosdata_business_lookup` inside a
dataset map compile into native jobs of up to 256 entities. Keep using the
scalar tool for row-wise play code. call the bulk operation directly only when
you already have an entity array.

After OpenSOSData accepts a bulk job, Deepline never retries the POST. Polling
timeouts and transport failures return that `job_id`. The result cache never
stores or resumes the job. callers can make the explicit status/result call.
Billing separately tracks accepted provider work until terminal usage is known.

#### 3. Skip registered agent services

Filter officer names containing: "Corporation Service", "CT Corporation", "Incorp",
"Northwest Registered", "Statutory Agent". These are professional RA services, not people.
Use `isRegisteredAgentService()` from `opensosdata-shared.ts`.

#### 4. Balance monitoring

Each lookup costs Deepline credits. Check remaining balance before large batch runs.
Check balance: `GET /v1/account/balance` → `lookupsRemaining`.
Topup URL: [https://app.opensosdata.com#billing](https://app.opensosdata.com#billing)

### Response structure

Synchronous (most states):

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "success": true,
  "data": {
    "entityName": "NOBLE BEAST BREWING LLC",
    "entityType": "LLC",
    "entityId": "2441200",
    "status": "Active",
    "formationDate": "10/28/2015",
    "registeredAgentName": "",
    "officers": [],
    "sosUrl": "https://businesssearch.ohiosos.gov/...",
    "scrapedAt": "2026-05-31T..."
  }
}
```

FL with full officers:

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "success": true,
  "data": {
    "entityName": "CASTAWAYS RIVER TIKI BAR LLC",
    "officers": [
      { "name": "SWANSON, KIRK ALAN", "title": "MGR", "address": "..." }
    ]
  }
}
```

→ Reverse: `reverseOfficerName("SWANSON, KIRK ALAN")` = `"Kirk Swanson"`

Async (CA/MA/NV/OR/WA) — handled automatically, caller receives final result.

Not found (no charge):

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{ "success": false, "error": "Entity not found", "cost": 0 }
```

### Credentials

Single API key passed as `x-api-key` header.
Set via Deepline dashboard → Integrations → OpenSOSData, or `OPENSOSDATA_API_KEY` env var.

API endpoint: `https://api.opensosdata.com/v1/lookup`

## Find an applicable action

Confirm your effective workspace, then search the live catalog:

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline auth status --json
deepline search "Opensosdata" --type tools --json
```

Search returns candidates. Check the returned provider and operation rather than selecting a similar title automatically.

## Inspect the selected contract

Replace `<returned-tool-id>` with the identifier returned by discovery:

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline describe <returned-tool-id> --json
```

These commands do not execute the selected provider action. Read its required inputs, supported access mode, pricing unit, outputs, and limits.

A connection does not establish that every action supports BYOK. Follow the provider-specific requirements above and the live action contract.

## Prepare one reviewed input

Use one authorized record that matches the inspected schema. Preserve its source identity and define the result you will accept.

Open the action reference for its payload and response shape. Provider-backed execution can incur usage or external effects.

For reusable logic, follow [Write Plays](https://deepline.com/docs/sdk-v2/plays.md). For direct-call recovery, use [Tool execution recovery](https://deepline.com/docs/sdk-v2/tool-execution-recovery.md).

> [!TIP]
>
> Continue only when the workspace, provider, required fields, acceptance rule, and applicable price are understood. Keep unavailable access separate from no-result evidence.


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