{
  "openapi": "3.0.1",
  "info": {
    "title": "Pakistan PPRA Tenders, Contracts & Evaluations (EPMS)",
    "description": "Active tenders, awarded contracts and bid evaluation results from Pakistan's PPRA e-Publish & Monitoring System (epms.ppra.gov.pk) as clean JSON: tender and contract numbers, titles, organizations, winners, amounts in PKR, lowest bidders, dates and document links. No officer contact data.",
    "version": "0.1",
    "x-build-id": "pfV0kEgy7rKf6cztE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/a-g-d~pk-ppra/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-a-g-d-pk-ppra",
        "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/a-g-d~pk-ppra/runs": {
      "post": {
        "operationId": "runs-sync-a-g-d-pk-ppra",
        "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/a-g-d~pk-ppra/run-sync": {
      "post": {
        "operationId": "run-sync-a-g-d-pk-ppra",
        "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": {
          "recordType": {
            "title": "Record type",
            "enum": [
              "tenders",
              "contracts",
              "evaluations"
            ],
            "type": "string",
            "description": "Active tenders (the default): tenders open for bidding on EPMS. Awarded contracts: contracts published after award, with the winner and amount. Evaluation results: published PQ, technical and final bid evaluations, with the lowest bidder. One run returns one record type.",
            "default": "tenders"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Matched by EPMS against titles, descriptions and numbers. Leave empty for all records.",
            "default": ""
          },
          "tenderNumber": {
            "title": "Tender number",
            "type": "string",
            "description": "Only records of this EPMS tender number, e.g. TS0000014731E (for contracts and evaluations: the tender they belong to).",
            "default": ""
          },
          "organization": {
            "title": "Organization",
            "type": "string",
            "description": "The procuring organization, e.g. \"Ministry of Energy (Power Division)\", \"PPRA\" or \"NHA\". A name that identifies one EPMS organization is filtered by EPMS; otherwise the actor keeps records whose organization or office contains the text. Case-insensitive.",
            "default": ""
          },
          "sector": {
            "title": "Sector",
            "enum": [
              "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"
            ],
            "type": "string",
            "description": "Tenders and evaluations only: the EPMS sector. Leave empty for all sectors. Ignored for contracts (the contract list has no sector)."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Only records of procuring offices in this city, e.g. \"Lahore\" or \"Karachi\". Case-insensitive.",
            "default": ""
          },
          "evaluationType": {
            "title": "Evaluation type",
            "enum": [
              "pq",
              "technical",
              "final"
            ],
            "type": "string",
            "description": "Evaluations only: PQ (pre-qualification), technical or final evaluations. Leave empty for all."
          },
          "minValue": {
            "title": "Minimum awarded amount (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Contracts only: keep contracts awarded for at least this many rupees."
          },
          "maxValue": {
            "title": "Maximum awarded amount (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Contracts only: keep contracts awarded for at most this many rupees."
          },
          "publishedSince": {
            "title": "Published since",
            "type": "string",
            "description": "Keep records EPMS published on or after the Pakistan calendar day of this point: tenders by advertisement date, contracts and evaluations by publication date. A relative span like \"24 hours\" or \"7 days\", a date like \"2026-09-20\" or an ISO-8601 timestamp. Leave empty for no lower bound.",
            "default": ""
          },
          "includeDetail": {
            "title": "Include detail pages",
            "type": "boolean",
            "description": "Also read each record's detail page for the fields only it has (tenders: type, category, procedure, method, bid security, opening time, document links; contracts: signing date, tender value, bids received, integrity-pact and complaint flags; evaluations: tender dates and report link). One extra request per record, about 2.5 s each, charged as record-detail.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after storing this many records (newest first).",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The actor talks to epms.ppra.gov.pk directly; use Apify Proxy only if runs fail with connection errors.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}