{
  "openapi": "3.0.1",
  "info": {
    "title": "NUPCO & Saudi Health Tender Awards — Winners, Bids, Prices",
    "description": "Who won Saudi health-sector tenders. NUPCO result notices with the winning supplier, manufacturer and model per item, plus Etimad awards of the Ministry of Health, health clusters and hospitals with every bid and the award value in SAR.",
    "version": "0.1",
    "x-build-id": "qQFG0gk909BYVy5aF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dottti~nupco-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dottti-nupco-awards",
        "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/dottti~nupco-awards/runs": {
      "post": {
        "operationId": "runs-sync-dottti-nupco-awards",
        "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/dottti~nupco-awards/run-sync": {
      "post": {
        "operationId": "run-sync-dottti-nupco-awards",
        "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": "Sources",
            "type": "array",
            "description": "nupco: result notices on nupco.com (winning supplier, manufacturer and model per item; NUPCO publishes no prices). etimad: award results of health-sector agencies on Etimad (every bidder, every offer and the award value in SAR). Leave both for the full health picture.",
            "items": {
              "type": "string",
              "enum": [
                "nupco",
                "etimad"
              ],
              "enumTitles": [
                "NUPCO result notices (nupco.com)",
                "Etimad health-sector awards (tenders.etimad.sa)"
              ]
            },
            "default": [
              "nupco",
              "etimad"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to match. NUPCO: tender title and each awarded item (description, NUPCO code, manufacturer, trade name); when only items match, the row keeps just the matching items. Etimad: tender name, agency, branch and activity. Arabic is matched after normalisation (alef/hamza, ة/ه, ى/ي). Leave empty for everything.",
            "items": {
              "type": "string"
            }
          },
          "matchMode": {
            "title": "Keyword match mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any: keep a tender when at least one keyword matches. all: keep it only when every keyword matches.",
            "default": "any"
          },
          "supplierContains": {
            "title": "Supplier name contains (competitor tracking)",
            "type": "string",
            "description": "Keep only awards where a winner (NUPCO) or a bidder or winner (Etimad) name contains this text. NUPCO rows then keep only that supplier's items. Example: ALGOSAIBI or شركة"
          },
          "includePreliminary": {
            "title": "Include NUPCO preliminary results",
            "type": "boolean",
            "description": "NUPCO first publishes preliminary results, then final ones. On: a tender with only preliminary results is included (resultPhase preliminary). Off: final results only.",
            "default": true
          },
          "offerDeadlineFrom": {
            "title": "Offer deadline from",
            "type": "string",
            "description": "Etimad only: tenders whose offer deadline (آخر موعد لتقديم العروض) falls on or after this date. Format YYYY-MM-DD. Leave empty for 120 days ago. Awards are usually published a few weeks after the deadline."
          },
          "offerDeadlineTo": {
            "title": "Offer deadline to",
            "type": "string",
            "description": "Etimad only: tenders whose offer deadline falls on or before this date. Format YYYY-MM-DD. Leave empty for 30 days ago."
          },
          "healthGroups": {
            "title": "Etimad health groups",
            "type": "array",
            "description": "Which Etimad buyers count as health sector, by agency and branch name. Leave empty for all six groups.",
            "items": {
              "type": "string",
              "enum": [
                "ministry-of-health",
                "health-cluster",
                "military-security-health",
                "health-university",
                "health-authority",
                "hospital-medical-city"
              ],
              "enumTitles": [
                "Ministry of Health and its regional directorates (وزارة الصحة)",
                "Health clusters (التجمعات الصحية)",
                "Military and security health services: National Guard, Armed Forces, Security Forces hospitals",
                "Health universities and colleges",
                "Health authorities, centres and programmes",
                "Hospitals and medical cities"
              ]
            }
          },
          "agencyContains": {
            "title": "Etimad agency contains",
            "type": "string",
            "description": "Keep only Etimad tenders whose agency or branch name contains this text, on top of the health groups. Example: تجمع الرياض الصحي الأول"
          },
          "includeNotAnnounced": {
            "title": "Also list Etimad tenders with no results yet",
            "type": "boolean",
            "description": "Add Etimad health tenders whose award has not been announced, with awardStatus not_announced. These rows are free.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum Etimad awards",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on delivered Etimad awards (one row per tender). You are charged per award, so this is also your cost cap. The default of 3 is a quick sample; raise it for a full sweep.",
            "default": 3
          },
          "maxNupcoAwards": {
            "title": "Maximum NUPCO awards",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on delivered NUPCO results (one row per tender, newest first). You are charged per award. The default of 1 is a quick sample, because NUPCO result PDFs are large and download slowly. NUPCO lists about 50 tenders with results, so 100 reads all of them.",
            "default": 1
          },
          "maxTendersChecked": {
            "title": "Maximum tenders to check",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Per source. Each tender needs its own lookup (an Etimad award page or a NUPCO result PDF). Each check costs $0.0003. This caps run time and cost when few tenders match.",
            "default": 3000
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between requests on each parallel worker. Etimad returns HTTP 429 on bursts; NUPCO requests use at most 500 ms.",
            "default": 900
          },
          "maxRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries with exponential backoff when Etimad answers 429 or 5xx.",
            "default": 6
          },
          "concurrency": {
            "title": "Parallel lookups",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many Etimad award lookups run at the same time, each on its own proxy IP, so Etimad's per-IP throttling slows one worker only. Needs a proxy; with the proxy off Etimad uses one worker. NUPCO always fetches three result PDFs at a time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used for Etimad only. Apify Proxy (automatic datacenter IPs) by default; each worker gets its own IP and switches to a new one when Etimad throttles it. NUPCO is read directly.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}