# OpenCorporates Entity Search (`bovi/opencorporates-scraper`) Actor

Search public OpenCorporates company suggestions by name and collect each entity's identifier, jurisdiction, legal form, status, registration date, address, and profile URL.

- **URL**: https://apify.com/bovi/opencorporates-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 opencorporates entity searches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## OpenCorporates Entity Search Scraper

OpenCorporates Entity Search extracts public company suggestions by name prefix and writes matched legal entities with source profile URLs to an Apify dataset. No buyer API key or login is required; on the Free Apify plan, a run searches 1 query only and reads 1 result page (up to 10 rows).

- Search company names or prefixes and collect results across one or more queries.
- Check each returned entity through its public OpenCorporates profile URL.
- Add status, registration date, and registered address when the public reconciliation flyout provides them.
- Build company-name research lists for registry and open-data workflows.
- Run through the default Apify RESIDENTIAL proxy.

### What you get

Each dataset row represents a matched OpenCorporates entity. The core identifiers and profile URL come from the public reconciliation suggestion response. Flyout attributes are added only when OpenCorporates publishes a value. `entity_type`, `status`, `registered_date`, and `registered_address` are absent from the row when the source does not provide them.

| Field | Type | What it contains | Availability |
|---|---|---|---|
| `query` | string | Company name or prefix submitted for the record | Included with each row |
| `entity_id` | string | OpenCorporates company path, such as `/companies/gb/07444723` | Included with each valid match |
| `entity_name` | string | Company name returned by the reconciliation search | Included with each valid match |
| `jurisdiction_code` | string | Jurisdiction segment from the company path | Included with each valid match |
| `company_number` | string | Company number from the company path | Included with each valid match |
| `entity_type` | string | Legal form returned for the company | When available |
| `company_url` | string | Public OpenCorporates profile URL | Included with each valid match |
| `status` | string | Company status from the public reconciliation flyout | When available |
| `registered_date` | string | Registration date from the public reconciliation flyout | When available |
| `registered_address` | string | Registered address from the public reconciliation flyout | When available |

The `company_url` lets you check each result at its OpenCorporates source.

### Sample output

One row for the query `Apple`; the optional flyout fields are present because the public flyout listed them.

```json
{
  "query": "Apple",
  "entity_id": "/companies/dk/44222558",
  "entity_name": "Apple",
  "jurisdiction_code": "dk",
  "company_number": "44222558",
  "company_url": "https://opencorporates.com/companies/dk/44222558",
  "entity_type": "Enkeltmandsvirksomhed",
  "status": "Aktiv",
  "registered_date": "2023-08-14",
  "registered_address": "Sølystvej 1, Klampenborg, 2930"
}
```

### Pricing

The live billing model is **pay per event**. The listed event prices are:

| Charge event | When it is charged | Free Apify plan price |
|---|---|---|
| `apify-actor-start` | When the Actor starts running; the number of events depends on Actor memory, with a minimum of one event | $0.00005 per event on the Free Apify plan |
| `apify-default-dataset-item` | One scraped result with all fields | $0.001 per event on the Free Apify plan |

At the Free Apify plan price, 1,000 `apify-actor-start` events cost 1,000 × $0.00005 = $0.05, and 10,000 events cost 10,000 × $0.00005 = $0.5. At the Free Apify plan price, 1,000 `apify-default-dataset-item` events cost 1,000 × $0.001 = $1, and 10,000 events cost 10,000 × $0.001 = $10.

At the default 512 MB, a run is charged one start event. Each dataset row is one `apify-default-dataset-item` event, and each run is charged its own start event. The Actor Start event is separate from result events.

**Worked example:** a Free-plan run of 10 results costs 10 × $0.001 + $0.00005 = $0.01005.

The Apify Free plan includes $5 of monthly platform usage credit, which covers 4,999 result events after one start event at the Free-plan prices. A Free-plan run still stops after 1 query and 1 result page; on paid plans, `maxResults` sets the maximum total rows for a run.

You pay only for the events listed below. This Actor does not use the Pay per event + usage option, so the platform usage of your runs (compute, proxy traffic and storage) is not billed to you separately.

### How to use

1. **Open** the Actor in Apify and provide your own Apify account.
2. **Enter** one or more company names or prefixes in `searchQueries`.
3. **Set** `maxResults` to the maximum total number of rows you want across all queries, or leave its default of `50`.
4. **Choose** the proxy configuration. Apify RESIDENTIAL is used by default; set `useApifyProxy` to `false` without `proxyUrls` to connect directly.
5. **Run** the Actor. It requests OpenCorporates' on-site reconciliation suggestions in pages of ten, then reads the matching public company flyout for each result.
6. **Review** the dataset fields and follow `company_url` to check a result at its public OpenCorporates profile.
7. **Repeat** the run through Apify Schedules, starting weekly or monthly for this registry-style job.

Example input:

```json
{"searchQueries": ["Apple"], "maxResults": 10, "proxyConfiguration": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}}
```

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

### Input parameters

