{
  "openapi": "3.0.1",
  "info": {
    "title": "Etimad Saudi Tenders Scraper",
    "description": "Search Saudi government tenders on Etimad: reference, title, agency, type, status, region, publish date, question and bid deadlines, envelope opening, document price and award results. Filter by keyword, agency, type, status, region and date for tender alerts.",
    "version": "0.1",
    "x-build-id": "M0NvlNLFiyj2P5Vhd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/barefoot_grade~etimad-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-barefoot_grade-etimad-tenders-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/barefoot_grade~etimad-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-barefoot_grade-etimad-tenders-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/barefoot_grade~etimad-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-barefoot_grade-etimad-tenders-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",
            "type": "string",
            "description": "Text searched in the tender name, number and reference, as on the Etimad search box, e.g. 'صيانة' (maintenance) or 'تقنية'. Most tenders are written in Arabic. 2 to 50 characters.",
            "default": ""
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Government agency: its 12-digit Etimad agency code, its exact name, or a name fragment matching at most 5 agencies, e.g. 'حرس الحدود' (Border Guard).",
            "default": ""
          },
          "tenderType": {
            "title": "Tender type",
            "enum": [
              "any",
              "publicTender",
              "directPurchase",
              "limitedTender",
              "reverseAuction",
              "twoStageFirst",
              "twoStageSecond",
              "publicTenderOldSystem",
              "directPurchaseOldSystem",
              "frameworkAgreement",
              "designContest",
              "nationalTransformation",
              "revenueSharing",
              "majorCompanies"
            ],
            "type": "string",
            "description": "Procurement method.",
            "default": "any"
          },
          "status": {
            "title": "Status",
            "enum": [
              "any",
              "open",
              "closed",
              "offersOpening",
              "offersExamination",
              "awarding",
              "awarded"
            ],
            "type": "string",
            "description": "Tender stage. 'Open for bids' is the usual choice for alerts.",
            "default": "any"
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Regions where the work is carried out. Use English names (Riyadh, Makkah, Madinah, Qassim, Eastern Province, Asir, Tabuk, Hail, Northern Borders, Jazan, Najran, Al Bahah, Al Jawf), Arabic names or Etimad region ids 1-13.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "activityId": {
            "title": "Activity id",
            "minimum": 1,
            "type": "integer",
            "description": "Etimad main activity id, e.g. 9 for communications and IT, 2 for contracting, 1 for trade. Leave empty for all activities."
          },
          "publishedWithinDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only tenders published in the last N days, counting today in Riyadh time. Handy for daily or weekly alerts. Do not combine with 'Published from'."
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Earliest publication date, YYYY-MM-DD (inclusive).",
            "default": ""
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Latest publication date, YYYY-MM-DD (inclusive).",
            "default": ""
          },
          "bidDeadlineFrom": {
            "title": "Bid deadline from",
            "type": "string",
            "description": "Only tenders whose bid submission deadline falls on or after this date, YYYY-MM-DD.",
            "default": ""
          },
          "bidDeadlineTo": {
            "title": "Bid deadline to",
            "type": "string",
            "description": "Only tenders whose bid submission deadline falls on or before this date, YYYY-MM-DD.",
            "default": ""
          },
          "referenceNumber": {
            "title": "Reference number",
            "type": "string",
            "description": "One tender's reference number, e.g. '261039009384'.",
            "default": ""
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many tenders, newest first. With 'Include details' on, at most 2,500 tenders per run.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include details",
            "type": "boolean",
            "description": "Also read each tender's detail page: purpose, contract duration, guarantees, expected award and work start dates, execution regions and cities, activities, and for awarded tenders the bidders, awarded suppliers and award value. Slower: about four page reads per tender.",
            "default": false
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional Etimad pages to read instead of the filters above: a tender search URL copied from tenders.etimad.sa/Tender/AllTendersForVisitor (its filters are kept), or a tender detail URL (DetailsForVisitor?STenderId=...). Date windows, maximum results and details still apply.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}