{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada New Corporations Feed (Federal Registry)",
    "description": "New federal Canadian corporations and status changes from Corporations Canada official open data. Filter by province, city, postal code, name, corporation number or status. Daily new-incorporation leads, dissolution alerts and KYC lookups.",
    "version": "0.1",
    "x-build-id": "PinKyyOIG2VDsX83h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tobbyb~canada-new-corporations-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tobbyb-canada-new-corporations-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/tobbyb~canada-new-corporations-feed/runs": {
      "post": {
        "operationId": "runs-sync-tobbyb-canada-new-corporations-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/tobbyb~canada-new-corporations-feed/run-sync": {
      "post": {
        "operationId": "run-sync-tobbyb-canada-new-corporations-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "new",
              "changes",
              "search",
              "bulk"
            ],
            "type": "string",
            "description": "<b>new</b>: corporations incorporated (or amalgamated) on or after 'Since date'.<br><b>changes</b>: corporations that are new, changed status, moved address or changed name since your previous 'changes' run (the first run only saves a baseline).<br><b>search</b>: look up corporations by name, number, business number, city or postal code.<br><b>bulk</b>: export every corporation matching the filters.",
            "default": "new"
          },
          "sinceDate": {
            "title": "Since date (mode: new)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Incorporation / amalgamation (anniversary) date on or after this day, YYYY-MM-DD. Empty = 7 days ago."
          },
          "provinces": {
            "title": "Provinces / territories",
            "type": "array",
            "description": "Two-letter codes of the registered office, e.g. ON, QC, BC, AB. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City/town of the registered office, exact name, not case-sensitive, e.g. Toronto, Montréal, Vancouver.",
            "items": {
              "type": "string"
            }
          },
          "postalPrefixes": {
            "title": "Postal code prefixes",
            "type": "array",
            "description": "Postal code starts with, e.g. M5V (a forward sortation area), M or K2K 3.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Text that must appear in the corporate name (either name form), not case-sensitive, e.g. CONSULTING."
          },
          "corporationNumbers": {
            "title": "Corporation numbers",
            "type": "array",
            "description": "Federal corporation numbers, e.g. 8660115.",
            "items": {
              "type": "string"
            }
          },
          "businessNumbers": {
            "title": "Business numbers (BN)",
            "type": "array",
            "description": "CRA 9-digit business numbers, e.g. 835752437.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Statuses",
            "type": "array",
            "description": "Keep only these statuses or status details, e.g. Active, Dissolved, 'Dissolution Pending', 'Intent to Dissolve'. A Dissolved/Inactive status automatically includes the inactive files.",
            "items": {
              "type": "string"
            }
          },
          "changeTypes": {
            "title": "Change types (mode: changes)",
            "type": "array",
            "description": "Which changes to output. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "status_changed",
                "address_changed",
                "name_changed"
              ],
              "enumTitles": [
                "New corporation",
                "Status changed",
                "Address changed",
                "Name changed"
              ]
            }
          },
          "includeNonCBCA": {
            "title": "Include non-CBCA corporations",
            "type": "boolean",
            "description": "Also include not-for-profits, cooperatives, boards of trade and other federal acts (default: business corporations under the CBCA only).",
            "default": false
          },
          "includeInactive": {
            "title": "Include inactive and dissolved corporations",
            "type": "boolean",
            "description": "Also read the inactive / dissolved files (about 160 MB more, slower). Always on in 'changes' mode and for number lookups in 'search' mode.",
            "default": false
          },
          "snapshotName": {
            "title": "Snapshot name (mode: changes)",
            "type": "string",
            "description": "Name of the saved state used to find changes between runs. Use different names to keep independent monitors. Stored in your named key-value store 'canada-corporations-feed-state'.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results (each result is one charged event). Leave empty for the default: 1,000 for new, search and bulk; no limit for changes, so a daily change feed never skips changes (your maximum cost per run still applies)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}