{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Overdue Accounts Leads (Companies House)",
    "description": "UK companies that have missed, or are about to miss, their accounts or confirmation statement deadline, with director, website and email details. Built for accountants and bookkeepers. Pay only for leads delivered.",
    "version": "0.1",
    "x-build-id": "Mkfb5JAig2aVoJBiT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/best_actors~uk-overdue-accounts-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-best_actors-uk-overdue-accounts-leads",
        "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/best_actors~uk-overdue-accounts-leads/runs": {
      "post": {
        "operationId": "runs-sync-best_actors-uk-overdue-accounts-leads",
        "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/best_actors~uk-overdue-accounts-leads/run-sync": {
      "post": {
        "operationId": "run-sync-best_actors-uk-overdue-accounts-leads",
        "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": {
          "mode": {
            "title": "What to find",
            "enum": [
              "overdue",
              "due_soon",
              "both"
            ],
            "type": "string",
            "description": "Overdue: companies that have missed their accounts deadline (and, optionally, their confirmation statement). Due soon: companies whose accounts deadline is coming up.",
            "default": "overdue"
          },
          "dueWithinDays": {
            "title": "Due within (days)",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "For 'Accounts due soon': how many days ahead to look.",
            "default": 60
          },
          "includeConfirmationStatement": {
            "title": "Also count overdue confirmation statements",
            "type": "boolean",
            "description": "Include companies that are late filing their annual confirmation statement, another sign they need help with their admin.",
            "default": true
          },
          "locality": {
            "title": "Town or city",
            "type": "string",
            "description": "Registered office town, e.g. Bristol. Fastest way to target an area."
          },
          "postcodePrefixes": {
            "title": "Postcode areas",
            "type": "array",
            "description": "Postcode areas or districts, e.g. M, SK, BS1. A single district (M14) is fast; whole areas (M) work but are slower.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "England",
              "Scotland",
              "Wales",
              "Northern Ireland"
            ],
            "type": "string",
            "description": "Optional."
          },
          "industries": {
            "title": "Industries",
            "type": "array",
            "description": "Leave empty for all trading industries. Shells, holding companies and property vehicles are always left out.",
            "items": {
              "type": "string",
              "enum": [
                "trades",
                "retail",
                "hospitality",
                "beauty",
                "professional",
                "health",
                "fitness",
                "ecommerce",
                "automotive"
              ],
              "enumTitles": [
                "Trades and construction",
                "Retail shops",
                "Restaurants, cafes, pubs, hotels",
                "Hair, beauty, wellbeing",
                "Professional services",
                "Health and care",
                "Fitness and sport",
                "Online shops",
                "Motor trade"
              ]
            }
          },
          "sicCodes": {
            "title": "Extra SIC codes",
            "type": "array",
            "description": "Specific SIC codes, e.g. 43220 for plumbers. Combined with the industries above.",
            "items": {
              "type": "string"
            }
          },
          "maxLeads": {
            "title": "Maximum leads",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "The run stops once this many leads are delivered. You pay per lead.",
            "default": 50
          },
          "incorporatedFromMonthsAgo": {
            "title": "Incorporated up to N months ago (oldest)",
            "type": "number",
            "description": "Optional. Oldest companies to check, in months since incorporation. Default: 36 for overdue, 21 for due soon. Raise it to include older companies with later-year accounts."
          },
          "incorporatedToMonthsAgo": {
            "title": "Incorporated at least N months ago (newest)",
            "type": "number",
            "description": "Optional. Newest companies to check. Default: 21.5 for overdue (first accounts fall due at 21 months)."
          },
          "maxCompaniesChecked": {
            "title": "Maximum companies to check",
            "minimum": 10,
            "maximum": 20000,
            "type": "integer",
            "description": "Safety cap on how many company records are read in one run.",
            "default": 3000
          },
          "checkWebsite": {
            "title": "Check for an existing website",
            "type": "boolean",
            "description": "Tries the obvious domains for the company name (.co.uk, .com, .uk...).",
            "default": true
          },
          "findDirectorOtherCompanies": {
            "title": "Look up the director's other companies",
            "type": "boolean",
            "description": "Counts the director's other active companies and finds a website for one of them. Often the best route to an email address.",
            "default": true
          },
          "findEmails": {
            "title": "Find email addresses",
            "type": "boolean",
            "description": "Checks whether the company's domain receives email, scrapes addresses from any website found, and lists likely addresses from the director's name. Guesses are unverified.",
            "default": true
          },
          "companiesHouseApiKey": {
            "title": "Your Companies House API key (optional)",
            "type": "string",
            "description": "Optional. A free key from developer.company-information.service.gov.uk gives you your own rate limit, so large runs go faster."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}