{
  "openapi": "3.0.1",
  "info": {
    "title": "Job Bank Canada LMIA Monitor",
    "description": "Scrape and monitor Job Bank Canada temporary foreign worker jobs with LMIA requested or approved status, salaries, employers, and change alerts. Use for immigration recruiters sourcing TFW openings. Returns title, employer, location, salary, LMIA status, job URL. $0.005/job.",
    "version": "0.1",
    "x-build-id": "wTycu41spAQ6aDb7F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~monitor-jobbank-canada-lmia/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-monitor-jobbank-canada-lmia",
        "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/khadinakbar~monitor-jobbank-canada-lmia/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-monitor-jobbank-canada-lmia",
        "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/khadinakbar~monitor-jobbank-canada-lmia/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-monitor-jobbank-canada-lmia",
        "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": {
          "searchKeyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Title, employer, skill, or occupation query such as cook, nurse, or truck driver. Leave empty to walk the newest TFW/LMIA pool. This is Job Bank's public searchstring, not a Boolean IRCC query.",
            "default": ""
          },
          "location": {
            "title": "Canadian city",
            "type": "string",
            "description": "Optional city or town such as Toronto or Brampton. Combined with Job Bank's locationstring. Prefer provinces when you want territory-wide results.",
            "default": ""
          },
          "provinces": {
            "title": "Provinces and territories",
            "type": "array",
            "description": "Optional province/territory filters using Job Bank's fprov facet. Each selected province becomes its own search plan. Leave empty for 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"
              ]
            },
            "default": []
          },
          "startUrls": {
            "title": "Job Bank search or posting URLs",
            "type": "array",
            "description": "Optional public jobbank.gc.ca search or /jobpostingtfw/ URLs. Added as exact search plans. Non-Job-Bank hosts are rejected as invalid input.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "lmiaStatus": {
            "title": "LMIA status",
            "enum": [
              "requested_or_approved",
              "requested",
              "approved",
              "any"
            ],
            "type": "string",
            "description": "Uses Job Bank's LMIA facets (fskl=101010 requested, fskl=101020 approved). requested_or_approved keeps the full TFW pool (fsrc=32). any is treated the same as requested_or_approved.",
            "default": "requested_or_approved"
          },
          "onlyLmiaRequested": {
            "title": "Legacy LMIA shortcut",
            "type": "boolean",
            "description": "Backward-compatible shortcut. When enabled and lmiaStatus is any, uses the TFW requested-or-approved pool.",
            "default": false
          },
          "excludeStudent": {
            "title": "Exclude student jobs",
            "type": "boolean",
            "description": "Drop postings Job Bank flags as student jobs before save.",
            "default": false
          },
          "workplaceTypes": {
            "title": "Workplace type",
            "type": "array",
            "description": "Keep postings whose public telework flag matches. Empty keeps every workplace type.",
            "items": {
              "type": "string",
              "enum": [
                "on_site",
                "remote",
                "hybrid",
                "on_the_road"
              ],
              "enumTitles": [
                "On site",
                "Remote",
                "Hybrid",
                "On the road"
              ]
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "newest",
              "relevance"
            ],
            "type": "string",
            "description": "Job Bank best-match (M) or newest (D) ordering.",
            "default": "newest"
          },
          "enrichDetails": {
            "title": "Enrich from detail pages",
            "type": "boolean",
            "description": "When on, fetch each posting page for description snippet, hours, languages, and NOC when published. Off (default) uses search cards only and is cheaper.",
            "default": false
          },
          "monitoringMode": {
            "title": "Monitoring output",
            "enum": [
              "off",
              "new_and_updated",
              "all"
            ],
            "type": "string",
            "description": "For scheduled runs, save only new, updated, and expired jobs (new_and_updated), or every row plus expiries (all). off scrapes without change detection. Unchanged jobs are not written or charged in change-only mode.",
            "default": "off"
          },
          "stateName": {
            "title": "Monitoring state name",
            "type": "string",
            "description": "Separates one saved watchlist or schedule from another. Keep stable for recurring runs. Letters, numbers, underscore, hyphen only.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset this monitoring state",
            "type": "boolean",
            "description": "Treat the next successful monitoring run as a fresh baseline for this state name only.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum unique jobs",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on unique job records across every search plan. Each saved row is one job-found event. Default 10 keeps quality tests cheap.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Job Bank is reachable via Apify Residential Canada. Default enables Apify proxy with CA residential routing.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}