| Parameter | What it does | Default |
|---|---|---|
| `searchQueries` | Required list of company names or prefixes to search on OpenCorporates. Enter at least one non-empty value. Accepts 1–100 string values; blank strings are dropped. | Required |
| `maxResults` | Maximum number of rows to write in total, counted over all queries. Accepts an integer from 1 to 1000. | `50` |
| `proxyConfiguration` | Optional proxy settings. Apify RESIDENTIAL is used by default. When `useApifyProxy` is `false` and no `proxyUrls` are provided, the Actor connects directly; otherwise it uses the supplied configuration. | Apify RESIDENTIAL with `useApifyProxy: true` |

The `searchQueries` example is prefilled with `Apple`. `maxResults` is a total for the run, not a limit per query.

### Limits and edge cases

Each row reaches the dataset as soon as its flyout lookup finishes, and each pushed row is one charged result event. Rows already pushed stay in the dataset if a later request fails, times out, or the run is aborted.

| Condition | What you see | What to do |
|---|---|---|
| `maxResults` is reached | The Actor stops writing rows once the total reaches the requested maximum across all queries. If the run ends at `maxResults` before a Free-plan cap is reached, no Free-plan `OUTPUT` record is written. | Increase `maxResults` for a larger collection, within the accepted input range. |
| A query has more suggestions than one page | Suggestions are paged in groups of ten. The Actor requests later pages while it still needs results and has not reached a stopping condition. | Use a suitable `maxResults` value for the number of rows you need. |
| The same entity appears for more than one query | The Actor skips an entity ID after it has already been seen, so the same entity is not written repeatedly. | Use distinct prefixes when you want each query to produce different entities. |
| A public flyout is missing, fails, or cannot be parsed | The base suggestion can still be written with its available suggestion fields, without the unavailable flyout attributes. A failed flyout does not stop the run. | Use the profile URL to check the entity and rerun if the additional attributes are important. |
| A suggestion response is invalid or has no usable result list | No rows are added from that response, and processing for that query stops at that point. The run continues with the next query. When no rows are found, the run ends normally with the status message `Collected 0 records.` and no `OUTPUT` record. | Check the company name or prefix and run the Actor again. |
| A suggestion request fails after its retries | Source requests are retried up to six times, with a 40-second timeout per attempt and waits of 1, 2, 4, 8, and 16 seconds between attempts. If the suggestion request still fails, the run stops with an error; rows pushed before the failure remain in the dataset. | Review the run log and rerun with the default proxy configuration. |
| A Free-plan run reaches the preview cap | On the Free Apify plan, the run stops after 1 result page of 1 query, up to 10 rows. The run ends normally with the rows already collected, without an error. The status message names the cap, and the `OUTPUT` record in the run's default key-value store includes `free_plan_preview`, `items_returned`, `items_requested`, `limits_applied`, `upgrade_url`, and `message`. No placeholder rows are added to the dataset. | Use a paid Apify plan for the full requested set of pages and queries. |

### FAQ

#### How much does it cost to scrape OpenCorporates company suggestions?

The listed rates are $0.001 per `apify-default-dataset-item` event and $0.00005 per `apify-actor-start` event on the Free Apify plan; see Pricing for the worked example.

#### Why did the Actor return no rows?

A query can produce no rows when OpenCorporates returns no usable suggestion list for that prefix. Check that `searchQueries` contains a company name or prefix, then rerun the Actor. A Free-plan preview can also be limited to 1 query and 1 result page, which are reported in the run status and `OUTPUT` record.

#### Why are status, registration date, or address missing?

Those fields come from the public reconciliation flyout and appear only when the flyout includes them. The Actor omits unavailable attributes instead of adding empty values. Use `company_url` to check the entity at OpenCorporates.

#### Is it legal to use the public OpenCorporates data?

This Actor reads public OpenCorporates company suggestions and public reconciliation flyouts. Whether a particular use is allowed depends on the source terms and applicable law for your use case, so review those requirements before using the extracted data.

### Usage statistics

This Actor creates a small, content-free summary at the end of each run, used only to monitor reliability and improve this Actor. No input values, credentials or scraped data are sent.

A copy of the exact record for your run is saved as `USAGE_STATS` in your own Apify key-value store.

To opt out, set `disableUsageStats` to `true` in the input. Nothing is sent then.

[Full list of collected fields](https://api.apify.com/v2/key-value-stores/v9rgHjMKLDGtHf8tD/records/index.html)

# Actor input Schema

## `searchQueries` (type: `array`):

One or more company names or prefixes to search on OpenCorporates.

## `maxResults` (type: `integer`):

Maximum number of company records to write across all search queries.

## `proxyConfiguration` (type: `object`):

Optional. Apify RESIDENTIAL is used by default. Set useApifyProxy to false to connect directly.

## Actor input object example

```json
{
  "searchQueries": [
    "Apple"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Open the default dataset items.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "Apple"
    ],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/opencorporates-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["Apple"],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/opencorporates-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "Apple"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/opencorporates-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/opencorporates-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/srcr5G9eE97Bfjd1i/builds/myGXZC9MpzPthBDUN/openapi.json
