{
  "openapi": "3.0.1",
  "info": {
    "title": "Pakistan Government Tenders & Contract Awards (PPRA EPMS)",
    "description": "Pakistan federal government tenders and awarded contracts from PPRA's e-Publish & Monitoring System as clean JSON: closing dates, bid security, sector, buyer office, winners, contract and tender values in PKR, bids received. Keyword, sector and date filters, plus a new-only mode for daily alerts.",
    "version": "0.1",
    "x-build-id": "PjmXv0ZnQ8jtjrHXf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dottti~pakistan-tender-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dottti-pakistan-tender-radar",
        "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~pakistan-tender-radar/runs": {
      "post": {
        "operationId": "runs-sync-dottti-pakistan-tender-radar",
        "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~pakistan-tender-radar/run-sync": {
      "post": {
        "operationId": "run-sync-dottti-pakistan-tender-radar",
        "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": {
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "Tenders are open notices you can still bid on. Awards are signed contracts with the winning company and the contract value.",
            "items": {
              "type": "string",
              "enum": [
                "tenders",
                "awards"
              ],
              "enumTitles": [
                "Open tenders",
                "Contract awards (winners)"
              ]
            },
            "default": [
              "tenders"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words searched by the portal in tender and contract text, for example computer, solar or vehicle. Leave empty for everything.",
            "items": {
              "type": "string"
            }
          },
          "matchMode": {
            "title": "Keyword match mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any: at least one keyword. all: every keyword.",
            "default": "any"
          },
          "sectors": {
            "title": "Sectors (tenders)",
            "type": "array",
            "description": "Keep tenders in these PPRA sectors.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "28",
                "29",
                "30",
                "32"
              ],
              "enumTitles": [
                "Ammunition",
                "Appliances",
                "Books/Journals/Manuals(Technical/Literature)",
                "Chemical Items",
                "Civil Goods",
                "Civil Works",
                "Clothing/Uniform",
                "Consumable Items",
                "Electrical Items",
                "Equipments",
                "Food Items",
                "Furniture/Fixture",
                "Health/Medicines",
                "Info and Comm Tech",
                "Leasing",
                "Petroleum, Oil & Lubricants",
                "Mechanical/Machinery",
                "Mining",
                "Miscellaneous",
                "Printing",
                "Repair/Maintenance",
                "Research & Development",
                "Services",
                "Stationery",
                "Vehicles",
                "Agricultural Products",
                "Petroleum Products",
                "Coal (Sub-Bituminous)",
                "LNG/LPG"
              ]
            }
          },
          "procurementCategories": {
            "title": "Procurement categories (tenders)",
            "type": "array",
            "description": "Goods, works, consultancy or non-consultancy services.",
            "items": {
              "type": "string",
              "enum": [
                "goods",
                "works",
                "consultancy",
                "nonConsultancy"
              ],
              "enumTitles": [
                "Goods",
                "Works",
                "Consultancy services",
                "Non-consultancy services"
              ]
            }
          },
          "tenderTypes": {
            "title": "Tender types (tenders)",
            "type": "array",
            "description": "Tender notice, prequalification, request for proposal or expression of interest.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "prequalification",
                "rfp",
                "eoi"
              ],
              "enumTitles": [
                "Tender notice",
                "Pre-qualification (PQ)",
                "Request for proposal (RFP)",
                "Expression of interest (EOI)"
              ]
            }
          },
          "tenderNature": {
            "title": "Local or international (tenders)",
            "enum": [
              "any",
              "local",
              "international"
            ],
            "type": "string",
            "description": "Keep only local or only international tenders.",
            "default": "any"
          },
          "organizationContains": {
            "title": "Organization contains",
            "type": "string",
            "description": "Keep records whose organization or office name contains this text, for example WAPDA, NHA or Ministry of Health."
          },
          "cityContains": {
            "title": "City contains",
            "type": "string",
            "description": "Keep records whose city contains this text, for example Islamabad or Karachi."
          },
          "publishedSince": {
            "title": "Advertised on or after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Date in YYYY-MM-DD format. Older records are skipped."
          },
          "minContractValuePkr": {
            "title": "Minimum contract value, PKR (awards)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards whose contract value is at least this many Pakistani rupees."
          },
          "includeCancelled": {
            "title": "Include cancelled tenders",
            "type": "boolean",
            "description": "The active list also shows tenders marked Cancelled. They are skipped unless you turn this on.",
            "default": false
          },
          "includeDetails": {
            "title": "Open each record for details",
            "type": "boolean",
            "description": "Tenders: description, office address, procedure, method, bid security, bid validity, opening time, corrigendum count. Awards: tender value, bids received, signing date, integrity pact and complaint flags. Adds one request per record.",
            "default": true
          },
          "includeContactPerson": {
            "title": "Include contact person, email and phone",
            "type": "boolean",
            "description": "Named contact person, email and phone from the detail page. Some are personal addresses: only turn it on if you have a lawful reason to process them.",
            "default": false
          },
          "onlyNew": {
            "title": "Only records not delivered before",
            "type": "boolean",
            "description": "Remember delivered IDs and skip them next time. Use it with a daily schedule for alerts.",
            "default": false
          },
          "stateKey": {
            "title": "Alert name",
            "type": "string",
            "description": "Separate memory for each alert when you run several schedules with onlyNew.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum records per type",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on delivered tenders and, separately, on delivered awards, newest first. You pay per record delivered, so this is also your cost cap.",
            "default": 100
          },
          "maxPages": {
            "title": "Pages per list",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Each list page holds 50 rows. About 2,200 active tenders fit in 45 pages.",
            "default": 60
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 1000,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause before each request. Never lower than 1000 ms.",
            "default": 1000
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries with backoff when the portal fails or asks to slow down.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Normally not needed. After two connection errors in a row, or a 403 block, the Actor switches to this proxy, or to Apify datacenter and then residential proxy when empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}