{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Company Financials: Companies House Accounts",
    "description": "UK companies that just filed accounts at Companies House: employees, net assets, cash, debts, turnover and profit when published, plus SIC sector, address and status. Filter by sector, postcode, town, headcount and net assets; get new filings on a schedule.",
    "version": "0.1",
    "x-build-id": "Q3nztavZoqaGSQpLq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/frenchdatalab~uk-company-financials/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-frenchdatalab-uk-company-financials",
        "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/frenchdatalab~uk-company-financials/runs": {
      "post": {
        "operationId": "runs-sync-frenchdatalab-uk-company-financials",
        "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/frenchdatalab~uk-company-financials/run-sync": {
      "post": {
        "operationId": "run-sync-frenchdatalab-uk-company-financials",
        "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": {
          "filedInLastDays": {
            "title": "Accounts filed in the last N days",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Companies House publishes the accounts filed each working day (Tuesday to Saturday) and keeps them 60 days. 7 = about 50,000 to 150,000 sets of accounts.",
            "default": 7
          },
          "minEmployees": {
            "title": "Minimum employees",
            "minimum": 0,
            "type": "integer",
            "description": "Average headcount of the year (directors included), published by about 85% of companies."
          },
          "maxEmployees": {
            "title": "Maximum employees",
            "minimum": 0,
            "type": "integer",
            "description": "e.g. 49 for small businesses."
          },
          "minNetAssets": {
            "title": "Minimum net assets (GBP)",
            "type": "integer",
            "description": "Shareholders' funds at the accounts date, e.g. 100000."
          },
          "maxNetAssets": {
            "title": "Maximum net assets (GBP)",
            "type": "integer",
            "description": "Use -1 to list companies with negative net assets (liabilities above assets)."
          },
          "minTurnover": {
            "title": "Minimum turnover (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Only a few % of small companies publish their turnover (most are exempt): this filter keeps those that do."
          },
          "sicCodes": {
            "title": "SIC codes (sector)",
            "type": "array",
            "description": "Prefixes of UK SIC 2007 codes, e.g. \"62\" (IT), \"6201\", \"41\" (construction), \"56\" (restaurants), \"86\" (health).",
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "Registered office postcodes",
            "type": "array",
            "description": "Area (\"M\", \"LS\"), district (\"M1\", \"EC1A\"), sector (\"M1 1\") or full postcode.",
            "items": {
              "type": "string"
            }
          },
          "towns": {
            "title": "Registered office towns",
            "type": "array",
            "description": "Post towns, e.g. \"London\", \"Manchester\", \"Bristol\".",
            "items": {
              "type": "string"
            }
          },
          "incorporatedFrom": {
            "title": "Incorporated on or after",
            "type": "string",
            "description": "YYYY-MM-DD, e.g. young companies only."
          },
          "incorporatedTo": {
            "title": "Incorporated on or before",
            "type": "string",
            "description": "YYYY-MM-DD, e.g. established companies only."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words searched in the company name and in the principal activity described in the accounts, e.g. \"software\", \"dental\".",
            "items": {
              "type": "string"
            }
          },
          "includeDormant": {
            "title": "Include dormant companies",
            "type": "boolean",
            "description": "Dormant companies (no activity) are left out by default.",
            "default": false
          },
          "activeOnly": {
            "title": "Active companies only",
            "type": "boolean",
            "description": "Leaves out companies being struck off, in liquidation or administration.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only accounts not sent by a previous run",
            "type": "boolean",
            "description": "Monitoring: schedule the Actor (e.g. daily or weekly) and receive each new set of accounts once.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of companies returned (one row per company, its latest accounts).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}