> ## 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: Actions/bulk Lookup

> Look up the state Secretary of State registration records of up to 1,000 businesses in one job, such as status and officers.

Look up the state Secretary of State registration records of up to 1,000 businesses in one job, such as status and officers.

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

## 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(
  'opensosdata_bulk_lookup',
  {
    "entities": [
      {
        "entity_name": "Example",
        "state": "AL"
      }
    ]
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute opensosdata_bulk_lookup --input '{
  "entities": [
    {
      "entity_name": "Example",
      "state": "AL"
    }
  ]
}' --json
```

## 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"]}}
{
  "job_id": "job_123",
  "status": "example",
  "total": 123,
  "completed": 123,
  "failed": 123,
  "results": [
    {
      "entity_name": "Example",
      "state": "California",
      "success": true,
      "error": "example"
    }
  ]
}
```

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

## Input reference

Submit up to 1000 Secretary of State lookups in one OpenSOSData job and poll it to completion.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.entities` | `array` | Yes | — | Business entities to look up in one native bulk job. Minimum items: 1. Maximum items: 1000. |
| `payload.source` | `"auto" \| "cache" \| "live"` | No | — | Data source preference for every entity in the job. Allowed: `auto`, `cache`, `live`. |
| `payload.cache_preference` | `"cache_only" \| "cache_first" \| "live_only"` | No | — | Allowed: `cache_only`, `cache_first`, `live_only`. |
| `payload.search_by` | `"debtor" \| "secured_party"` | No | — | Allowed: `debtor`, `secured_party`. |
| `payload.max_results` | `integer` | No | — | Maximum results returned for each submitted entity. Minimum: 1. Maximum: 30. |
| `payload.wait_for_completion` | `boolean` | No | `true` | Wait briefly for terminal results. Set false to return the provider job ID immediately for an explicit follow-up read. |
| `payload.poll_interval_ms` | `integer` | No | `5000` | Minimum: 250. Maximum: 30000. |
| `payload.max_wait_ms` | `integer` | No | `30000` | Maximum synchronous wait. Jobs still running after this return their provider job\_id for an explicit follow-up read. Minimum: 1000. Maximum: 30000. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Submit up to 1000 Secretary of State lookups in one OpenSOSData job and poll it to completion.",
    "properties": {
      "entities": {
        "type": "array",
        "description": "Business entities to look up in one native bulk job.",
        "minItems": 1,
        "maxItems": 1000,
        "items": {
          "type": "object",
          "properties": {
            "entity_name": {
              "type": "string",
              "description": "Business or entity name to look up.",
              "minLength": 2,
              "maxLength": 200
            },
            "state": {
              "type": "string",
              "description": "Two-letter US state code (e.g. 'OH', 'FL').",
              "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
        }
      },
      "source": {
        "type": "string",
        "description": "Data source preference for every entity in the job.",
        "enum": [
          "auto",
          "cache",
          "live"
        ]
      },
      "cache_preference": {
        "type": "string",
        "enum": [
          "cache_only",
          "cache_first",
          "live_only"
        ]
      },
      "search_by": {
        "type": "string",
        "enum": [
          "debtor",
          "secured_party"
        ]
      },
      "max_results": {
        "type": "integer",
        "description": "Maximum results returned for each submitted entity.",
        "minimum": 1,
        "maximum": 30
      },
      "wait_for_completion": {
        "type": "boolean",
        "description": "Wait briefly for terminal results. Set false to return the provider job ID immediately for an explicit follow-up read.",
        "default": true
      },
      "poll_interval_ms": {
        "type": "integer",
        "default": 5000,
        "minimum": 250,
        "maximum": 30000
      },
      "max_wait_ms": {
        "type": "integer",
        "description": "Maximum synchronous wait. Jobs still running after this return their provider job_id for an explicit follow-up read.",
        "default": 30000,
        "minimum": 1000,
        "maximum": 30000
      }
    },
    "required": [
      "entities"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.job_id` | `string` | Yes | — | — |
| `result.status` | `string` | Yes | — | — |
| `result.total` | `integer` | Yes | — | — |
| `result.completed` | `integer` | Yes | — | — |
| `result.failed` | `integer` | Yes | — | — |
| `result.results` | `array` | Yes | — | — |
| `result.results[].entity_name` | `string` | Yes | — | — |
| `result.results[].state` | `string` | Yes | — | — |
| `result.results[].success` | `boolean` | Yes | — | — |
| `result.results[].data` | `object` | Yes | — | — |
| `result.results[].data.entityName` | `string` | Yes | — | — |
| `result.results[].data.entityType` | `string` | Yes | — | — |
| `result.results[].data.entityId` | `string` | Yes | — | — |
| `result.results[].data.status` | `string` | Yes | — | — |
| `result.results[].data.officers` | `array` | Yes | — | — |
| `result.results[].error` | `string` | Yes | — | — |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "job_id": {
        "type": "string"
      },
      "status": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      },
      "completed": {
        "type": "integer"
      },
      "failed": {
        "type": "integer"
      },
      "results": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "entity_name": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "success": {
                  "type": "boolean"
                },
                "data": {
                  "type": "object",
                  "properties": {
                    "entityName": {
                      "type": "string"
                    },
                    "entityType": {
                      "type": "string"
                    },
                    "entityId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "officers": {
                      "type": "array",
                      "items": {}
                    }
                  },
                  "required": [
                    "entityName",
                    "entityType",
                    "entityId",
                    "status",
                    "officers"
                  ],
                  "additionalProperties": true
                }
              },
              "required": [
                "entity_name",
                "state",
                "success",
                "data"
              ],
              "additionalProperties": true
            },
            {
              "type": "object",
              "properties": {
                "entity_name": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "entity_name",
                "state",
                "success",
                "error"
              ],
              "additionalProperties": true
            }
          ]
        }
      }
    },
    "required": [
      "job_id",
      "status",
      "total",
      "completed",
      "failed",
      "results"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Deepline cost

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

## Related documentation

* [Opensosdata provider guide](https://deepline.com/docs/providers/opensosdata/guide.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.