{
  "openapi": "3.0.1",
  "info": {
    "title": "PPRA Pakistan",
    "description": "Tender scraper",
    "version": "0.0",
    "x-build-id": "c4TW1v6MgsV5unxHB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blessed_jouster-owner~Epad/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blessed_jouster-owner-Epad",
        "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/blessed_jouster-owner~Epad/runs": {
      "post": {
        "operationId": "runs-sync-blessed_jouster-owner-Epad",
        "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/blessed_jouster-owner~Epad/run-sync": {
      "post": {
        "operationId": "run-sync-blessed_jouster-owner-Epad",
        "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": "Jurisdictions",
            "uniqueItems": true,
            "type": "array",
            "description": "Federal includes both the EPADS 2.0 open-opportunities portal and the Federal PPRA public tender listing.",
            "items": {
              "type": "string",
              "enum": [
                "federal",
                "punjab",
                "sindh",
                "khyber_pakhtunkhwa",
                "balochistan",
                "gilgit_baltistan",
                "ajk"
              ],
              "enumTitles": [
                "Federal EPADS and PPRA",
                "Punjab",
                "Sindh",
                "Khyber Pakhtunkhwa",
                "Balochistan",
                "Gilgit-Baltistan",
                "Azad Jammu and Kashmir"
              ]
            },
            "default": [
              "federal",
              "punjab",
              "sindh",
              "khyber_pakhtunkhwa",
              "balochistan",
              "gilgit_baltistan",
              "ajk"
            ]
          },
          "keywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Match against title, description, reference, buyer, category, sector, and location. Leave empty to include every notice.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "reference": {
            "title": "Tender or reference number",
            "type": "string",
            "description": "Optional partial or exact portal ID, tender number, inquiry number, or buyer reference.",
            "default": ""
          },
          "description": {
            "title": "Description contains",
            "type": "string",
            "description": "Optional phrase required in the long tender description. Keep Include details enabled so detail-only text can be checked.",
            "default": ""
          },
          "matchAllKeywords": {
            "title": "Require all include keywords",
            "type": "boolean",
            "description": "When false, any include keyword can match. When true, every include keyword must match.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Discard a notice when any of these phrases appears in its searchable text.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "organizations": {
            "title": "Buyer or organization names",
            "type": "array",
            "description": "Optional partial-name filters such as Pakistan Army, Health Department, or WAPDA.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "cities": {
            "title": "Cities or locations",
            "type": "array",
            "description": "Optional partial location filters such as Lahore, Karachi, Rawalpindi, Peshawar, Quetta, or Islamabad.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Optional values such as Tender Notice, RFQ, RFP, EOI, Prequalification, Corrigendum, or Auction.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "categories": {
            "title": "Procurement categories",
            "type": "array",
            "description": "Optional values such as Goods, Works, Non-Consultancy Services, Consultancy Services, Furniture, or Electrical Items.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Exclude notices explicitly marked closed, cancelled, archived, or with a past deadline.",
            "default": true
          },
          "publishedWithinHours": {
            "title": "Published within the last N hours",
            "minimum": 0,
            "maximum": 8760,
            "type": "integer",
            "description": "Use 24 for a daily new-tender scan. Use 0 to disable this relative-date filter.",
            "default": 0
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD date. Leave blank for no lower limit.",
            "default": ""
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD date. Leave blank for no upper limit.",
            "default": ""
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD date. Leave blank for no lower limit.",
            "default": ""
          },
          "deadlineTo": {
            "title": "Deadline to",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD date. Leave blank for no upper limit.",
            "default": ""
          },
          "minimumRemainingHours": {
            "title": "Minimum time before deadline",
            "minimum": 0,
            "maximum": 8760,
            "type": "integer",
            "description": "Use 48 to exclude opportunities with less than 48 hours remaining. Use 0 to disable.",
            "default": 0
          },
          "onlyNew": {
            "title": "Return only new or changed notices",
            "type": "boolean",
            "description": "Remember notices between scheduled runs. A changed deadline, status, title, or document set is emitted again as an update.",
            "default": false
          },
          "stateStoreName": {
            "title": "Monitoring state store name",
            "type": "string",
            "description": "Use a different name for each independent monitoring task.",
            "default": "pakistan-epad-tender-monitor-state"
          },
          "seenRetentionDays": {
            "title": "Monitoring history retention",
            "minimum": 7,
            "maximum": 730,
            "type": "integer",
            "description": "Forget state records older than this many days.",
            "default": 120
          },
          "includeDetails": {
            "title": "Open tender detail pages",
            "type": "boolean",
            "description": "Extract descriptions, contacts, bid security, validity, procedure, and other fields when public detail pages exist.",
            "default": true
          },
          "includeDocumentLinks": {
            "title": "Collect public document links",
            "type": "boolean",
            "description": "Collect advertisements, bidding documents, corrigenda, and embedded EPADS bidding-document links.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum normalized tender records saved to the dataset after filtering and deduplication.",
            "default": 100
          },
          "maxPagesPerSource": {
            "title": "Maximum listing pages per portal",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety limit for each public portal. EPADS 2.0 currently serves many opportunities on one page.",
            "default": 50
          },
          "maxDetailPages": {
            "title": "Maximum detail pages",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cost guardrail across all portals. Text filters that only appear inside a notice description can only be evaluated for detail pages visited within this limit.",
            "default": 250
          },
          "maxConcurrency": {
            "title": "Maximum browser concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of portal requests processed concurrently. Reduce this value if a government portal throttles or times out.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of automatic retries after a temporary portal, network, or timeout failure.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout in seconds",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time allowed for one portal request before it is treated as timed out.",
            "default": 75
          },
          "sortField": {
            "title": "Sort results by",
            "enum": [
              "Relevance",
              "Deadline",
              "DatePublished",
              "Title",
              "Reference"
            ],
            "type": "string",
            "description": "Relevance prioritizes keyword matches; other options mirror common tender-search ordering.",
            "default": "Relevance"
          },
          "sortAscending": {
            "title": "Sort ascending",
            "type": "boolean",
            "description": "Enable for earliest deadline/oldest publication/A-Z. Disable for highest relevance/latest publication/Z-A.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. A Pakistan or residential proxy can help when a provincial portal rejects cloud 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}