{
  "openapi": "3.0.1",
  "info": {
    "title": "OpenCorporates Real-Time Data | Leads & Contacts",
    "description": "Stream live company data from 140+ registers to your dataset. Search by name, then pull full profiles, officers & directors, ownership and control records, filing history, and contact details. Enable only the features you need — rows land in real time, with webhooks. Free plan: 2 results per run.",
    "version": "0.0",
    "x-build-id": "pzLkzjBuWXcdVexkm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~OpenCorporates-Real-Time-Data-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-OpenCorporates-Real-Time-Data-Scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/b2b_leads~OpenCorporates-Real-Time-Data-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-OpenCorporates-Real-Time-Data-Scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/b2b_leads~OpenCorporates-Real-Time-Data-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-OpenCorporates-Real-Time-Data-Scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "enableCompanySearch": {
            "title": "Company Search",
            "type": "boolean",
            "description": "Live company search across 140+ jurisdictions — company names, previous names, and registration numbers. On by default and prefilled so you can click Start and get results in seconds.",
            "default": true
          },
          "searchKeywords": {
            "title": "Company names or keywords",
            "type": "array",
            "description": "One search per entry — company names or keywords, e.g. \"monzo\", \"tesco\", \"solar panels\". Required when Company Search is on.",
            "default": [
              "monzo",
              "tesla"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchMaxResults": {
            "title": "Max companies per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum company rows to collect for each entry above (1–500). Default 10 — perfect for instant demo runs.",
            "default": 10
          },
          "searchFetchFullDetails": {
            "title": "Enrich with full company details",
            "type": "boolean",
            "description": "When on, each search result stays ONE row (featureType company_search, detailsFetched=true) but is enriched in place with the full company profile: legal type, status, registered address, industry codes, previous names, branches, officer and owner counts, and every other public fact the jurisdiction publishes. Adds a little extra time per company. When off, you get fast cards with name, number, jurisdiction, status, address, and previous names. Every discovered company is always saved — never filtered out.",
            "default": false
          },
          "searchJurisdiction": {
            "title": "Jurisdiction",
            "type": "string",
            "description": "Optional. Restrict results to one register using its jurisdiction code, e.g. \"gb\" (United Kingdom), \"us_de\" (Delaware), \"ca_bc\" (British Columbia), \"de\" (Germany), \"br\" (Brazil). Leave empty to search every jurisdiction.",
            "default": ""
          },
          "searchCompanyType": {
            "title": "Company type",
            "type": "string",
            "description": "Optional. Only companies of this legal type, exactly as the register names it — e.g. \"Private Limited Company\", \"Public Limited Company\", \"Limited Liability Company\", \"Corporation\".",
            "default": ""
          },
          "searchStatus": {
            "title": "Company status",
            "enum": [
              "all",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Optional. Return every company, or only active / inactive ones.",
            "default": "all"
          },
          "searchSort": {
            "title": "Result order",
            "enum": [
              "name",
              "oldest",
              "newest"
            ],
            "type": "string",
            "description": "Optional. How results are ordered: alphabetical by name, or by incorporation date.",
            "default": "name"
          },
          "enableOfficerSearch": {
            "title": "People & Officers",
            "type": "boolean",
            "description": "Search directors, officers, and other registered persons by name and get every company appointment attached to them — role, company, jurisdiction, and appointment dates. This is the fastest way to map who runs a business before you approach it.",
            "default": false
          },
          "officerKeywords": {
            "title": "Person names or surnames",
            "type": "array",
            "description": "One search per entry — a full name or surname, e.g. \"Piracha\", \"Smith\". Required when People & Officers is on.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "officerMaxResults": {
            "title": "Max people per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum people rows to collect for each entry above (1–500).",
            "default": 10
          },
          "officerJurisdiction": {
            "title": "Jurisdiction",
            "type": "string",
            "description": "Optional. Restrict people search to one register using its jurisdiction code, e.g. \"gb\" or \"us_mi\".",
            "default": ""
          },
          "officerStatus": {
            "title": "Appointment status",
            "enum": [
              "all",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Optional. Every appointment, or only current / former ones.",
            "default": "all"
          },
          "enableCompanyDetails": {
            "title": "Company Details",
            "type": "boolean",
            "description": "Full public profile for each company in the shared company list below: legal type, status, registered address, industry codes, previous names, branches, officer and owner counts, plus any jurisdiction-specific facts that register publishes (agent, latest accounts date, other identifiers).",
            "default": false
          },
          "companyRefs": {
            "title": "Companies",
            "type": "array",
            "description": "Company page links from OpenCorporates (e.g. https://opencorporates.com/companies/gb/00445790) or jurisdiction/number pairs (e.g. gb/00445790). Required when Company Details, Filings, or Ownership & Control is on.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enableFilings": {
            "title": "Filings",
            "type": "boolean",
            "description": "One row per document a company has filed: filing date, title, and description, newest first, with a link to the public record. Ideal for watching what a company is doing — new share issues, name changes, strike-off notices, annual returns.",
            "default": false
          },
          "filingsMaxPerCompany": {
            "title": "Max filings per company",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum filing rows to collect for each company (1–500), newest first.",
            "default": 10
          },
          "enableOwnership": {
            "title": "Ownership & Control",
            "type": "boolean",
            "description": "One row per published control record for each company: who owns or controls it, the control mechanisms behind that claim (share ownership, voting rights, right to appoint directors) with their percentage ranges, the owner's nationality and country of residence where published, and the ultimate-beneficial-owner flag.",
            "default": false
          },
          "ownershipMaxPerCompany": {
            "title": "Max control records per company",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum ownership rows to collect for each company (1–500).",
            "default": 10
          },
          "enableLeadDetails": {
            "title": "Lead details enrich",
            "type": "boolean",
            "description": "Add publicly available contact details to each company row — website, email, phone, and social profiles — when they can be found. Everything is ADDED to the row; companies with no findable details are still exported, so run cost and timing stay predictable. A site is only reported when its domain carries the company's own name, and only when it yields a usable contact, so a row never points at a directory or an unrelated site. Adds a little extra time per company.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Every record is always saved to the run dataset — this webhook is an ADDITIONAL real-time push. Each new row is also POSTed to this URL (CRM, Slack, Zapier, Make, n8n, Google Sheets).",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack"
            ],
            "type": "string",
            "description": "json = full record object; slack = Slack-friendly message payload.",
            "default": "json"
          },
          "enableScrapeByUrl": {
            "title": "Scrape By URL",
            "type": "boolean",
            "description": "Paste any company, person, or ownership record link from OpenCorporates and get a structured row back — ideal for refreshing a list you already track. The kind of row is detected from the link itself, so one list can mix all three.",
            "default": false
          },
          "scrapeUrls": {
            "title": "Record links",
            "type": "array",
            "description": "Company page, person, or ownership record links from OpenCorporates, e.g. https://opencorporates.com/companies/gb/00445790.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Residential connections are used by default for reliable results at scale. Change here only if you need custom proxy URLs or a different egress country.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}