{
  "openapi": "3.0.1",
  "info": {
    "title": "africa-tender-monitor",
    "description": null,
    "version": "1.0",
    "x-build-id": "FnXrvxfqIwZ61Ayc5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codepal~africa-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codepal-africa-tender-monitor",
        "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/codepal~africa-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-codepal-africa-tender-monitor",
        "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/codepal~africa-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-codepal-africa-tender-monitor",
        "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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs (tender listing pages)",
            "type": "array",
            "description": "The tender listing pages to read, one per line. Official portals are recognised automatically and read through their APIs: https://tenders.go.ke/tenders (Kenya PPIP), https://www.etenders.gov.za/Home/opportunities (South Africa) and https://projects.worldbank.org/en/projects-operations/procurement (World Bank, all African countries). Any other URL, such as an organisation's tenders page, is read with the generic listing extractor.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "defaultCountry": {
            "title": "Country for other websites",
            "type": "string",
            "description": "Country to record on rows from generic pages (portals set it themselves), e.g. Kenya.",
            "default": ""
          },
          "maxPagesPerSite": {
            "title": "Max pages per website",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many \"next\" pages to follow on each generic listing page.",
            "default": 3
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Limit results to these countries, e.g. Kenya, Uganda, Nigeria, DRC, \"East Africa\". Empty = no limit. Also chooses which countries World Bank notices are read for (default: all of Africa).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep notices whose title, description, entity or reference contains any of these words, e.g. \"laptop\", \"borehole\", \"consultancy\". Empty = everything.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices containing any of these words, e.g. \"disposal\", \"motor vehicle\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sectors": {
            "title": "Sectors",
            "type": "array",
            "description": "Keep notices tagged with any of these sectors (tags come from the title and description).",
            "items": {
              "type": "string",
              "enum": [
                "construction-works",
                "roads",
                "water-sanitation",
                "energy-electrical",
                "ict-software",
                "health",
                "education",
                "agriculture",
                "transport-vehicles",
                "consultancy-advisory",
                "security-services",
                "cleaning-facilities",
                "catering-hospitality",
                "office-supplies-furniture",
                "financial-insurance-legal",
                "environment-climate",
                "other"
              ],
              "enumTitles": [
                "Construction & works",
                "Roads",
                "Water & sanitation",
                "Energy & electrical",
                "ICT & software",
                "Health & medical",
                "Education & training",
                "Agriculture",
                "Vehicles & transport",
                "Consultancy & advisory",
                "Security services",
                "Cleaning & facilities",
                "Catering & hospitality",
                "Office supplies & furniture",
                "Financial, insurance & legal",
                "Environment & climate",
                "Other"
              ]
            },
            "default": []
          },
          "categories": {
            "title": "Procurement categories",
            "type": "array",
            "description": "Keep only these procurement categories.",
            "items": {
              "type": "string",
              "enum": [
                "goods",
                "works",
                "services",
                "consultancy"
              ],
              "enumTitles": [
                "Goods",
                "Works",
                "Non-consulting services",
                "Consultancy"
              ]
            },
            "default": []
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Awards include the winning supplier and contract price (Kenya, World Bank — World Bank awards also list the other bidders and their prices).",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "expression_of_interest",
                "prequalification",
                "general_notice",
                "award"
              ],
              "enumTitles": [
                "Tenders / invitations to bid",
                "Expressions of interest",
                "Prequalification",
                "General procurement notices",
                "Contract awards & bid prices"
              ]
            },
            "default": [
              "tender",
              "expression_of_interest",
              "prequalification"
            ]
          },
          "onlyOpen": {
            "title": "Only open opportunities",
            "type": "boolean",
            "description": "Skip tenders whose deadline has passed or that were cancelled.",
            "default": true
          },
          "publishedWithinDays": {
            "title": "Published within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices published in the last N days (Kenya PPIP always returns every currently open tender). 0 = no limit.",
            "default": 30
          },
          "closingWithinDays": {
            "title": "Closing within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Only tenders whose deadline is within N days, e.g. 7 for an urgent list. 0 = any.",
            "default": 0
          },
          "minDaysToDeadline": {
            "title": "At least N days left to bid",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tenders closing too soon to prepare a bid. 0 = keep all.",
            "default": 0
          },
          "reservedOnly": {
            "title": "Only reserved (AGPO) tenders",
            "type": "boolean",
            "description": "Kenya: only tenders reserved for youth, women and persons with disabilities (AGPO).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new or changed since the last run",
            "type": "boolean",
            "description": "For scheduled monitoring: output only notices not seen in a previous run of the same monitor, plus ones whose deadline, documents or status changed. The first run outputs everything.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Each name keeps its own memory of seen notices. Use a different name per saved search (e.g. \"kenya-ict\", \"wb-consultancy\").",
            "default": "default"
          },
          "webhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "POSTs new/updated notices after each run (not on the first run). Works with Slack, Microsoft Teams/Power Automate, Zapier, Make and n8n incoming webhooks.",
            "default": ""
          },
          "includeNoticeText": {
            "title": "Include full notice text",
            "type": "boolean",
            "description": "Add the complete World Bank notice text (scope, eligibility, submission instructions) to each row.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum notices to output per run. 0 = no limit.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for the portal APIs. Enable only if an organisation's website blocks datacenter traffic.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}