{
  "openapi": "3.0.1",
  "info": {
    "title": "Baltic Tenders Scraper: Estonia & Latvia Public Procurement",
    "description": "Public tenders and contract awards of Estonia (riigihanked.riik.ee) and Latvia (EIS, eis.gov.lv) from their official open data: buyer, registry code, CPV, deadline, estimated value, winners and amounts, daily monitoring of new notices. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "DI6MmQY1SMwdJaBIf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~baltic-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-baltic-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/steadyscrape~baltic-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-baltic-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/steadyscrape~baltic-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-baltic-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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Estonia (Riigihangete register, riigihanked.riik.ee) and Latvia (Elektronisko iepirkumu sistēma, EIS, through data.gov.lv). Empty reads both. Lithuania is not covered.",
            "items": {
              "type": "string",
              "enum": [
                "estonia",
                "latvia"
              ],
              "enumTitles": [
                "Estonia (riigihanked.riik.ee)",
                "Latvia (EIS, eis.gov.lv)"
              ]
            },
            "default": [
              "estonia",
              "latvia"
            ]
          },
          "noticeKinds": {
            "title": "Notice kinds",
            "type": "array",
            "description": "Tenders (<code>tender</code>: contract notices, prior information and market consultations, with their deadline) and awards (<code>award</code>: contract award notices and signed contracts with the winning companies, their registry codes and the amount; also contract changes and terminations). Empty keeps both.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "award"
              ],
              "enumTitles": [
                "Tenders (hanketeated / iepirkumu izsludināšana)",
                "Awards and contracts (with winners)"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "publishedInLastDays": {
            "title": "Published in the last days",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Notices published in the latest N days. Both registers publish their open data overnight, so <code>1</code> is yesterday. For a daily schedule keep <code>7</code> with <b>Only new notices</b>: Estonia adds some notices a day or more after the day they carry, a week catches them, and each notice is still delivered and charged once. Ignored when <b>Published from</b> or <b>Published to</b> is set.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "First publication day (YYYY-MM-DD). One run reads at most 31 days: a longer range is cut to its last 31 days, and the run says so. Estonia's register writes its open data from 2023-06-01 (eForms); data.gov.lv's searchable EIS files start in 2017 for tenders and 2018 for contracts."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Last publication day (YYYY-MM-DD), included. Empty means the newest day published (yesterday)."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices whose title or description (of the notice or a lot) has any of these keywords, in Estonian, Latvian or English: <code>ehitus</code>, <code>remonts</code>, <code>software</code>. Case and accents do not matter (ē = e, š = s, õ = o) and a keyword matches inside longer words (remont finds remontdarbi). A keyword of several words needs all of them; words of 3 letters or fewer (IT) match whole words only.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Keep notices with a CPV code starting with any of these: <code>45</code> (construction work), <code>4523</code>, <code>72000000</code> (IT services). Trailing zeros and the check digit are ignored (<code>45000000-7</code> means 45).",
            "items": {
              "type": "string"
            }
          },
          "buyers": {
            "title": "Buyers",
            "type": "array",
            "description": "Keep notices whose buyer (hankija, pasūtītājs) has any of these in its name, or this registry code: <code>Riigi Tugiteenuste Keskus</code>, <code>Latvijas valsts meži</code>, <code>40003466281</code>.",
            "items": {
              "type": "string"
            }
          },
          "contractNatures": {
            "title": "Contract nature",
            "type": "array",
            "description": "Keep notices for works (ehitustööd, būvdarbi), supplies (asjad, piegāde) or services (teenused, pakalpojumi). Empty keeps all.",
            "items": {
              "type": "string",
              "enum": [
                "works",
                "supplies",
                "services"
              ],
              "enumTitles": [
                "Works",
                "Supplies",
                "Services"
              ]
            }
          },
          "onlyOpen": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Keep only tenders whose deadline has not passed: the tender deadline, else the deadline for requests to participate. Tenders without a deadline are left out; awards pass.",
            "default": false
          },
          "minValue": {
            "title": "Minimum value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose estimated value (for awards, the awarded amount) is at least this many euros. Notices that print no value are left out when you set this."
          },
          "onlyAwardsWithWinners": {
            "title": "Only awards that name a winner",
            "type": "boolean",
            "description": "Leave out award notices that name no winning company (procedures closed without a contract).",
            "default": false
          },
          "onlyNewNotices": {
            "title": "Only new notices",
            "type": "boolean",
            "description": "Skip notices an earlier run of this same search already delivered, so a scheduled run is charged only for new ones. The list lives in a key-value store of your account named <code>steadyscrape-baltic-tenders-scraper-state</code>, one record per search (the dates do not count, the filters do).",
            "default": false
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many notices, newest published first. Each notice is charged once; status rows are free.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}