{
  "openapi": "3.0.1",
  "info": {
    "title": "Companies House Scraper: New UK Companies, Directors & PSCs",
    "description": "Newly incorporated UK companies daily, with directors and owners (PSCs), by industry, town and postcode; or any UK company, those with overdue accounts and statements, or companies by number, checked live on Companies House. New-company alerts. $3 per 1,000.",
    "version": "0.1",
    "x-build-id": "QLqbF11QeYJxRl3Wq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pikoulas~companies-house-deadlines/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pikoulas-companies-house-deadlines",
        "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/pikoulas~companies-house-deadlines/runs": {
      "post": {
        "operationId": "runs-sync-pikoulas-companies-house-deadlines",
        "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/pikoulas~companies-house-deadlines/run-sync": {
      "post": {
        "operationId": "run-sync-pikoulas-companies-house-deadlines",
        "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": {
          "find": {
            "title": "Find",
            "enum": [
              "new-companies",
              "overdue",
              "due-soon",
              "all"
            ],
            "type": "string",
            "description": "New companies: those incorporated in the last days (Incorporated from and to; the last 7 days unless given, 92 at most), newest first, before the monthly file has them. Overdue and Due soon: companies by their accounts and confirmation statement deadlines. All: every live company matching the filters, from Companies House's monthly file.",
            "default": "new-companies"
          },
          "companyNumbers": {
            "title": "Company numbers",
            "type": "array",
            "description": "Or look up these companies, one number a line (00445790, SC123456, OC301540), each read off its Companies House page; the filters don't apply.",
            "items": {
              "type": "string"
            }
          },
          "filings": {
            "title": "Filings",
            "type": "array",
            "description": "For Overdue and Due soon: the deadlines to look at, annual accounts, confirmation statements or both (a company matches on either).",
            "items": {
              "type": "string",
              "enum": [
                "accounts",
                "confirmation-statement"
              ],
              "enumTitles": [
                "Accounts",
                "Confirmation statement"
              ]
            },
            "default": [
              "accounts",
              "confirmation-statement"
            ]
          },
          "dueWithinDays": {
            "title": "Due within (days)",
            "minimum": 0,
            "maximum": 400,
            "type": "integer",
            "description": "For Due soon: filings due in the next this many days.",
            "default": 30
          },
          "minDaysOverdue": {
            "title": "At least days overdue",
            "minimum": 0,
            "type": "integer",
            "description": "For Overdue: only filings at least this many days late."
          },
          "maxDaysOverdue": {
            "title": "At most days overdue",
            "minimum": 0,
            "type": "integer",
            "description": "For Overdue: only filings at most this many days late (30 for companies that just missed theirs)."
          },
          "postcodes": {
            "title": "Postcodes",
            "type": "array",
            "description": "Registered office postcodes, one a line: an area (M, SW), a district (M1, SW1A, EC2) or a full postcode. Empty for all of the UK.",
            "items": {
              "type": "string"
            }
          },
          "towns": {
            "title": "Post towns",
            "type": "array",
            "description": "Registered office post towns, one a line (London, Manchester, Leeds). Empty for all.",
            "items": {
              "type": "string"
            }
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "Industries by SIC code or its start, one a line: 62 for IT, 56101 for restaurants, 41 for building. Empty for all.",
            "items": {
              "type": "string"
            }
          },
          "companyTypes": {
            "title": "Company types",
            "type": "array",
            "description": "Empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "private-limited",
                "guarantee",
                "plc",
                "llp",
                "limited-partnership",
                "cic",
                "charity",
                "overseas-entity",
                "other"
              ],
              "enumTitles": [
                "Private limited (Ltd)",
                "Limited by guarantee",
                "Public limited (PLC)",
                "LLP",
                "Limited partnership",
                "Community interest company",
                "Charitable incorporated organisation",
                "Overseas entity",
                "Other"
              ]
            }
          },
          "accountsTypes": {
            "title": "Accounts types",
            "type": "array",
            "description": "The kind of accounts the company last filed, which says its size. Empty for all. New companies have none filed yet.",
            "items": {
              "type": "string",
              "enum": [
                "micro-entity",
                "total-exemption",
                "abridged",
                "small",
                "medium",
                "full",
                "group",
                "dormant",
                "subsidiary",
                "none-filed",
                "other"
              ],
              "enumTitles": [
                "Micro-entity",
                "Total exemption",
                "Abridged",
                "Small",
                "Medium",
                "Full",
                "Group",
                "Dormant",
                "Subsidiary exemption",
                "None filed yet (new companies)",
                "Other"
              ]
            }
          },
          "incorporatedAfter": {
            "title": "Incorporated from",
            "type": "string",
            "description": "Only companies incorporated on or after this date, YYYY-MM-DD. For New companies, the first day searched (a week ago unless given)."
          },
          "incorporatedBefore": {
            "title": "Incorporated to",
            "type": "string",
            "description": "Only companies incorporated on or before this date. For New companies, the last day searched (today unless given)."
          },
          "includeStrikeOff": {
            "title": "Include proposals to strike off",
            "type": "boolean",
            "description": "Companies Companies House has given notice of striking off, often for the very filings overdue.",
            "default": true
          },
          "checkCurrent": {
            "title": "Check each company live",
            "type": "boolean",
            "description": "Read each company's Companies House page for its deadlines, full address and industry as of today; the monthly file is up to a month old and most overdue companies file within weeks. Off is faster, with the file's (or the search's) data.",
            "default": true
          },
          "includeDirectors": {
            "title": "Include directors",
            "type": "boolean",
            "description": "The current directors and secretaries of each company, with their role, appointment date, nationality and country of residence; an address only for an officer that is a company.",
            "default": false
          },
          "includeOwners": {
            "title": "Include owners (PSCs)",
            "type": "boolean",
            "description": "The persons with significant control of each company, people or companies, with their nature of control (shares, voting rights, the right to appoint directors), nationality and the date notified; an address only for an owner that is a company.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops after this many companies.",
            "default": 1000
          },
          "trackChanges": {
            "title": "New only (alerts)",
            "type": "boolean",
            "description": "Give only companies this memory hasn't given before, or has given with other due dates (filed, then late again). Schedule it daily for new-company or overdue-filing alerts; the first run gives everything, as a baseline. Companies left out aren't charged.",
            "default": false
          },
          "memory": {
            "title": "Memory name",
            "type": "string",
            "description": "With New only: a name per alert (a search of its own), kept in your key-value store companies-house-memory. A company unseen for 60 days is forgotten.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: Companies House answers without one. Datacenter IPs cost nothing extra; residential ones are charged per 100 KB fetched (the company data file is always downloaded without a proxy).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}