{
  "openapi": "3.0.1",
  "info": {
    "title": "Etimad Saudi Award Results Scraper",
    "description": "Saudi government tender award results from Etimad: winning supplier, awarded value in SAR, all bidders and offers, buyer, tender reference and award type (full or partial). Filter by keyword, agency, tender type, region and publication date, or run daily for new awards only.",
    "version": "0.1",
    "x-build-id": "LONolFSzsVrhDoAVH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~etimad-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-etimad-awards-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/automatic~etimad-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-etimad-awards-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/automatic~etimad-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-etimad-awards-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": ""
          },
          "referenceNumber": {
            "title": "Tender reference number",
            "type": "string",
            "description": "One tender's Etimad reference number, e.g. '261039009384'. Returns its award results only.",
            "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 of the awarded tender.",
            "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"
            }
          },
          "publishedWithinDays": {
            "title": "Tender published in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only awards of tenders published in the last N days, counting today in Riyadh time. Direct purchases are awarded within days; public tenders take weeks, so a wider window finds their awards too. Ignored when you set 'Published from' or 'Published to' and leave this at 30; any other value cannot be combined with 'Published from'.",
            "default": 30
          },
          "publishedFrom": {
            "title": "Tender published from",
            "type": "string",
            "description": "Earliest tender publication date, YYYY-MM-DD (inclusive).",
            "default": ""
          },
          "publishedTo": {
            "title": "Tender published to",
            "type": "string",
            "description": "Latest tender publication date, YYYY-MM-DD (inclusive).",
            "default": ""
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum award rows to return (one row per winning supplier; a split award returns several rows). Left empty: 50, or a 10-row sample when no filter is set either."
          },
          "includeBidders": {
            "title": "Include all bidders",
            "type": "boolean",
            "description": "Also return every supplier that submitted an offer, with its offer value and technical result, not only the winners.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new or changed awards",
            "type": "boolean",
            "description": "Daily-feed mode: remember what was already delivered and return only new awards, or ones whose supplier, value or award type changed. Use one stateKey per alert you run.",
            "default": false
          },
          "stateKey": {
            "title": "Feed state key",
            "type": "string",
            "description": "Name of the remembered feed for 'Only new or changed awards'. Same key = same feed; leave empty to derive it from the input automatically.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}