{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Company Profile: Companies House, LEI & public contracts",
    "description": "One joined record per UK company: Companies House status, filings due and overdue flags, charges, insolvency and corporate owners, GLEIF LEI and parents, UK public contracts won (matched by company number) and optional US federal awards. Official open data, no personal data.",
    "version": "0.1",
    "x-build-id": "YIYjbwNwEPnOgdxVL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlwren~uk-company-profile/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlwren-uk-company-profile",
        "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/crawlwren~uk-company-profile/runs": {
      "post": {
        "operationId": "runs-sync-crawlwren-uk-company-profile",
        "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/crawlwren~uk-company-profile/run-sync": {
      "post": {
        "operationId": "run-sync-crawlwren-uk-company-profile",
        "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": {
          "companyNumbers": {
            "title": "Company numbers",
            "type": "array",
            "description": "UK company numbers, e.g. 00102498, SC123456, OC301234. Leading zeros are added. Unknown numbers come back as free not_found rows.",
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Names are searched at Companies House. A name is only turned into a profile when one company matches it near-exactly with no close rival; otherwise you get a free row listing candidates with a confidence score, so you can pick the number.",
            "items": {
              "type": "string"
            }
          },
          "includeLei": {
            "title": "GLEIF LEI and parents",
            "type": "boolean",
            "description": "Find the LEI registered against the company number (GLEIF registration authority RA000585) and its direct and ultimate parents.",
            "default": true
          },
          "includeUkContracts": {
            "title": "UK public contracts won",
            "type": "boolean",
            "description": "Awards from Find a Tender and Contracts Finder where the notice gives this company number for the supplier.",
            "default": true
          },
          "includeUsFederal": {
            "title": "US federal awards (name match)",
            "type": "boolean",
            "description": "USAspending.gov recipients whose name exactly matches the company or its LEI legal name. Name-only, flagged medium confidence.",
            "default": true
          },
          "maxContractsPerCompany": {
            "title": "Max UK awards listed per company",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Newest first. Totals always count every matched award.",
            "default": 25
          },
          "maxCandidates": {
            "title": "Candidates per unresolved name",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many Companies House candidates to list when a name can't be resolved automatically.",
            "default": 5
          },
          "apiKey": {
            "title": "Your Companies House API key (optional)",
            "type": "string",
            "description": "Leave empty to use ours. With your own free key from the Companies House Developer Hub, requests are paced against your own 600-per-5-minutes allowance."
          },
          "awardsIndexRefresh": {
            "title": "Awards index refresh",
            "enum": [
              "auto",
              "force",
              "never"
            ],
            "type": "string",
            "description": "Maintenance. The UK awards index is updated incrementally from the official feeds.",
            "default": "auto"
          },
          "seedAwardsIndexDays": {
            "title": "Seed awards index (days back)",
            "minimum": 0,
            "maximum": 1100,
            "type": "integer",
            "description": "Maintenance only: extend the UK awards index back this many days. Slow (about 2 hours per year of notices).",
            "default": 0
          },
          "maxRefreshPagesPerSource": {
            "title": "Max refresh pages per source",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maintenance: cap on feed pages read by an automatic refresh during a profile run.",
            "default": 40
          },
          "backfillAwardsIndex": {
            "title": "Backfill awards index windows",
            "type": "array",
            "description": "Maintenance (operator account only): re-scan these windows and merge them into the shared index, e.g. [{\"source\":\"contracts_finder\",\"from\":\"2026-09-04\",\"to\":\"2026-09-11\"}]. Ignored for other accounts.",
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}