{
  "openapi": "3.0.1",
  "info": {
    "title": "UK New Companies Feed: Companies House by SIC & area",
    "description": "Newly incorporated UK companies from the official Companies House API. Filter by SIC code, town or region and company type; schedule it and get only companies you have not seen before. Company-level facts only, no directors. Uses your free Companies House API key.",
    "version": "0.1",
    "x-build-id": "jAHJaBQWMmHbkWfId"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/asunoki~uk-new-companies-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-asunoki-uk-new-companies-feed",
        "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/asunoki~uk-new-companies-feed/runs": {
      "post": {
        "operationId": "runs-sync-asunoki-uk-new-companies-feed",
        "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/asunoki~uk-new-companies-feed/run-sync": {
      "post": {
        "operationId": "run-sync-asunoki-uk-new-companies-feed",
        "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",
        "required": [
          "apiKey"
        ],
        "properties": {
          "apiKey": {
            "title": "Companies House API key",
            "type": "string",
            "description": "Your free Companies House REST API key. How to get one: sign in at developer.company-information.service.gov.uk (sign-in uses GOV.UK One Login) → Your applications → Create an application → choose Live → Create new key → REST. Leave IP and domain restrictions empty. Apify stores the key encrypted; it is sent only to Companies House and never written to the output or log."
          },
          "lookbackDays": {
            "title": "Incorporated in the last N days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Rolling window ending today (UTC). For a daily schedule, 7 days with 'Only new companies' catches late registrations without repeats. If you set only 'Incorporated to', the window ends on that date.",
            "default": 7
          },
          "incorporatedFrom": {
            "title": "Incorporated from",
            "type": "string",
            "description": "Optional fixed start date (YYYY-MM-DD). Overrides the rolling window. Up to 366 days in total."
          },
          "incorporatedTo": {
            "title": "Incorporated to",
            "type": "string",
            "description": "Optional fixed end date (YYYY-MM-DD). Empty: today. Dates after today are treated as today."
          },
          "sicCodes": {
            "title": "SIC codes",
            "type": "array",
            "description": "5-digit UK SIC 2007 codes, e.g. 62012 (software development), 56101 (restaurants), 47910 (online retail), 41201 (construction of buildings). Up to 20. Empty: all industries. '62012 - Business and domestic software development' is also accepted.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Town, county or region",
            "type": "string",
            "description": "Place name sent to the Companies House search, e.g. Manchester, Kent or Scotland. Empty: whole UK. Companies House matches it anywhere in the registered office address text, so a 'Manchester Road' in Rochdale matches 'Manchester'. Use 'Location match' to keep only companies whose town (or region) is exactly this place."
          },
          "locationMatch": {
            "title": "Location match",
            "enum": [
              "addressText",
              "town",
              "townOrRegion"
            ],
            "type": "string",
            "description": "How 'Town, county or region' is applied. Default: as Companies House searches it (any part of the address, best for counties such as Kent). 'Town' keeps only companies whose town field, as filed, equals the place (best for cities such as Manchester). 'Town or region' also keeps companies that filed the place as their region. Companies whose fields do not match are skipped and not charged. Each row's 'locationMatchedIn' column says where the place was found.",
            "default": "addressText"
          },
          "postcodeAreas": {
            "title": "Postcode areas",
            "type": "array",
            "description": "Optional. Keep only companies whose registered office postcode is in these areas (M, OL) or outward codes (OL11, M1). Up to 30. Example for roughly Greater Manchester: M, OL, BL, SK, WN (areas cross county lines, so check the result). Companies without a postcode are skipped. Not charged when skipped.",
            "items": {
              "type": "string"
            }
          },
          "companyTypes": {
            "title": "Company types",
            "type": "array",
            "description": "Companies House company_type values. Default: ltd (private limited by shares). Others: llp, plc, private-limited-guarant-nsc, limited-partnership, …",
            "default": [
              "ltd"
            ],
            "items": {
              "type": "string"
            }
          },
          "companyStatuses": {
            "title": "Company status",
            "type": "array",
            "description": "Default: active.",
            "default": [
              "active"
            ],
            "items": {
              "type": "string"
            }
          },
          "nameIncludes": {
            "title": "Company name includes",
            "type": "string",
            "description": "Optional word the company name must contain."
          },
          "nameExcludes": {
            "title": "Company name excludes",
            "type": "string",
            "description": "Optional word the company name must not contain, e.g. HOLDINGS."
          },
          "maxCompanies": {
            "title": "Maximum companies per run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stops after this many company rows. Each row is one charged result, so this also caps the cost of a run (20 companies = about $0.04). When more companies match, the newest are output first, 'moreAvailable' is true in the run summary, and the next run with the same filters continues with the rest. Default 1,000.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new companies",
            "type": "boolean",
            "description": "Output only companies that an earlier run with the same search filters has not output (dates and 'Location match' may differ). This is 'not output before', not 'incorporated since the last run'. The first run is a baseline. Recommended for schedules.",
            "default": true
          },
          "excludeDormant": {
            "title": "Skip dormant companies",
            "type": "boolean",
            "description": "Skip companies registered with the dormant SIC code 99999 (not charged).",
            "default": true
          },
          "addressDetail": {
            "title": "Address detail",
            "enum": [
              "area",
              "full"
            ],
            "type": "string",
            "description": "Registered offices of small companies are often home addresses. Default keeps only the area.",
            "default": "area"
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-zA-Z0-9-]{1,63}$",
            "type": "string",
            "description": "Named key-value store in your account that remembers company numbers already output (numbers and dates only). Letters, digits and '-' only. Use one name per schedule.",
            "default": "uk-new-companies-feed-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}