> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lendflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCorporates Company Search

## OpenCorporates Company Search

OpenCorporates Company Search searches the global company register by business legal name and returns candidate registry records. Use a candidate's jurisdiction code and company number if you later run the separate OpenCorporates Company Details service. The Workflow Builder block is `OpenCorporates`, and its service ID is `opencorporates_company_search`.

## Requirements

| Application field | Requirement | Notes |
| - | - | - |
| Business legal name | Required | Must be a string. |
| Formation state | Optional | When it resolves to a US state, the search is limited to that state. When absent or unresolved, the search runs without a jurisdiction filter. |

Lendflow always orders the provider search by score. No company number or jurisdiction code is required for this search operation.

## API flow

1. Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application).
2. Set `provider` to `opencorporates_company_search`. This service has no provider-specific request options.
3. Optionally include `stage_id`; when supplied, it must be a valid underwriting workflow-stage UUID for the application.
4. Treat `{"data":{"onqueue":true}}` as queue acceptance, not a completed search.
5. Poll [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with `services[]=opencorporates_company_search`.

```json theme={"system"}
{
  "provider": "opencorporates_company_search",
  "stage_id": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
}
```

| Data | API response path |
| - | - |
| Stored provider response | `commercial_data.opencorporates.company_search` |
| Lifecycle message | `statuses.opencorporates.company_search` |
| Stored request | `request_data.opencorporates.company_search` |

The API queues a background job. The provider GET request completes inside that job, and Lendflow stores the query parameters after obfuscating the API token, the provider response, and the HTTP status.

## Data Orchestration availability and flow

OpenCorporates Company Search is not included in the current Data Orchestration service catalog. The Workflow Builder block can display and run the service in an underwriting workflow, but a Data Orchestration template cannot select OpenCorporates Company Search as a service step.

## What the service returns

| Response area | Meaning |
| - | - |
| `results.companies` | Candidate registry records, each wrapped in a `company` object. |
| Company identity | Name, company number, and jurisdiction code used to identify the registry record. |
| Company status | Incorporation and dissolution dates, entity type, inactive flag, and current registry status when available. |
| Source and links | Registry and OpenCorporates links plus source metadata when supplied. |
| Pagination | Current page, page size, total pages, and total candidate count. |

## Representative response

```json theme={"system"}
{
  "api_version": "0.4",
  "results": {
    "companies": [
      {
        "company": {
          "name": "EXAMPLE BUSINESS LLC",
          "company_number": "3677166",
          "jurisdiction_code": "us_de",
          "incorporation_date": "2019-01-01",
          "dissolution_date": null,
          "company_type": "Limited Liability Company",
          "inactive": false,
          "current_status": "Good Standing",
          "registered_address_in_full": "100 Main Street, Wilmington, DE 19801",
          "opencorporates_url": "https://opencorporates.com/companies/us_de/3677166"
        }
      }
    ],
    "page": 1,
    "per_page": 30,
    "total_pages": 1,
    "total_count": 1
  }
}
```

## Response attributes

| Attribute | Type | Meaning | Possible values or units | When returned |
| - | - | - | - | - |
| `api_version` | String | OpenCorporates response API version. | Provider version text. | On the current provider response. |
| `results.companies` | Array | Candidate registry records. | Zero or more `{ company }` wrappers. | On a successful search. |
| `results.companies[].company.name` | String | Company name on the registry record. | Registry text. | For each candidate. |
| `results.companies[].company.company_number` | String | Company identifier within the jurisdiction. | Registry identifier; preserve leading zeroes. | For each candidate. |
| `results.companies[].company.jurisdiction_code` | String | OpenCorporates registry jurisdiction. | Country or country-subdivision code such as `us_de`. | For each candidate. |
| `results.companies[].company.incorporation_date` | String or null | Reported incorporation date. | `YYYY-MM-DD` or `null`. | When available. |
| `results.companies[].company.dissolution_date` | String or null | Reported dissolution date. | `YYYY-MM-DD` or `null`. | When available. |
| `results.companies[].company.company_type` | String or null | Registry entity type. | Registry-controlled text or `null`. | When available. |
| `results.companies[].company.inactive` | Boolean or null | Whether OpenCorporates marks the company inactive. | `true`, `false`, or `null` when unavailable. | When supplied. |
| `results.companies[].company.current_status` | String or null | Current registry status. | Registry-controlled text or `null`. | When available. |
| `results.companies[].company.registered_address_in_full` | String or null | Provider-formatted registered address. | Address text or `null`. | When available. |
| `results.companies[].company.opencorporates_url` | String or null | Link to the OpenCorporates company page. | HTTPS URL or `null`. | When available. |
| `results.page`, `results.per_page`, `results.total_pages`, `results.total_count` | Number | Provider pagination and result totals. | Non-negative integers; page values are normally positive. | On the current search response. |

The provider can return additional company and source fields beyond this representative example. Those fields remain raw OpenCorporates data unless Lendflow documents them separately.

## Errors and statuses

* Missing `business_legal_name` fails validation before the provider request.
* Missing or unresolved `formation_state` does not fail the search; Lendflow omits `jurisdiction_code`.
* An inactive or invalid API token, provider HTTP failure, or unavailable integration causes the queued job to fail.
* A successful response with `results.companies: []` means no company matched. It is not a transport failure.
* `Success` means Lendflow stored the search response. It does not verify the selected company or retrieve full KYB details.

## FAQ

<AccordionGroup>
  <Accordion title="Is formation state required?">
    No. When Lendflow can resolve it, the state narrows the search to a U.S. jurisdiction. Otherwise, the request runs without a jurisdiction filter.
  </Accordion>

  <Accordion title="Does Company Search return full KYB details?">
    No. It returns candidate registry records. Use the selected `jurisdiction_code` and `company_number` with the separate OpenCorporates Company Details service for the full record.
  </Accordion>

  <Accordion title="Can this service run in Data Orchestration?">
    No. It is not in the current Data Orchestration service catalog.
  </Accordion>

  <Accordion title="What does an empty companies array mean?">
    It means the provider request succeeded but returned no candidate companies for the search.
  </Accordion>
</AccordionGroup>
