{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Public Sector Pack — BOE Subastas, BORME & PLACSP",
    "description": "Unified Spanish official open-data feed combining BOE judicial & AEAT auctions, BORME new companies & registry acts, and PLACSP public tenders in one run. Filter by province, keywords and only-new alerts. $1 per 1,000 unified records (+ child Actor events).",
    "version": "0.1",
    "x-build-id": "zH1TdmktJRTh0w9Hg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/icarodata~spain-public-sector-pack/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-icarodata-spain-public-sector-pack",
        "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/icarodata~spain-public-sector-pack/runs": {
      "post": {
        "operationId": "runs-sync-icarodata-spain-public-sector-pack",
        "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/icarodata~spain-public-sector-pack/run-sync": {
      "post": {
        "operationId": "run-sync-icarodata-spain-public-sector-pack",
        "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": {
          "includeBoe": {
            "title": "Include BOE Subastas (auctions)",
            "type": "boolean",
            "description": "Fetch Spanish judicial, AEAT, Seguridad Social and notarial auctions from icarodata/boe-subastas.",
            "default": true
          },
          "includeBorme": {
            "title": "Include BORME (new companies & acts)",
            "type": "boolean",
            "description": "Fetch new Spanish companies and official corporate registry acts from icarodata/borme-feed.",
            "default": true
          },
          "includePlacsp": {
            "title": "Include PLACSP (public tenders)",
            "type": "boolean",
            "description": "Fetch Spanish public tenders and awards from icarodata/placsp-licitaciones.",
            "default": true
          },
          "provinces": {
            "title": "Provinces (shared filter)",
            "type": "array",
            "description": "Optional INE 2-digit province codes applied across BOE, BORME and PLACSP. Leave empty to cover all of Spain.",
            "items": {
              "type": "string",
              "enum": [
                "01",
                "02",
                "03",
                "04",
                "05",
                "06",
                "07",
                "08",
                "09",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30",
                "31",
                "32",
                "33",
                "34",
                "35",
                "36",
                "37",
                "38",
                "39",
                "40",
                "41",
                "42",
                "43",
                "44",
                "45",
                "46",
                "47",
                "48",
                "49",
                "50",
                "51",
                "52"
              ],
              "enumTitles": [
                "Araba/Álava (01)",
                "Albacete (02)",
                "Alicante/Alacant (03)",
                "Almería (04)",
                "Ávila (05)",
                "Badajoz (06)",
                "Illes Balears (07)",
                "Barcelona (08)",
                "Burgos (09)",
                "Cáceres (10)",
                "Cádiz (11)",
                "Castellón/Castelló (12)",
                "Ciudad Real (13)",
                "Córdoba (14)",
                "A Coruña (15)",
                "Cuenca (16)",
                "Girona (17)",
                "Granada (18)",
                "Guadalajara (19)",
                "Gipuzkoa (20)",
                "Huelva (21)",
                "Huesca (22)",
                "Jaén (23)",
                "León (24)",
                "Lleida (25)",
                "La Rioja (26)",
                "Lugo (27)",
                "Madrid (28)",
                "Málaga (29)",
                "Murcia (30)",
                "Navarra (31)",
                "Ourense (32)",
                "Asturias (33)",
                "Palencia (34)",
                "Las Palmas (35)",
                "Pontevedra (36)",
                "Salamanca (37)",
                "Santa Cruz de Tenerife (38)",
                "Cantabria (39)",
                "Segovia (40)",
                "Sevilla (41)",
                "Soria (42)",
                "Tarragona (43)",
                "Teruel (44)",
                "Toledo (45)",
                "Valencia/València (46)",
                "Valladolid (47)",
                "Bizkaia (48)",
                "Zamora (49)",
                "Zaragoza (50)",
                "Ceuta (51)",
                "Melilla (52)"
              ]
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Optional case-insensitive keywords applied across PLACSP, BORME and BOE records.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItemsPerSource": {
            "title": "Max items per source",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum records requested from each enabled child Actor (between 1 and 500). Keep low (e.g. 2-10) for test runs.",
            "default": 10
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Passed to each child Actor and tracked in the pack's named key-value store ('spain-public-sector-pack-state') so scheduled runs skip already-delivered items and avoid duplicate child charges.",
            "default": false
          },
          "boeAssetType": {
            "title": "BOE asset type",
            "enum": [
              "",
              "property",
              "vehicle",
              "other"
            ],
            "type": "string",
            "description": "Asset type filter for BOE Subastas.",
            "default": "property"
          },
          "boeStatus": {
            "title": "BOE auction status",
            "enum": [
              "",
              "upcoming",
              "open",
              "closed"
            ],
            "type": "string",
            "description": "Status filter for BOE Subastas.",
            "default": "open"
          },
          "boeEnrichWithCatastro": {
            "title": "Enrich BOE auctions with Catastro",
            "type": "boolean",
            "description": "Enables enrichWithCatastro on BOE Subastas (calls icarodata/spain-property-enricher, +$0.004/property).",
            "default": false
          },
          "bormeActTypes": {
            "title": "BORME act types",
            "type": "array",
            "description": "Corporate act types to include from BORME.",
            "items": {
              "type": "string",
              "enum": [
                "constitution",
                "dissolution",
                "bankruptcy",
                "capital_change",
                "appointment"
              ],
              "enumTitles": [
                "Constitutions",
                "Dissolutions",
                "Bankruptcy / concurso",
                "Capital changes",
                "Appointments (names redacted)"
              ]
            },
            "default": [
              "constitution",
              "dissolution",
              "bankruptcy",
              "capital_change"
            ]
          },
          "placspContractTypes": {
            "title": "PLACSP contract types",
            "type": "array",
            "description": "Optional PLACSP contract types (supplies, services, works...). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "supplies",
                "services",
                "works",
                "special_administrative",
                "private",
                "public_service_management",
                "services_concession",
                "public_works_concession",
                "works_concession",
                "ppp",
                "patrimonial"
              ]
            },
            "default": []
          },
          "placspStatus": {
            "title": "PLACSP tender status",
            "type": "array",
            "description": "Optional PLACSP tender statuses (open, announced, pending_award, awarded, resolved). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "announced",
                "open",
                "pending_award",
                "awarded",
                "resolved",
                "cancelled"
              ]
            },
            "default": []
          },
          "runInParallel": {
            "title": "Run child Actors in parallel",
            "type": "boolean",
            "description": "Sequential by default to stay within Apify Free-tier memory/concurrency limits. Enable on paid plans for faster completion.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}