{
  "openapi": "3.0.1",
  "info": {
    "title": "Bahrain Tender Scraper: مناقصات البحرين",
    "description": "Collect currently published Bahrain Tender Board opportunities, مناقصات البحرين. Export tender numbers, subjects, purchasing authorities, tender types, and official dates for procurement monitoring and supplier research.",
    "version": "0.1",
    "x-build-id": "fh27oMqaKa1UGLlc6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~bahrain-tender-board-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-bahrain-tender-board-scraper",
        "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/getascraper~bahrain-tender-board-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-bahrain-tender-board-scraper",
        "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/getascraper~bahrain-tender-board-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-bahrain-tender-board-scraper",
        "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": {
          "keyword": {
            "title": "Keyword in tender number or subject",
            "type": "string",
            "description": "Optional case-insensitive filter applied to the published tender number and subject.",
            "default": ""
          },
          "purchasingAuthority": {
            "title": "Purchasing authority contains",
            "type": "string",
            "description": "Optional case-insensitive filter applied to the published purchasing-authority name.",
            "default": ""
          },
          "ministry": {
            "title": "Ministry or entity value",
            "type": "string",
            "description": "Optional exact Tender Board ministry/entity filter value. Use the official value shown in the public Tender Board selector.",
            "default": ""
          },
          "category": {
            "title": "Category or sector value",
            "type": "string",
            "description": "Optional exact Tender Board category/sector filter value. The Actor does not infer a category when the source does not display one per tender.",
            "default": ""
          },
          "tenderNumber": {
            "title": "Tender number",
            "type": "string",
            "description": "Optional official Tender Board tender-number filter.",
            "default": ""
          },
          "tenderType": {
            "title": "Tender type value",
            "type": "string",
            "description": "Optional official tender-type filter value. Leave blank to include every published type.",
            "default": ""
          },
          "closingDate": {
            "title": "Closing date filter",
            "type": "string",
            "description": "Optional official closing-date filter value in the format shown by the Tender Board.",
            "default": ""
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Optional inclusive start date for the published tender date, in YYYY-MM-DD format.",
            "default": ""
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Optional inclusive end date for the published tender date, in YYYY-MM-DD format.",
            "default": ""
          },
          "closingFrom": {
            "title": "Closing from",
            "type": "string",
            "description": "Optional inclusive start date for the tender closing date, in YYYY-MM-DD format.",
            "default": ""
          },
          "closingTo": {
            "title": "Closing to",
            "type": "string",
            "description": "Optional inclusive end date for the tender closing date, in YYYY-MM-DD format.",
            "default": ""
          },
          "onlySmeTenders": {
            "title": "Only tenders allocated for SMEs",
            "type": "boolean",
            "description": "Request only published tenders allocated for small and medium enterprises when the Tender Board has marked them.",
            "default": false
          },
          "onlyPrequalification": {
            "title": "Only pre-qualification tenders",
            "type": "boolean",
            "description": "Request only published pre-qualification opportunities.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum tender records",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum matching tender records to save. Increase deliberately for a larger research export.",
            "default": 25
          },
          "maxPages": {
            "title": "Maximum Tender Board pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum current-tender pages to inspect. The first page is newest according to the Tender Board default ordering.",
            "default": 3
          },
          "incrementalMode": {
            "title": "Only new or updated tenders",
            "type": "boolean",
            "description": "Compare each tender against a named state and save NEW or UPDATED records only. Enable for scheduled monitoring.",
            "default": false
          },
          "stateName": {
            "title": "Monitoring state name",
            "type": "string",
            "description": "A distinct name prevents independent supplier or sector watchlists from sharing history.",
            "default": "default"
          },
          "includeUnchanged": {
            "title": "Include unchanged tenders",
            "type": "boolean",
            "description": "When monitoring, also save tender records whose published values have not changed.",
            "default": false
          },
          "includeDetails": {
            "title": "Enrich with public tender details",
            "type": "boolean",
            "description": "Visit each public official tender page to collect its published scope, issuer, fees, bond, contract duration, opening date, and other available decision fields.",
            "default": true
          },
          "includeBilingualDetails": {
            "title": "Include linked Arabic/English detail fields",
            "type": "boolean",
            "description": "For each bounded public detail page, also read its linked Arabic page and add paired source text only when both public pages expose it.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy settings. The public Tender Board is requested directly by default."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}