{
  "openapi": "3.0.1",
  "info": {
    "title": "Tenders Wa Tas Scraper",
    "version": "1.0",
    "x-build-id": "BlJP3ETRooMZxceHY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mrdoe~tenders-wa-tas-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mrdoe-tenders-wa-tas-scraper",
        "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/mrdoe~tenders-wa-tas-scraper/runs": {
      "post": {
        "operationId": "runs-sync-mrdoe-tenders-wa-tas-scraper",
        "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/mrdoe~tenders-wa-tas-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-mrdoe-tenders-wa-tas-scraper",
        "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": {
          "jurisdiction": {
            "title": "Jurisdiction",
            "enum": [
              "wa",
              "tas"
            ],
            "type": "string",
            "description": "Which government tender platform to collect from. Western Australia and Tasmania are run on two different systems, so pick one per run.",
            "default": "wa"
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "search",
              "tenderDetails"
            ],
            "type": "string",
            "description": "'Search' collects tenders and contract notices matching your status filter. 'Tender details' returns the full record for each id or URL you supply.",
            "default": "search"
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "Which listings to collect. Western Australia offers Open, Closed, Awarded and New; Tasmania offers Open, Closed, Not Awarded, Withdrawn and Awarded (Awarded returns awarded-contract notices instead of tenders).",
            "items": {
              "type": "string",
              "enum": [
                "Open",
                "Closed",
                "Awarded",
                "New",
                "Withdrawn",
                "NotAwarded"
              ],
              "enumTitles": [
                "Open",
                "Closed",
                "Awarded",
                "New (WA only)",
                "Withdrawn (Tas only)",
                "Not awarded (Tas only)"
              ]
            },
            "default": [
              "Open"
            ]
          },
          "keywords": {
            "title": "Keywords (Tasmania)",
            "type": "string",
            "description": "Only keep results whose title or description contains this text. Applies to Tasmania only - for Western Australia, use Category / Agency instead."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Only keep results whose UNSPSC category contains this text, for example 'Construction' or 'IT'. Case-insensitive."
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Only keep results whose issuing agency contains this text, for example 'Health' or 'Transport'. Case-insensitive."
          },
          "recordType": {
            "title": "Record type (Tender details, Tasmania ids)",
            "enum": [
              "tender",
              "contract"
            ],
            "type": "string",
            "description": "Whether the ids supplied for 'Tender details' are open-for-bids tenders or awarded contracts. Only used for Tasmania when 'ids' are plain numbers rather than full URLs.",
            "default": "tender"
          },
          "ids": {
            "title": "Tender / contract ids (Tender details)",
            "type": "array",
            "description": "One or more numeric tender or contract ids from the site's own URLs. Used when Operation is 'Tender details'. Not limited by Max results.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (Tender details)",
            "type": "array",
            "description": "Optional. Paste full Tenders WA or Tenders Tasmania record page URLs instead of plain ids.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "fetchDetails": {
            "title": "Return the full record for each result",
            "type": "boolean",
            "description": "When on, every result is expanded into its full record (description, contacts, region, supplier). Turn it off for a faster run that returns only the fields shown in the results list.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to collect per status, for Search.",
            "default": 20
          },
          "useCache": {
            "title": "Use cache",
            "type": "boolean",
            "description": "Reuse records collected in an earlier run to speed up recurring monitoring. Disabled by default so every run returns fresh data.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy settings. Both sites serve their public tender pages without a proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}