{
  "openapi": "3.0.1",
  "info": {
    "title": "Romanian Public Procurement (SEAP/SICAP)",
    "description": "Romanian public tenders from e-licitatie.ro (SEAP/SICAP): sub-threshold achiziții directe (not in EU TED) and above-threshold licitații publice. PII-stripped per GDPR, enriched with Romanian sector taxonomy, winner intelligence joined on awarded records. MCP-native, pay-per-record, no subscription.",
    "version": "0.1",
    "x-build-id": "StttRCNconBNvQ6B0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apnoda~seap-sicap-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apnoda-seap-sicap-tenders",
        "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/apnoda~seap-sicap-tenders/runs": {
      "post": {
        "operationId": "runs-sync-apnoda-seap-sicap-tenders",
        "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/apnoda~seap-sicap-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-apnoda-seap-sicap-tenders",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "live",
              "backfill",
              "alert_check"
            ],
            "type": "string",
            "description": "'live' pulls current data from e-licitatie.ro (maxResults capped at 1 000). 'backfill' pulls the 2007–2018 historical archive from istoric.e-licitatie.ro (maxResults capped at 100 000, priced per backfill_tender event). Backfill covers the above-threshold tier only, sub-threshold (achiziții directe) was formalized by Romania's Law 98/2016 and was never populated in the historical archive; sub_threshold passes return zero records under backfill. 'alert_check' (XP-01) queries the cached seap_tenders_hot MV (no live SEAP, no proxy cost) and diffs filter-matched records against the customer's prior alert_state slice, emitting one delta record per change annotated with alert_type ∈ {NEW, MODIFIED, AWARDED, AMENDED, EXTENDED, CANCELLED}. Within-Task dedup is structural via the 4-part PK (user_id, task_id, filter_fingerprint, sicap_id); date window is excluded from the filter_fingerprint so daily Tasks dedupe across observation windows.",
            "default": "live"
          },
          "tiers": {
            "title": "Tender tiers",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Which tender types to include. Sub-threshold = achiziții directe (Romanian SMB sweet spot, not in EU TED). Above-threshold = licitații publice (also mirrored in EU TED). Defaults to sub-threshold only in live and backfill; in alert_check, omitting this defaults to BOTH tiers so the AWARDED, AMENDED, and EXTENDED alert types (which only fire on above-threshold records) are enabled.",
            "items": {
              "type": "string",
              "enum": [
                "sub_threshold",
                "above_threshold"
              ],
              "enumTitles": [
                "Sub-threshold (achiziții directe)",
                "Above-threshold (licitații publice)"
              ]
            }
          },
          "acquisitionStatus": {
            "title": "Acquisition status",
            "enum": [
              "ongoing",
              "with_winners",
              "all"
            ],
            "type": "string",
            "description": "Which sub-threshold workflow slice to return. 'ongoing' (default) returns every current-era achiziție directă on the live index, sub-threshold buyers pre-designate the supplier, so winner CUI/name/closing-value are populated even on in-flight records. 'with_winners' narrows to state 7 'Oferta acceptata' (the most-terminal SEAP state observed in 2026) for users who only want offer-accepted records. 'all' is equivalent to 'ongoing' on this endpoint and is kept for forward compatibility. The legacy 'finalized' value is auto-mapped to 'with_winners' for backwards compatibility.",
            "default": "ongoing"
          },
          "publicationDateStart": {
            "title": "Publication date, from",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Returns tenders published on or after this date. Defaults to 7 days ago. SEAP rejects queries wider than ~90 days with `searchTooLong:true`; use backfill mode for archival pulls."
          },
          "publicationDateEnd": {
            "title": "Publication date, to",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Returns tenders published on or before this date. Defaults to today."
          },
          "finalizationDateStart": {
            "title": "Finalization date, from",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Accepted and range-validated for forward compatibility, but NOT currently applied as a filter: the live sub-threshold index does not populate finalization dates (0% populated on the showOngoingDa path), so a finalization-date filter would match nothing. Filter by publication date instead."
          },
          "finalizationDateEnd": {
            "title": "Finalization date, to",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Accepted and range-validated for forward compatibility, but NOT currently applied as a filter (see finalizationDateStart). Filter by publication date instead."
          },
          "cpvCodes": {
            "title": "CPV codes",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Common Procurement Vocabulary codes. E.g. 45000000 (construction works), 72000000 (IT services), 33100000 (medical equipment). Prefix matching supported, '451' matches every 451xxxxx code. Empty = all CPVs. Max 50 codes per run; for broader coverage, run multiple filtered queries and union the results.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,8}$"
            },
            "default": []
          },
          "keywordsRo": {
            "title": "Romanian keywords",
            "maxItems": 20,
            "type": "array",
            "description": "Case-insensitive substring match in the tender title (Romanian); there is no description field to match against. OR between keywords. Max 20 keywords, each up to 100 characters; narrow further by combining with CPV or authority filters. Note: the MCP search tools match keywords with Romanian full-text stemming, this dataset-run filter is plain substring only.",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "default": []
          },
          "authorityCui": {
            "title": "Contracting authority CUI",
            "maxItems": 100,
            "type": "array",
            "description": "Romanian tax codes (CUI) of contracting authorities to filter to. Numeric only, do not include the 'RO' VAT prefix. OR between values. Useful for monitoring a specific ministry, city hall, hospital, or state company. Max 100 CUIs per run.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2,10}$"
            },
            "default": []
          },
          "minValueRon": {
            "title": "Minimum value (RON)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated tender value in Romanian Lei."
          },
          "maxValueRon": {
            "title": "Maximum value (RON)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum estimated tender value in Romanian Lei."
          },
          "includeWinners": {
            "title": "Include winner intelligence",
            "type": "boolean",
            "description": "For finalized above-threshold tenders, fetch winner company CUI, name, and awarded value (adds one API call per finalized tender). Sub-threshold winner data is always populated when present (no extra call, F-15a). Strongly recommended for competitor monitoring use cases.",
            "default": true
          },
          "enrichWithSector": {
            "title": "Enrich with Romanian sector taxonomy",
            "type": "boolean",
            "description": "Add Romanian sector label (construcții / IT&C / medical / agricultură / transporturi / consultanță / mobilier / servicii profesionale / utilități) derived from CPV. More useful than raw CPV for filtering.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on total records returned across all tiers. Prevents runaway costs. Enforced per mode: 1 000 in live, 100 000 in backfill. Requests above the mode cap are clamped at runtime.",
            "default": 1000
          },
          "concurrency": {
            "title": "Concurrent contract fetches",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Parallel contract-detail fetches for above-threshold finalized notices. Higher = faster, more load on SEAP. Backfill runs should typically use a lower value to avoid rate-limiting on the historic service.",
            "default": 10
          },
          "judet": {
            "title": "Județ (Romanian county)",
            "maxItems": 42,
            "uniqueItems": true,
            "type": "array",
            "description": "Filter to tenders whose contracting authority is registered in one of the listed Romanian counties (județe). Matched case- and diacritic-insensitively, so 'Cluj', 'CLUJ', 'cluj' all resolve identically; 'București' / 'Bucuresti' both match the capital. Coverage is ~98% of CUIs (per IN-06-F-XX-judet Spike 5c), records whose authority CUI is missing from the bundled snapshot are dropped by this filter. Empty = no judet filter. Max 42 entries. NOTE for alert_check Tasks: changing this filter (e.g. adding a new county) mints a fresh alert_state slice, so the next run will re-fire every matched record as NEW. This is by design, different judet sets are different saved searches. The alertTypes filter, by contrast, does NOT replay history when changed (it's emit-side only).",
            "items": {
              "type": "string",
              "maxLength": 50
            },
            "default": []
          },
          "frameworkOnly": {
            "title": "Framework agreements only (acord-cadru)",
            "type": "boolean",
            "description": "Limit results to framework agreements (acord-cadru). When true, sub-threshold direct acquisitions are excluded entirely (they are bilateral by construction and never framework). For above-threshold, derived from SEAP's hasSubsequentContracts boolean on the list response, no extra detail fetch. For alert_check Tasks: toggling this filter mints a fresh alert_state slice (same fingerprint-replay caveat as judet).",
            "default": false
          },
          "singleBidder": {
            "title": "Single-bidder only",
            "type": "boolean",
            "description": "Limit results to tenders received with exactly one bid. Sub-threshold direct acquisitions are inherently single-bidder (the supplier is pre-designated). For above-threshold, applied as a heuristic, true when the SEAP list response reports highestOfferValue === lowestOfferValue with both non-null and non-zero. Records where the bid range is missing or zero (typically newly published or non-awarded) are dropped by this filter when set. For alert_check Tasks: toggling this filter mints a fresh alert_state slice (same fingerprint-replay caveat as judet).",
            "default": false
          },
          "winnerCui": {
            "title": "Winner CUI (competitor tracking)",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Romanian tax codes (CUI) of WINNING suppliers to filter to. Keeps only tenders whose primary awarded winner is one of these CUIs. Numeric only, do not include the 'RO' VAT prefix. OR between values. The competitor-alert use case: an alert_check Task with a competitor watch-list here fans out a delta every time that competitor wins a new tender (pair with acquisitionStatus=with_winners so only awarded rows count). Matches the primary awarded winner, same as the get_winner_profile MCP tool. For alert_check Tasks: changing this list mints a fresh alert_state slice (same fingerprint-replay caveat as judet). Max 100 CUIs.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2,10}$"
            },
            "default": []
          },
          "alertTypes": {
            "title": "Alert types to emit (alert_check only)",
            "uniqueItems": true,
            "type": "array",
            "description": "alert_check mode only. Restricts emitted delta records to the listed alert_type values. Alert state is still upserted for filtered records (so subsequent runs do not replay them); only the per-run dataset emit is filtered. Empty = all types emitted. Ignored in live and backfill modes.",
            "items": {
              "type": "string",
              "enum": [
                "NEW",
                "MODIFIED",
                "CANCELLED",
                "AWARDED",
                "AMENDED",
                "EXTENDED"
              ],
              "enumTitles": [
                "NEW (first observation of a record)",
                "MODIFIED (content_hash changed, fallback gate)",
                "CANCELLED (stubbed; currently classifies as MODIFIED, XP-01-followup-1)",
                "AWARDED (primary_winner_cui transitioned null → non-null)",
                "AMENDED (errata_no or version_no incremented)",
                "EXTENDED (tender_deadline_date changed)"
              ]
            },
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}