{
  "openapi": "3.0.1",
  "info": {
    "title": "UN (UNGM) & World Bank Procurement Monitor - Tender Alerts",
    "description": "Monitor UN Global Marketplace (UNGM) and World Bank procurement notices in one feed. Keyword, country, sector and notice-type filters over both portals' public endpoints. Emits only NEW notices on each run, with World Bank contract-award values parsed out - schedule it and feed your bid pipeline.",
    "version": "0.1",
    "x-build-id": "MNlDgWbBo6Fj1mqLx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datadeltas~ungm-worldbank-procurement/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datadeltas-ungm-worldbank-procurement",
        "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/datadeltas~ungm-worldbank-procurement/runs": {
      "post": {
        "operationId": "runs-sync-datadeltas-ungm-worldbank-procurement",
        "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/datadeltas~ungm-worldbank-procurement/run-sync": {
      "post": {
        "operationId": "run-sync-datadeltas-ungm-worldbank-procurement",
        "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": {
          "sources": {
            "title": "Portals to monitor",
            "uniqueItems": true,
            "type": "array",
            "description": "Which procurement portals to watch. Default: both. If one portal is down for a run, the other still reports and the run succeeds with a warning.",
            "items": {
              "type": "string",
              "enum": [
                "ungm",
                "world-bank"
              ],
              "enumTitles": [
                "UNGM - UN Global Marketplace (UNDP, UNICEF, WHO, WFP, FAO, IOM, UNOPS, UNHCR, ...)",
                "World Bank - project procurement notices and contract awards"
              ]
            },
            "default": [
              "ungm",
              "world-bank"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Case-insensitive substring match, emitted when ANY keyword matches. World Bank notices are matched on title + reference + the full notice text. UNGM listings publish no description, so UNGM notices are matched on title + reference (this is also how UNGM's own search behaves by default). Give exactly ONE keyword and it is additionally pushed to UNGM's server-side title search, which makes the run much cheaper. Leave empty to monitor every new notice.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Optional. ISO-2 codes (KE, NG, UA) or full country names as the portals print them. Matched as a substring against the notice's own country string, so \"Congo\" also catches \"Congo, Democratic Republic of\". A notice with no country published is excluded when this filter is set. Note the World Bank also uses regional groupings such as \"Western Africa\" or \"Southwest Indian Ocean\" - add those by name if you want them.",
            "items": {
              "type": "string"
            }
          },
          "sectors": {
            "title": "Sectors (World Bank only)",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional World Bank procurement categories. Has NO effect on UNGM notices - UNGM classifies by UNSPSC code on the notice detail page only, not in its listing - so UNGM results are never dropped by this filter.",
            "items": {
              "type": "string",
              "enum": [
                "Goods",
                "Consulting services",
                "Civil works",
                "Non-consulting services"
              ],
              "enumTitles": [
                "Goods",
                "Consulting services",
                "Civil works",
                "Non-consulting services"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "uniqueItems": true,
            "type": "array",
            "description": "\"Tender\" = live opportunities (invitations to bid, RFQs, RFPs, expressions of interest, consultant calls). \"Award\" = published contract awards, useful for competitor and pricing intelligence. Awards come from the World Bank only: UNGM publishes contract awards on a separate board that this actor does not cover. Default: both.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "award"
              ],
              "enumTitles": [
                "Tender / opportunity (open for bids)",
                "Award (contract already awarded - World Bank only)"
              ]
            },
            "default": [
              "tender",
              "award"
            ]
          },
          "sinceDays": {
            "title": "Backfill window (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "How far back to look for notices. On the first run this is your backfill; afterwards it just bounds the search, because only never-seen notices are emitted. Keep it modest on the first run and raise Max items instead - both portals publish hundreds of notices a day.",
            "default": 14
          },
          "maxItems": {
            "title": "Max items per run",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap on notices emitted (and billed) in one run. Anything over the cap is NOT marked as seen, so it is emitted on the next run instead of being lost.",
            "default": 500
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store holding the seen-notice ids, kept separately per portal. Change it to run two independent watchlists (e.g. one per bid team) from the same actor.",
            "default": "ungm-worldbank-procurement-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}