{
  "openapi": "3.0.1",
  "info": {
    "title": "South Africa Government Tenders & Contract Awards (eTenders)",
    "description": "Open tenders, contract awards (winner, rand amount, B-BBEE enterprise type), closed tenders with bidder lists, and cancellations from South Africa's National Treasury eTenders portal. Filter by keyword, province, category and organ of state, or run on a schedule to get only new tenders.",
    "version": "1.0",
    "x-build-id": "CentsWYUUM2kEkVhr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mzansi-dataworks~sa-government-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mzansi-dataworks-sa-government-tenders",
        "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/mzansi-dataworks~sa-government-tenders/runs": {
      "post": {
        "operationId": "runs-sync-mzansi-dataworks-sa-government-tenders",
        "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/mzansi-dataworks~sa-government-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-mzansi-dataworks-sa-government-tenders",
        "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": "What to fetch",
            "enum": [
              "open",
              "awarded",
              "closed",
              "cancelled"
            ],
            "type": "string",
            "description": "Open tenders that are accepting bids, contract awards (who won and for how much), closed tenders (with the bidder list where the buyer published one), or cancelled tenders.",
            "default": "open"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep tenders whose number, description, category, buyer or special conditions contain ANY of these words (case-insensitive). Leave empty for everything.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop tenders containing any of these words.",
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Keep only these provinces. 'National' covers national departments and entities.",
            "items": {
              "type": "string",
              "enum": [
                "Eastern Cape",
                "Free State",
                "Gauteng",
                "KwaZulu-Natal",
                "Limpopo",
                "Mpumalanga",
                "National",
                "North West",
                "Northern Cape",
                "Western Cape"
              ]
            }
          },
          "categories": {
            "title": "Category contains",
            "type": "array",
            "description": "Keep tenders whose eTenders category contains any of these phrases, e.g. 'Construction', 'Computer programming', 'Security'.",
            "items": {
              "type": "string"
            }
          },
          "organsOfState": {
            "title": "Buyer (organ of state) contains",
            "type": "array",
            "description": "Keep tenders from buyers whose name contains any of these, e.g. 'City of Cape Town', 'Eskom', 'Transnet', 'Department of Health'.",
            "items": {
              "type": "string"
            }
          },
          "tenderTypes": {
            "title": "Tender type contains",
            "type": "array",
            "description": "e.g. 'Request for Bid', 'Request for Quotation', 'Request for Proposal', 'Expression of interest'.",
            "items": {
              "type": "string"
            }
          },
          "publishedWithinDays": {
            "title": "Published within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only tenders advertised in the last N days. 0 means no limit. If left empty: no limit for open tenders, 30 days for closed and cancelled, and for awards 270 days more than 'Awarded within' (awards are posted long after the advert)."
          },
          "closingWithinDays": {
            "title": "Closing within N days",
            "minimum": 0,
            "type": "integer",
            "description": "Open tenders only: keep tenders closing within the next N days. 0 means no limit.",
            "default": 0
          },
          "onlyCompulsoryBriefing": {
            "title": "Only tenders with a compulsory briefing",
            "type": "boolean",
            "description": "Keep only tenders with a compulsory briefing session (useful for planning site visits).",
            "default": false
          },
          "onlyESubmission": {
            "title": "Only tenders that accept e-submission",
            "type": "boolean",
            "description": "Keep only tenders that accept electronic bid submission on eTenders.",
            "default": false
          },
          "awardedWithinDays": {
            "title": "Awarded within the last N days (awards only)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards posted on eTenders in the last N days (default 30). 0 means no limit. Awards appear weeks or months after the tender was advertised, so this is the filter most people want for award tracking.",
            "default": 30
          },
          "enterpriseTypes": {
            "title": "Winner enterprise type (awards only)",
            "type": "array",
            "description": "Keep awards won by these enterprise types, e.g. EME, QSE, Large.",
            "items": {
              "type": "string"
            }
          },
          "minAwardAmountZar": {
            "title": "Minimum award amount in rand (awards only)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards whose total value is at least this many rand. 0 means no minimum.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new since my last run",
            "type": "boolean",
            "description": "Remembers what earlier runs returned (in a named key-value store on your account) and outputs only tenders you haven't seen. Ideal with a daily schedule for tender alerts. You pay only for new records.",
            "default": false
          },
          "stateKey": {
            "title": "Alert name (with 'Only new')",
            "type": "string",
            "description": "Use a different name for each saved search you monitor, so their memories don't mix. Defaults to one memory per mode."
          },
          "includeDocuments": {
            "title": "Include document download links",
            "type": "boolean",
            "description": "Adds the tender advert and bid documents with direct download links.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results. You are charged per result.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}