{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada Federal Corporations Search – CBCA Company Data & Leads",
    "description": "Search all Canadian federal corporations (CBCA, not-for-profit, co-op) from Corporations Canada open data: corporation & business number, status, incorporation date, address, directors range. Find new companies by province or city. $1 per 1,000 records.",
    "version": "0.1",
    "x-build-id": "sUb0TgYfBF4epMPfM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~canada-corporations-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-canada-corporations-search",
        "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/gazidev~canada-corporations-search/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-canada-corporations-search",
        "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/gazidev~canada-corporations-search/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-canada-corporations-search",
        "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": {
          "incorporatedWithinDays": {
            "title": "Incorporated in the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "New-company leads: only corporations whose anniversary date (date of incorporation, amalgamation or continuance) is in the last N days. 0 = any date."
          },
          "incorporatedAfter": {
            "title": "Incorporated on/after (date)",
            "type": "string",
            "description": "YYYY-MM-DD. Overrides *last N days*."
          },
          "incorporatedBefore": {
            "title": "Incorporated on/before (date)",
            "type": "string",
            "description": "YYYY-MM-DD. Optional upper bound."
          },
          "provinces": {
            "title": "Provinces / territories",
            "type": "array",
            "description": "Province of the registered office address. Empty = all of Canada.",
            "items": {
              "type": "string",
              "enum": [
                "AB",
                "BC",
                "MB",
                "NB",
                "NL",
                "NS",
                "NT",
                "NU",
                "ON",
                "PE",
                "QC",
                "SK",
                "YT"
              ],
              "enumTitles": [
                "Alberta",
                "British Columbia",
                "Manitoba",
                "New Brunswick",
                "Newfoundland and Labrador",
                "Nova Scotia",
                "Northwest Territories",
                "Nunavut",
                "Ontario",
                "Prince Edward Island",
                "Quebec",
                "Saskatchewan",
                "Yukon"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Exact city names, case- and accent-insensitive, e.g. `Toronto`, `Montreal`, `Vancouver`, `Mississauga`.",
            "items": {
              "type": "string"
            }
          },
          "postalCodePrefixes": {
            "title": "Postal code prefixes",
            "type": "array",
            "description": "E.g. `M5V` (downtown Toronto), `H3`, `V6B`. Spaces are ignored.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains (any of)",
            "type": "array",
            "description": "Keywords matched against the English and French corporate names, e.g. `holdings`, `tech`, `construction`. Case- and accent-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "excludeNumberedCompanies": {
            "title": "Exclude numbered companies",
            "type": "boolean",
            "description": "Skip names like `1234567 CANADA INC.` (useful for lead lists).",
            "default": false
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "Default: active only. Inactive and dissolved corporations come from a separate, larger file.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "dissolved"
              ],
              "enumTitles": [
                "Active",
                "Inactive (amalgamated / discontinued)",
                "Dissolved"
              ]
            },
            "default": [
              "active"
            ]
          },
          "statusDetails": {
            "title": "Status detail",
            "type": "array",
            "description": "Finer filter. When set, it replaces the *Status* filter.",
            "items": {
              "type": "string",
              "enum": [
                "active-normal",
                "dissolution-pending",
                "intent-to-dissolve",
                "discontinuance-pending",
                "dissolved-non-compliance",
                "dissolved-by-corporation",
                "dissolved-by-corporations-canada",
                "dissolved-court-order",
                "dissolved-part-ii-cca",
                "amalgamated",
                "discontinued"
              ],
              "enumTitles": [
                "Active – in good standing (no pending action)",
                "Active – Dissolution Pending (non-compliance, e.g. annual returns not filed)",
                "Active – Intent to Dissolve Filed",
                "Active – Discontinuance Pending",
                "Dissolved for non-compliance",
                "Dissolved by the corporation",
                "Dissolved by Corporations Canada",
                "Dissolved by court order",
                "Dissolved – Part II of CCA",
                "Inactive – Amalgamated",
                "Inactive – Discontinued (moved to another jurisdiction)"
              ]
            }
          },
          "corporationTypes": {
            "title": "Corporation type",
            "type": "array",
            "description": "Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "business",
                "not-for-profit",
                "cooperative",
                "other"
              ],
              "enumTitles": [
                "Business corporation (CBCA)",
                "Not-for-profit (NFP Act / CCA Part II)",
                "Cooperative",
                "Other (boards of trade, special acts, CCA Part I...)"
              ]
            }
          },
          "corporationNumbers": {
            "title": "Look up corporation numbers",
            "type": "array",
            "description": "Bulk lookup, e.g. `8660115`. Lookups search active, inactive and dissolved records and ignore the other filters.",
            "items": {
              "type": "string"
            }
          },
          "businessNumbers": {
            "title": "Look up Business Numbers (BN)",
            "type": "array",
            "description": "9-digit CRA Business Number, e.g. `835752437` (a 15-character program account like `835752437RC0001` also works).",
            "items": {
              "type": "string"
            }
          },
          "sortNewestFirst": {
            "title": "Newest first",
            "type": "boolean",
            "description": "Return the most recently incorporated matches first (needs a full scan; applies when *Max corporations* is 1-50,000). Off = file order, which can stop early and is faster for big exports.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new corporations (monitoring)",
            "type": "boolean",
            "description": "Skip corporation numbers returned by earlier runs with the same *State key*. Schedule daily for a feed of newly incorporated companies.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separate 'already seen' lists for different searches.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max corporations",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many corporations (0 = all matching). You pay per corporation saved.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}